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
This commit is contained in:
lgao4 2009-12-22 08:02:33 +00:00
parent ad86a50ae7
commit 6320fa42c9
2 changed files with 17 additions and 10 deletions

View File

@ -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

View File

@ -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;
}
/**