Added the Lib Construction function for IPF lib instance
authorzliu3 <zliu3@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 24 Jul 2007 07:40:09 +0000 (07:40 +0000)
committerzliu3 <zliu3@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 24 Jul 2007 07:40:09 +0000 (07:40 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3414 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c
MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointerLibKr7.inf

index bc189cd..94895b3 100644 (file)
@@ -39,3 +39,27 @@ GetPeiServicesTablePointer (
   return PeiServices;\r
 }\r
 \r
+/**\r
+  The constructor function caches the pointer to PEI services.\r
+\r
+  The constructor function caches the pointer to PEI services.\r
+  It will always return EFI_SUCCESS.\r
+\r
+  @param  FfsHeader   Pointer to FFS header the loaded driver.\r
+  @param  PeiServices Pointer to the PEI services.\r
+\r
+  @retval EFI_SUCCESS   The constructor always returns EFI_SUCCESS.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+PeiServicesTablePointerLibConstructor (\r
+  IN EFI_FFS_FILE_HEADER  *FfsHeader,\r
+  IN EFI_PEI_SERVICES     **PeiServices\r
+  )\r
+{\r
+  AsmWriteKr7 ((UINT64)(UINTN)PeiServices);\r
+  return EFI_SUCCESS;\r
+}\r
+\r
+\r
index 5d2dca8..8c1c5ff 100644 (file)
   FILE_GUID                      = E0E7D776-E7EB-4e5f-9AA8-54CF3AA64A43\r
   MODULE_TYPE                    = PEIM\r
   VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = PeiServicesTablePointerLib|PEIM PEI_CORE \r
+  LIBRARY_CLASS                  = PeiServicesTablePointerLib|PEIM PEI_CORE\r
   EDK_RELEASE_VERSION            = 0x00020000\r
   EFI_SPECIFICATION_VERSION      = 0x00020000\r
 \r
+  CONSTRUCTOR                    = PeiServicesTablePointerLibConstructor\r
 \r
 #\r
 #  VALID_ARCHITECTURES           = IPF\r
 [Sources.Ipf]\r
   PeiServicesTablePointer.c\r
 \r
+[Packages]\r
+  MdePkg/MdePkg.dec\r
+\r
 [LibraryClasses]\r
   DebugLib\r
+  BaseLib\r
 \r