2) Remove Include/Framework/DataHubRecords.h and merge its content into Include/Guid/DataHubRecords.h 3) Remove Include/Framework/Legacy16.h and merge its contents into Include/Protocol/LegacyBios.h 4) Update FrameworkDxe.h to no longer include all the Legacy16.h and DataHubRecords.h contents. This reduces the number of include file and definitions pulled in when a module include FrameworkDxe.h. The Legacy16.h contents can now be included by a module through Protocol/LegacyBios.h and the DataHubRecords.h contents can be included by a module through Guid/DataHubRecords.h 5) Update Include/Guid/StatusCodeDataTypeId.h so it can be safely included by both PEIMs and DXE Modules since both the PEI and DXE phases support status codes 6) Remove extra #includes where possible to reduce number of files included during a build. 7) Update Include/Protocol/LegacyBiosPlatform.h to #include Include/Protocol/LegacyBios.h since it depends on HDD_INFO and COMPATIBILITY16 strictures carried by LegacyBios.h git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8899 6f19259b-4bc3-4df7-8a09-765794883524
79 lines
2.7 KiB
C
79 lines
2.7 KiB
C
/** @file
|
|
Internal header file for Smbus library.
|
|
|
|
Copyright (c) 2006, Intel Corporation<BR>
|
|
All rights reserved. This program and the accompanying materials
|
|
are licensed and made available under the terms and conditions of the BSD License
|
|
which accompanies this distribution. The full text of the license may be found at
|
|
http://opensource.org/licenses/bsd-license.php
|
|
|
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
**/
|
|
|
|
#ifndef _INTERNAL_SMBUS_LIB_H_
|
|
#define _INTERNAL_SMBUS_LIB_H_
|
|
|
|
|
|
#include <FrameworkPei.h>
|
|
|
|
#include <Ppi/Smbus.h>
|
|
|
|
#include <Library/SmbusLib.h>
|
|
#include <Library/DebugLib.h>
|
|
#include <Library/PeiServicesLib.h>
|
|
#include <Library/BaseMemoryLib.h>
|
|
#include <Library/PeiServicesTablePointerLib.h>
|
|
|
|
//
|
|
// Declaration for internal functions
|
|
//
|
|
|
|
/**
|
|
Gets Smbus PPIs.
|
|
|
|
This internal function retrieves Smbus PPI from PPI database.
|
|
|
|
@param VOID
|
|
|
|
@return The pointer to Smbus PPI.
|
|
|
|
**/
|
|
EFI_PEI_SMBUS_PPI *
|
|
InternalGetSmbusPpi (
|
|
VOID
|
|
);
|
|
|
|
/**
|
|
Executes an SMBus operation to an SMBus controller.
|
|
|
|
This function provides a standard way to execute Smbus script
|
|
as defined in the SmBus Specification. The data can either be of
|
|
the Length byte, word, or a block of data.
|
|
|
|
@param SmbusOperation Signifies which particular SMBus hardware protocol instance that it will use to
|
|
execute the SMBus transactions.
|
|
@param SmBusAddress Address that encodes the SMBUS Slave Address,
|
|
SMBUS Command, SMBUS Data Length, and PEC.
|
|
@param Length Signifies the number of bytes that this operation will do. The maximum number of
|
|
bytes can be revision specific and operation specific.
|
|
@param Buffer Contains the value of data to execute to the SMBus slave device. Not all operations
|
|
require this argument. The length of this buffer is identified by Length.
|
|
@param Status Return status for the executed command.
|
|
This is an optional parameter and may be NULL.
|
|
|
|
@return The actual number of bytes that are executed for this operation.
|
|
|
|
**/
|
|
UINTN
|
|
InternalSmBusExec (
|
|
IN EFI_SMBUS_OPERATION SmbusOperation,
|
|
IN UINTN SmBusAddress,
|
|
IN UINTN Length,
|
|
IN OUT VOID *Buffer,
|
|
OUT RETURN_STATUS *Status OPTIONAL
|
|
);
|
|
|
|
#endif
|