Skip to content

Commit

Permalink
AuthVariableLib: Set SB to enabled during transition to USER_MODE
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
  • Loading branch information
miczyg1 committed Jul 11, 2024
1 parent d130aec commit df5a2b0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,13 @@ AuthVariableLibInitialize (
}
} else if (mPlatformMode == USER_MODE) {
//
// "SecureBootEnable" not exist, initialize it in USER_MODE.
// "SecureBootEnable" not exist, initialize it in USER_MODE. Can't use
// PcdSecureBootDefaultEnable here, because it will prevent enabling
// Secure Boot from OS when transitioning from SETUP_MODE to USER_MODE.
// PcdSecureBootDefaultEnable is used when settings are reset in UI and in
// the SecureBootDefaultKeysDxe where the default keys are being restored.
//
SecureBootEnable = FixedPcdGet8 (PcdSecureBootDefaultEnable);
SecureBootEnable = SECURE_BOOT_ENABLE;
Status = AuthServiceInternalUpdateVariable (
EFI_SECURE_BOOT_ENABLE_NAME,
&gEfiSecureBootEnableDisableGuid,
Expand Down

0 comments on commit df5a2b0

Please sign in to comment.