OUT EFI_STRING *Progress\r
)\r
{\r
+ UINT8 *SecureBootEnable;\r
+ SECUREBOOT_CONFIGURATION IfrNvData;\r
+ UINTN BufferSize;\r
+ EFI_STATUS Status;\r
+ \r
if (Configuration == NULL || Progress == NULL) {\r
return EFI_INVALID_PARAMETER;\r
}\r
return EFI_NOT_FOUND;\r
}\r
\r
+ BufferSize = sizeof (SECUREBOOT_CONFIGURATION);\r
+ Status = gHiiConfigRouting->ConfigToBlock (\r
+ gHiiConfigRouting,\r
+ Configuration,\r
+ (UINT8 *)&IfrNvData,\r
+ &BufferSize,\r
+ Progress\r
+ );\r
+ if (EFI_ERROR (Status)) {\r
+ return Status;\r
+ }\r
+\r
+ //\r
+ // Store Buffer Storage back to EFI variable if needed\r
+ //\r
+ SecureBootEnable = NULL;\r
+ GetVariable2 (EFI_SECURE_BOOT_ENABLE_NAME, &gEfiSecureBootEnableDisableGuid, (VOID**)&SecureBootEnable, NULL);\r
+ if (NULL != SecureBootEnable) {\r
+ FreePool (SecureBootEnable);\r
+ Status = SaveSecureBootVariable (IfrNvData.AttemptSecureBoot);\r
+ if (EFI_ERROR (Status)) {\r
+ return Status;\r
+ }\r
+ }\r
+\r
*Progress = Configuration + StrLen (Configuration);\r
return EFI_SUCCESS;\r
}\r
\r
if ((Action != EFI_BROWSER_ACTION_CHANGED) &&\r
(Action != EFI_BROWSER_ACTION_CHANGING) &&\r
- (Action != EFI_BROWSER_ACTION_FORM_CLOSE)) {\r
+ (Action != EFI_BROWSER_ACTION_FORM_CLOSE) &&\r
+ (Action != EFI_BROWSER_ACTION_DEFAULT_STANDARD)) {\r
return EFI_UNSUPPORTED;\r
}\r
\r
}\r
break; \r
}\r
+ } else if (Action == EFI_BROWSER_ACTION_DEFAULT_STANDARD) {\r
+ if (QuestionId == KEY_HIDE_SECURE_BOOT) {\r
+ GetVariable2 (EFI_SECURE_BOOT_ENABLE_NAME, &gEfiSecureBootEnableDisableGuid, (VOID**)&SecureBootEnable, NULL);\r
+ if (SecureBootEnable == NULL) {\r
+ IfrNvData->HideSecureBoot = TRUE;\r
+ } else {\r
+ FreePool (SecureBootEnable);\r
+ IfrNvData->HideSecureBoot = FALSE;\r
+ }\r
+ Value->b = IfrNvData->HideSecureBoot;\r
+ }\r
} else if (Action == EFI_BROWSER_ACTION_FORM_CLOSE) {\r
//\r
// Force the platform back to Standard Mode once user leave the setup screen.\r