diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-09-04 06:11:47 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-09-04 06:11:47 +0000 |
commit | 1c280088ec83160a5f190b3d0ba796b224ee23b3 (patch) | |
tree | bbaa878c892110bb7ab4201a50aaeaf7f3762afc /MdePkg/Library/PeiSmbusLibSmbus2Ppi | |
parent | e1001af1d40370ff40cece775aaf10a2f8a0414e (diff) | |
download | edk2-platforms-1c280088ec83160a5f190b3d0ba796b224ee23b3.tar.xz |
Merge the PI enabling works from the branch
First round of PI enabling work:
1) PiPeiCis changes (CONST, EFI_PEI_FILE_HANDLE.. etc)
2) Make use of FirmwareVolume 2 protocol.
3) Verified for Nt32Pkg and real platform for S3.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3772 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/PeiSmbusLibSmbus2Ppi')
-rw-r--r-- | MdePkg/Library/PeiSmbusLibSmbus2Ppi/InternalSmbusLib.h | 5 | ||||
-rw-r--r-- | MdePkg/Library/PeiSmbusLibSmbus2Ppi/PeiSmbusLib.c | 8 | ||||
-rw-r--r-- | MdePkg/Library/PeiSmbusLibSmbus2Ppi/PeiSmbusLibSmbus2Ppi.inf | 1 |
3 files changed, 7 insertions, 7 deletions
diff --git a/MdePkg/Library/PeiSmbusLibSmbus2Ppi/InternalSmbusLib.h b/MdePkg/Library/PeiSmbusLibSmbus2Ppi/InternalSmbusLib.h index 81104db727..acd7ab7a25 100644 --- a/MdePkg/Library/PeiSmbusLibSmbus2Ppi/InternalSmbusLib.h +++ b/MdePkg/Library/PeiSmbusLibSmbus2Ppi/InternalSmbusLib.h @@ -24,6 +24,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Library/SmbusLib.h>
#include <Library/DebugLib.h>
#include <Library/PeiServicesTablePointerLib.h>
+#include <Library/PeiServicesLib.h>
#include <Library/BaseMemoryLib.h>
#define SMBUS_LIB_SLAVE_ADDRESS(SmBusAddress) (((SmBusAddress) >> 1) & 0x7f)
@@ -41,14 +42,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. This internal function retrieves Smbus PPI from PPI database.
- @param PeiServices An indirect pointer to the EFI_PEI_SERVICES published by the PEI Foundation.
+ @param VOID
@return The pointer to Smbus PPI.
**/
EFI_PEI_SMBUS2_PPI *
InternalGetSmbusPpi (
- EFI_PEI_SERVICES **PeiServices
+ VOID
);
/**
diff --git a/MdePkg/Library/PeiSmbusLibSmbus2Ppi/PeiSmbusLib.c b/MdePkg/Library/PeiSmbusLibSmbus2Ppi/PeiSmbusLib.c index 103e5ed5c6..d78682a694 100644 --- a/MdePkg/Library/PeiSmbusLibSmbus2Ppi/PeiSmbusLib.c +++ b/MdePkg/Library/PeiSmbusLibSmbus2Ppi/PeiSmbusLib.c @@ -26,13 +26,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/
EFI_PEI_SMBUS2_PPI *
InternalGetSmbusPpi (
- EFI_PEI_SERVICES **PeiServices
+ VOID
)
{
EFI_STATUS Status;
EFI_PEI_SMBUS2_PPI *SmbusPpi;
- Status = (*PeiServices)->LocatePpi (PeiServices, &gEfiPeiSmbus2PpiGuid, 0, NULL, (VOID **) &SmbusPpi);
+ Status = PeiServicesLocatePpi (&gEfiPeiSmbus2PpiGuid, 0, NULL, (VOID **) &SmbusPpi);
ASSERT_EFI_ERROR (Status);
ASSERT (SmbusPpi != NULL);
@@ -70,12 +70,10 @@ InternalSmBusExec ( )
{
EFI_PEI_SMBUS2_PPI *SmbusPpi;
- EFI_PEI_SERVICES **PeiServices;
RETURN_STATUS ReturnStatus;
EFI_SMBUS_DEVICE_ADDRESS SmbusDeviceAddress;
- PeiServices = GetPeiServicesTablePointer ();
- SmbusPpi = InternalGetSmbusPpi (PeiServices);
+ SmbusPpi = InternalGetSmbusPpi ();
SmbusDeviceAddress.SmbusDeviceAddress = SMBUS_LIB_SLAVE_ADDRESS (SmBusAddress);
ReturnStatus = SmbusPpi->Execute (
diff --git a/MdePkg/Library/PeiSmbusLibSmbus2Ppi/PeiSmbusLibSmbus2Ppi.inf b/MdePkg/Library/PeiSmbusLibSmbus2Ppi/PeiSmbusLibSmbus2Ppi.inf index 1e0a9f225e..05a6ae2315 100644 --- a/MdePkg/Library/PeiSmbusLibSmbus2Ppi/PeiSmbusLibSmbus2Ppi.inf +++ b/MdePkg/Library/PeiSmbusLibSmbus2Ppi/PeiSmbusLibSmbus2Ppi.inf @@ -42,6 +42,7 @@ [LibraryClasses]
BaseMemoryLib
PeiServicesTablePointerLib
+ PeiServicesLib
DebugLib
[Ppis]
|