EFI_STRING gRTConfigRespBuffer = NULL;\r
UINTN gDatabaseInfoSize = 0;\r
UINTN gConfigRespSize = 0;\r
+BOOLEAN gExportConfigResp = TRUE;\r
\r
/**\r
This function generates a HII_DATABASE_RECORD node and adds into hii database.\r
PackageList->PackageListHdr.PackageLength -= Package->FormPkgHdr.Length;\r
FreePool (Package->IfrData);\r
FreePool (Package);\r
-\r
+ //\r
+ // If Hii runtime support feature is enabled,\r
+ // will export Hii info for runtime use after ReadyToBoot event triggered.\r
+ // If some driver add/update/remove packages from HiiDatabase after ReadyToBoot,\r
+ // will need to export the content of HiiDatabase.\r
+ // But if form packages removed, also need to export the ConfigResp string\r
+ //\r
+ if (gExportAfterReadyToBoot) {\r
+ gExportConfigResp = TRUE;\r
+ }\r
}\r
\r
return EFI_SUCCESS;\r
(UINT8) (PackageHeader.Type),\r
DatabaseRecord->Handle\r
);\r
+ //\r
+ // If Hii runtime support feature is enabled,\r
+ // will export Hii info for runtime use after ReadyToBoot event triggered.\r
+ // If some driver add/update/remove packages from HiiDatabase after ReadyToBoot,\r
+ // will need to export the content of HiiDatabase.\r
+ // But if form packages added/updated, also need to export the ConfigResp string.\r
+ //\r
+ if (gExportAfterReadyToBoot) {\r
+ gExportConfigResp = TRUE;\r
+ }\r
break;\r
case EFI_HII_PACKAGE_KEYBOARD_LAYOUT:\r
Status = InsertKeyboardLayoutPackage (\r
}\r
\r
/**\r
-This is an internal function,mainly use to get and update configuration settings information.\r
+This function mainly use to get and update ConfigResp string.\r
\r
@param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance.\r
\r
\r
**/\r
EFI_STATUS\r
-HiiGetConfigurationSetting(\r
+HiiGetConfigRespInfo(\r
IN CONST EFI_HII_DATABASE_PROTOCOL *This\r
)\r
{\r
\r
Private = HII_DATABASE_DATABASE_PRIVATE_DATA_FROM_THIS (This);\r
\r
- //\r
- // Get the HiiDatabase info.\r
- //\r
- HiiGetDatabaseInfo(This);\r
-\r
//\r
// Get ConfigResp string\r
//\r
\r
}\r
\r
+/**\r
+This function mainly use to get and update configuration settings information.\r
+\r
+@param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance.\r
+\r
+@retval EFI_SUCCESS Get the information successfully.\r
+@retval EFI_OUT_OF_RESOURCES Not enough memory to store the Configuration Setting data.\r
+\r
+**/\r
+EFI_STATUS\r
+HiiGetConfigurationSetting(\r
+ IN CONST EFI_HII_DATABASE_PROTOCOL *This\r
+ )\r
+{\r
+ EFI_STATUS Status;\r
+\r
+ //\r
+ // Get the HiiDatabase info.\r
+ //\r
+ Status = HiiGetDatabaseInfo(This);\r
+\r
+ //\r
+ // Get ConfigResp string\r
+ //\r
+ if (gExportConfigResp) {\r
+ Status = HiiGetConfigRespInfo (This);\r
+ gExportConfigResp = FALSE;\r
+ }\r
+ return Status;\r
+\r
+}\r
+\r
+\r
/**\r
This function adds the packages in the package list to the database and returns a handle. If there is a\r
EFI_DEVICE_PATH_PROTOCOL associated with the DriverHandle, then this function will\r