Skip to content

Commit

Permalink
SecureBootConfigDxe/SecureBootConfigImpl.c: add default for SB state
Browse files Browse the repository at this point in the history
Fixes an issue where the setting would not be restored to the default
value on pressing F9.

Signed-off-by: Michał Kopeć <[email protected]>
  • Loading branch information
mkopec committed Nov 9, 2023
1 parent 228b32e commit f32f651
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5010,7 +5010,8 @@ SecureBootCallback (
break;
}
} else if (Action == EFI_BROWSER_ACTION_DEFAULT_STANDARD) {
if (QuestionId == KEY_HIDE_SECURE_BOOT) {
switch (QuestionId) {
case KEY_HIDE_SECURE_BOOT: {
GetVariable2 (EFI_PLATFORM_KEY_NAME, &gEfiGlobalVariableGuid, (VOID**)&Pk, NULL);
if (Pk == NULL) {
IfrNvData->HideSecureBoot = TRUE;
Expand All @@ -5019,6 +5020,14 @@ SecureBootCallback (
IfrNvData->HideSecureBoot = FALSE;
}
Value->b = IfrNvData->HideSecureBoot;
break;
}
case KEY_SECURE_BOOT_ENABLE: {
Value->u8 = FixedPcdGet8 (PcdSecureBootDefaultEnable);
break;
}
default:
break;
}
} else if (Action == EFI_BROWSER_ACTION_FORM_CLOSE) {
//
Expand Down

0 comments on commit f32f651

Please sign in to comment.