MdeModulePkg: Be more verbose about SecureBoot and the reason why the boot failed
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
This commit is contained in:
committed by
Tim Crawford
parent
10cbbe06d3
commit
9657bbe08f
@@ -1781,6 +1781,7 @@ EfiBootManagerBoot (
|
||||
EFI_EVENT LegacyBootEvent;
|
||||
EFI_INPUT_KEY Key;
|
||||
UINTN Index;
|
||||
UINT8 *SecureBoot;
|
||||
|
||||
if (BootOption == NULL) {
|
||||
return;
|
||||
@@ -1920,6 +1921,21 @@ EfiBootManagerBoot (
|
||||
if (gST->ConOut != NULL) {
|
||||
gST->ConOut->ClearScreen (gST->ConOut);
|
||||
|
||||
//
|
||||
// When UEFI Secure Boot is enabled, unsigned modules won't load.
|
||||
//
|
||||
SecureBoot = NULL;
|
||||
GetEfiGlobalVariable2 (EFI_SECURE_BOOT_MODE_NAME, (VOID**)&SecureBoot, NULL);
|
||||
if ((SecureBoot != NULL) && (*SecureBoot == SECURE_BOOT_MODE_ENABLE)) {
|
||||
AsciiPrint ("SecureBoot is enabled.\n");
|
||||
} else {
|
||||
AsciiPrint ("SecureBoot is disabled.\n");
|
||||
}
|
||||
|
||||
if (SecureBoot != NULL) {
|
||||
FreePool (SecureBoot);
|
||||
}
|
||||
|
||||
AsciiPrint (
|
||||
"Booting from '%s' failed; verify it contains a 64-bit UEFI OS.\n"
|
||||
"\nPress any key to continue booting...\n",
|
||||
|
@@ -44,6 +44,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
#include <Protocol/DeferredImageLoad.h>
|
||||
#include <Protocol/PlatformBootManager.h>
|
||||
|
||||
#include <Guid/ImageAuthentication.h>
|
||||
#include <Guid/MemoryTypeInformation.h>
|
||||
#include <Guid/FileInfo.h>
|
||||
#include <Guid/GlobalVariable.h>
|
||||
|
Reference in New Issue
Block a user