summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/Dxe/Image/Image.c
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2009-04-22 02:06:58 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2009-04-22 02:06:58 +0000
commit7547649f22102726e555be072e8975a199b027bf (patch)
tree71eb9d2ac55be530c9b9ff72028876eca69398dd /MdeModulePkg/Core/Dxe/Image/Image.c
parentb4500f6efe57fabf863d3705daceb4e3b31838af (diff)
downloadedk2-platforms-7547649f22102726e555be072e8975a199b027bf.tar.xz
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
Diffstat (limited to 'MdeModulePkg/Core/Dxe/Image/Image.c')
-rw-r--r--MdeModulePkg/Core/Dxe/Image/Image.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c b/MdeModulePkg/Core/Dxe/Image/Image.c
index 5502c7ab18..8ec6793966 100644
--- a/MdeModulePkg/Core/Dxe/Image/Image.c
+++ b/MdeModulePkg/Core/Dxe/Image/Image.c
@@ -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) {
@@ -904,6 +912,21 @@ CoreLoadImageCommon (
}
//
+ // 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
//
*ImageHandle = Image->Handle;