mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
Update DxeCore to support to install gEfiHiiPackageListProtocolGuid in LoadImage() if it detects the existence of HII resource on the PE image.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8142 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
b4500f6efe
commit
7547649f22
@ -49,6 +49,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#include <Protocol/Capsule.h>
|
||||
#include <Protocol/BusSpecificDriverOverride.h>
|
||||
#include <Protocol/TcgService.h>
|
||||
#include <Protocol/HiiPackageList.h>
|
||||
#include <Guid/MemoryTypeInformation.h>
|
||||
#include <Guid/FirmwareFileSystem2.h>
|
||||
#include <Guid/HobList.h>
|
||||
|
@ -130,6 +130,7 @@
|
||||
gEfiCpuArchProtocolGuid ## CONSUMES
|
||||
gEfiDevicePathProtocolGuid ## CONSUMES
|
||||
gEfiLoadedImageProtocolGuid ## PRODUCES
|
||||
gEfiHiiPackageListProtocolGuid ## SOMETIMES_PRODUCES
|
||||
gEfiEbcProtocolGuid ## SOMETIMES_CONSUMES
|
||||
gEfiLoadedImageDevicePathProtocolGuid ## PRODUCES
|
||||
|
||||
|
@ -641,6 +641,14 @@ CoreUnloadAndCloseImage (
|
||||
&Image->Info
|
||||
);
|
||||
|
||||
if (Image->ImageContext.HiiResourceData != 0) {
|
||||
Status = CoreUninstallProtocolInterface (
|
||||
Image->Handle,
|
||||
&gEfiHiiPackageListProtocolGuid,
|
||||
(VOID *) (UINTN) Image->ImageContext.HiiResourceData
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (Image->RuntimeData != NULL) {
|
||||
@ -903,6 +911,21 @@ CoreLoadImageCommon (
|
||||
goto Done;
|
||||
}
|
||||
|
||||
//
|
||||
// Install HII Package List Protocol onto the image handle
|
||||
//
|
||||
if (Image->ImageContext.HiiResourceData != 0) {
|
||||
Status = CoreInstallProtocolInterface (
|
||||
&Image->Handle,
|
||||
&gEfiHiiPackageListProtocolGuid,
|
||||
EFI_NATIVE_INTERFACE,
|
||||
(VOID *) (UINTN) Image->ImageContext.HiiResourceData
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto Done;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Success. Return the image handle
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user