diff options
author | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-09-24 11:38:43 +0000 |
---|---|---|
committer | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-09-24 11:38:43 +0000 |
commit | b0d803fe3e5c55a9a0c75bc90ccf40ebbbc9ffa3 (patch) | |
tree | 071d183f0cf4e1be4345e64f10a6228639187135 /Nt32Pkg | |
parent | f6203b71926848e7b197ee99a3a86a487d7b334a (diff) | |
download | edk2-platforms-b0d803fe3e5c55a9a0c75bc90ccf40ebbbc9ffa3.tar.xz |
Merge branch of PI tree to main trunk
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3918 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Nt32Pkg')
-rw-r--r-- | Nt32Pkg/Library/Nt32PeCoffLoaderLib/Nt32PeCoffLoader.c | 35 | ||||
-rw-r--r-- | Nt32Pkg/Library/Nt32PeCoffLoaderLib/Nt32PeCoffLoaderLib.inf | 2 | ||||
-rw-r--r-- | Nt32Pkg/Nt32Pkg.dsc | 1 |
3 files changed, 16 insertions, 22 deletions
diff --git a/Nt32Pkg/Library/Nt32PeCoffLoaderLib/Nt32PeCoffLoader.c b/Nt32Pkg/Library/Nt32PeCoffLoaderLib/Nt32PeCoffLoader.c index 8eaa2aba43..3d5353b423 100644 --- a/Nt32Pkg/Library/Nt32PeCoffLoaderLib/Nt32PeCoffLoader.c +++ b/Nt32Pkg/Library/Nt32PeCoffLoaderLib/Nt32PeCoffLoader.c @@ -21,35 +21,30 @@ Abstract: --*/
#include <PiPei.h>
+#include <Library/DebugLib.h>
#include <Guid/PeiPeCoffLoader.h>
-#include <Library/PeCoffLoaderLib.h>
+#include <Library/PeCoffLoaderLib.h>
+#include <Library/PeiServicesLib.h>
-EFI_PEI_PE_COFF_LOADER_PROTOCOL *mPeiEfiPeiPeCoffLoader;
+EFI_PEI_PE_COFF_LOADER_PROTOCOL *mPeiEfiPeiPeCoffLoader = NULL;
-EFI_STATUS
-EFIAPI
-PeCoffLoaderConstructor (
- IN EFI_FFS_FILE_HEADER *FfsHeader,
- IN EFI_PEI_SERVICES **PeiServices
- )
-{
- EFI_STATUS Status;
-
- Status = (*PeiServices)->LocatePpi (
- PeiServices,
- &gEfiPeiPeCoffLoaderGuid,
- 0,
- NULL,
- &mPeiEfiPeiPeCoffLoader
- );
- return Status;
-}
EFI_PEI_PE_COFF_LOADER_PROTOCOL *
EFIAPI
GetPeCoffLoaderProtocol (
)
{
+ EFI_STATUS Status;
+
+ if (mPeiEfiPeiPeCoffLoader == NULL) {
+ Status = PeiServicesLocatePpi(
+ &gEfiPeiPeCoffLoaderGuid,
+ 0,
+ NULL,
+ (VOID **) &mPeiEfiPeiPeCoffLoader
+ );
+ ASSERT_EFI_ERROR (Status);
+ }
return mPeiEfiPeiPeCoffLoader;
}
diff --git a/Nt32Pkg/Library/Nt32PeCoffLoaderLib/Nt32PeCoffLoaderLib.inf b/Nt32Pkg/Library/Nt32PeCoffLoaderLib/Nt32PeCoffLoaderLib.inf index 04a0102919..d6a57b22b0 100644 --- a/Nt32Pkg/Library/Nt32PeCoffLoaderLib/Nt32PeCoffLoaderLib.inf +++ b/Nt32Pkg/Library/Nt32PeCoffLoaderLib/Nt32PeCoffLoaderLib.inf @@ -24,8 +24,6 @@ EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
- CONSTRUCTOR = PeCoffLoaderConstructor
-
#
# The following information is for reference only and not required by the build tools.
#
diff --git a/Nt32Pkg/Nt32Pkg.dsc b/Nt32Pkg/Nt32Pkg.dsc index 01a725a8d8..98ed118f8b 100644 --- a/Nt32Pkg/Nt32Pkg.dsc +++ b/Nt32Pkg/Nt32Pkg.dsc @@ -145,6 +145,7 @@ PeCoffGetEntryPointLib|Nt32Pkg/Library/Nt32PeiPeCoffGetEntryPointLib/Nt32PeiPeCoffGetEntryPointLib.inf
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
DebugLib|IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
+ PeCoffLoaderLib|Nt32Pkg/Library/Nt32PeCoffLoaderLib/Nt32PeCoffLoaderLib.inf
[LibraryClasses.common.DXE_RUNTIME_DRIVER]
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
|