Added the Lib Construction function for IPF lib instance

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3414 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
zliu3 2007-07-24 07:40:09 +00:00
parent 9801c29cb3
commit 10e53a287e
2 changed files with 30 additions and 1 deletions

View File

@ -39,3 +39,27 @@ GetPeiServicesTablePointer (
return PeiServices;
}
/**
The constructor function caches the pointer to PEI services.
The constructor function caches the pointer to PEI services.
It will always return EFI_SUCCESS.
@param FfsHeader Pointer to FFS header the loaded driver.
@param PeiServices Pointer to the PEI services.
@retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
**/
EFI_STATUS
EFIAPI
PeiServicesTablePointerLibConstructor (
IN EFI_FFS_FILE_HEADER *FfsHeader,
IN EFI_PEI_SERVICES **PeiServices
)
{
AsmWriteKr7 ((UINT64)(UINTN)PeiServices);
return EFI_SUCCESS;
}

View File

@ -19,10 +19,11 @@
FILE_GUID = E0E7D776-E7EB-4e5f-9AA8-54CF3AA64A43
MODULE_TYPE = PEIM
VERSION_STRING = 1.0
LIBRARY_CLASS = PeiServicesTablePointerLib|PEIM PEI_CORE
LIBRARY_CLASS = PeiServicesTablePointerLib|PEIM PEI_CORE
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
CONSTRUCTOR = PeiServicesTablePointerLibConstructor
#
# VALID_ARCHITECTURES = IPF
@ -31,6 +32,10 @@
[Sources.Ipf]
PeiServicesTablePointer.c
[Packages]
MdePkg/MdePkg.dec
[LibraryClasses]
DebugLib
BaseLib