1. Set the secure boot state to Standard Mode when user leaving secure boot setup page.
2. Add “Current SecureBoot State” field to reflect current secure boot status of the platform. Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Dong Guo <guo.dong@intel.com> Reviewed-by: Yao Jiewen <jiewen.yao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14042 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -356,30 +356,23 @@ AutenticatedVariableServiceInitialize (
|
||||
DEBUG ((EFI_D_INFO, "Variable %s is %x\n", EFI_SECURE_BOOT_ENABLE_NAME, SecureBootEnable));
|
||||
|
||||
//
|
||||
// Check "CustomMode" variable's existence.
|
||||
// Initialize "CustomMode" in STANDARD_SECURE_BOOT_MODE state.
|
||||
//
|
||||
FindVariable (EFI_CUSTOM_MODE_NAME, &gEfiCustomModeEnableGuid, &Variable, &mVariableModuleGlobal->VariableGlobal, FALSE);
|
||||
if (Variable.CurrPtr != NULL) {
|
||||
CustomMode = *(GetVariableDataPtr (Variable.CurrPtr));
|
||||
} else {
|
||||
//
|
||||
// "CustomMode" not exist, initialize it in STANDARD_SECURE_BOOT_MODE.
|
||||
//
|
||||
CustomMode = STANDARD_SECURE_BOOT_MODE;
|
||||
Status = UpdateVariable (
|
||||
EFI_CUSTOM_MODE_NAME,
|
||||
&gEfiCustomModeEnableGuid,
|
||||
&CustomMode,
|
||||
sizeof (UINT8),
|
||||
EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,
|
||||
0,
|
||||
0,
|
||||
&Variable,
|
||||
NULL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
CustomMode = STANDARD_SECURE_BOOT_MODE;
|
||||
Status = UpdateVariable (
|
||||
EFI_CUSTOM_MODE_NAME,
|
||||
&gEfiCustomModeEnableGuid,
|
||||
&CustomMode,
|
||||
sizeof (UINT8),
|
||||
EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,
|
||||
0,
|
||||
0,
|
||||
&Variable,
|
||||
NULL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
DEBUG ((EFI_D_INFO, "Variable %s is %x\n", EFI_CUSTOM_MODE_NAME, CustomMode));
|
||||
|
Reference in New Issue
Block a user