diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-12-22 08:02:33 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-12-22 08:02:33 +0000 |
commit | 6320fa42c9216930926da7cef1bb726fe04699c3 (patch) | |
tree | 667495b90701b0fbcf11c07cb63aea0a9cdf69ac /MdeModulePkg/Core/Dxe | |
parent | ad86a50ae7fb2ef9db89b22e0b94d54748ffb24f (diff) | |
download | edk2-6320fa42c9216930926da7cef1bb726fe04699c3.tar.gz edk2-6320fa42c9216930926da7cef1bb726fe04699c3.tar.bz2 edk2-6320fa42c9216930926da7cef1bb726fe04699c3.zip |
Produce LoadPeImage protocol only in framework compatibility mode.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9586 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core/Dxe')
-rw-r--r-- | MdeModulePkg/Core/Dxe/DxeMain.inf | 5 | ||||
-rw-r--r-- | MdeModulePkg/Core/Dxe/Image/Image.c | 22 |
2 files changed, 17 insertions, 10 deletions
diff --git a/MdeModulePkg/Core/Dxe/DxeMain.inf b/MdeModulePkg/Core/Dxe/DxeMain.inf index a7191b87e1..3c711400e3 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain.inf +++ b/MdeModulePkg/Core/Dxe/DxeMain.inf @@ -107,7 +107,7 @@ gEfiStatusCodeRuntimeProtocolGuid ## SOMETIMES_CONSUMES
gEfiCapsuleArchProtocolGuid ## CONSUMES
gEfiDecompressProtocolGuid ## CONSUMES
- gEfiLoadPeImageProtocolGuid ## PRODUCES
+ gEfiLoadPeImageProtocolGuid ## SOMETIMES_PRODUCES (Produces when PcdFrameworkCompatibilitySupport is set)
gEfiSimpleFileSystemProtocolGuid ## CONSUMES
gEfiLoadFileProtocolGuid ## CONSUMES
gEfiLoadFile2ProtocolGuid ## CONSUMES
@@ -140,3 +140,6 @@ gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValueBootServiceExit
gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValueDxeDriverBegin
gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValueDxeDriverEnd
+
+[FeaturePcd.common]
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkCompatibilitySupport ## CONSUMES
diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c b/MdeModulePkg/Core/Dxe/Image/Image.c index d0539b98e4..7e5cea7b76 100644 --- a/MdeModulePkg/Core/Dxe/Image/Image.c +++ b/MdeModulePkg/Core/Dxe/Image/Image.c @@ -144,15 +144,19 @@ CoreInitializeImageServices ( gDxeCoreImageHandle = Image->Handle;
gDxeCoreLoadedImage = &Image->Info;
- //
- // Export DXE Core PE Loader functionality
- //
- return CoreInstallProtocolInterface (
- &mLoadPe32PrivateData.Handle,
- &gEfiLoadPeImageProtocolGuid,
- EFI_NATIVE_INTERFACE,
- &mLoadPe32PrivateData.Pe32Image
- );
+ if (FeaturePcdGet (PcdFrameworkCompatibilitySupport)) {
+ //
+ // Export DXE Core PE Loader functionality for backward compatibility.
+ //
+ Status = CoreInstallProtocolInterface (
+ &mLoadPe32PrivateData.Handle,
+ &gEfiLoadPeImageProtocolGuid,
+ EFI_NATIVE_INTERFACE,
+ &mLoadPe32PrivateData.Pe32Image
+ );
+ }
+
+ return Status;
}
/**
|