summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c
diff options
context:
space:
mode:
authorDandan Bi <dandan.bi@intel.com>2016-03-02 16:53:50 +0800
committerFeng Tian <feng.tian@intel.com>2016-03-04 14:04:43 +0800
commit8a45f80edad4e2e1e23118833f92df4320b123ab (patch)
treec23313249c4b14e036bf5950e6cfaa02da966135 /MdeModulePkg/Universal/HiiDatabaseDxe/Image.c
parent89a77e4051f23675ebc1638ad47c91f5c85312d2 (diff)
downloadedk2-8a45f80edad4e2e1e23118833f92df4320b123ab.zip
edk2-8a45f80edad4e2e1e23118833f92df4320b123ab.tar.gz
edk2-8a45f80edad4e2e1e23118833f92df4320b123ab.tar.bz2
MdeModulePkg: Make HII configuration settings available to OS runtime
This feature is aimed to allow OS make use of the HII database during runtime. In this case, the contents of the HII Database is exported to a buffer. The pointer to the buffer is placed in the EFI System Configuration Table, where it can be retrieved by an OS application. Cc: Liming Gao <liming.gao@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Brian J. Johnson <bjohnson@sgi.com> Cc: Andrew Fish <afish@apple.com> Cc: El-Haj-Mahmoud Samer <samer.el-haj-mahmoud@hpe.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
Diffstat (limited to 'MdeModulePkg/Universal/HiiDatabaseDxe/Image.c')
-rw-r--r--MdeModulePkg/Universal/HiiDatabaseDxe/Image.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c
index c46c965..612d57a 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c
@@ -790,6 +790,14 @@ HiiNewImage (
ImageBlock += NewBlockSize;
((EFI_HII_IIBT_END_BLOCK *) (ImageBlock))->Header.BlockType = EFI_HII_IIBT_END;
+ //
+ // Check whether need to get the contents of HiiDataBase.
+ // Only after ReadyToBoot to do the export.
+ //
+ if (gExportAfterReadyToBoot) {
+ HiiGetDatabaseInfo(&Private->HiiDatabase);
+ }
+
return EFI_SUCCESS;
}
@@ -1178,6 +1186,14 @@ HiiSetImage (
ImagePackage->ImagePkgHdr.Header.Length += NewBlockSize - OldBlockSize;
PackageListNode->PackageListHdr.PackageLength += NewBlockSize - OldBlockSize;
+ //
+ // Check whether need to get the contents of HiiDataBase.
+ // Only after ReadyToBoot to do the export.
+ //
+ if (gExportAfterReadyToBoot) {
+ HiiGetDatabaseInfo(&Private->HiiDatabase);
+ }
+
return EFI_SUCCESS;
}