diff options
author | zliu3 <zliu3@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-07-24 07:40:09 +0000 |
---|---|---|
committer | zliu3 <zliu3@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-07-24 07:40:09 +0000 |
commit | 10e53a287e3cbec149e4b666cc019a35cec5bc00 (patch) | |
tree | a21417a9271d985a98cc18db2422cc871dd81b90 /MdePkg/Library/PeiServicesTablePointerLibKr7 | |
parent | 9801c29cb3661d91c58f3eddeff128f6d729f159 (diff) | |
download | edk2-platforms-10e53a287e3cbec149e4b666cc019a35cec5bc00.tar.xz |
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
Diffstat (limited to 'MdePkg/Library/PeiServicesTablePointerLibKr7')
-rw-r--r-- | MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c | 24 | ||||
-rw-r--r-- | MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointerLibKr7.inf | 7 |
2 files changed, 30 insertions, 1 deletions
diff --git a/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c b/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c index bc189cd428..94895b30c9 100644 --- a/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c +++ b/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c @@ -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;
+}
+
+
diff --git a/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointerLibKr7.inf b/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointerLibKr7.inf index 5d2dca8f66..8c1c5fff6b 100644 --- a/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointerLibKr7.inf +++ b/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointerLibKr7.inf @@ -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
|