]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Merge the PI enabling works from the branch
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 4 Sep 2007 06:09:39 +0000 (06:09 +0000)
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 4 Sep 2007 06:09:39 +0000 (06:09 +0000)
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@3770 6f19259b-4bc3-4df7-8a09-765794883524

IntelFrameworkPkg/Library/PeiSmbusLibSmbusPpi/InternalSmbusLib.h
IntelFrameworkPkg/Library/PeiSmbusLibSmbusPpi/PeiSmbusLib.c
IntelFrameworkPkg/Library/PeiSmbusLibSmbusPpi/PeiSmbusLibSmbusPpi.inf

index 3821dacb63ede4dfabf8c4d4ee3be285367e29b1..216f806716353f27b3b3967e98d5216154d04740 100644 (file)
@@ -25,6 +25,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/SmbusLib.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/PeiServicesTablePointerLib.h>\r
+#include <Library/PeiServicesLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
 \r
 #define SMBUS_LIB_SLAVE_ADDRESS(SmBusAddress)      (((SmBusAddress) >> 1)  & 0x7f)\r
@@ -42,14 +43,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
   This internal function retrieves Smbus PPI from PPI database.\r
 \r
-  @param  PeiServices   An indirect pointer to the EFI_PEI_SERVICES published by the PEI Foundation.\r
+  @param  VOID\r
 \r
   @return The pointer to Smbus PPI.\r
 \r
 **/\r
 EFI_PEI_SMBUS_PPI *\r
 InternalGetSmbusPpi (\r
-  EFI_PEI_SERVICES      **PeiServices\r
+  VOID\r
   );\r
 \r
 /**\r
index db28021d58c228d053cf81baa02372799bcc000e..dcae66e8bb6c8dfcc3eb2052e427030ee1b00ff4 100644 (file)
@@ -29,13 +29,13 @@ Module Name: PeiSmbusLib.c
 **/\r
 EFI_PEI_SMBUS_PPI *\r
 InternalGetSmbusPpi (\r
-  EFI_PEI_SERVICES      **PeiServices\r
+  VOID\r
   ) \r
 {\r
   EFI_STATUS            Status;\r
   EFI_PEI_SMBUS_PPI     *SmbusPpi;\r
 \r
-  Status = (*PeiServices)->LocatePpi (PeiServices, &gEfiPeiSmbusPpiGuid, 0, NULL, (VOID **) &SmbusPpi);\r
+  Status = PeiServicesLocatePpi (&gEfiPeiSmbusPpiGuid, 0, NULL, (VOID **) &SmbusPpi);\r
   ASSERT_EFI_ERROR (Status);\r
   ASSERT (SmbusPpi != NULL);\r
 \r
@@ -78,7 +78,7 @@ InternalSmBusExec (
   EFI_SMBUS_DEVICE_ADDRESS  SmbusDeviceAddress;\r
 \r
   PeiServices = GetPeiServicesTablePointer ();\r
-  SmbusPpi    = InternalGetSmbusPpi (PeiServices);\r
+  SmbusPpi    = InternalGetSmbusPpi ();\r
   SmbusDeviceAddress.SmbusDeviceAddress = SMBUS_LIB_SLAVE_ADDRESS (SmBusAddress);\r
 \r
   ReturnStatus = SmbusPpi->Execute (\r
index f6695a6c2ce28120615afb4a219993d170de9256..c47d5ac73ca43f1dfcaadaf67a59f2734f36712f 100644 (file)
@@ -45,6 +45,7 @@
 [LibraryClasses]\r
   BaseMemoryLib\r
   PeiServicesTablePointerLib\r
+  PeiServicesLib\r
   DebugLib\r
 \r
 \r