From 1b310e46f8da8da73a6e662e8535239411d724e1 Mon Sep 17 00:00:00 2001 From: belliash Date: Mon, 17 Oct 2022 22:35:27 +0200 Subject: [PATCH] Print firmware information, not only secure boot status --- xtldr/xtldr.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/xtldr/xtldr.c b/xtldr/xtldr.c index 25eb042..74d85b3 100644 --- a/xtldr/xtldr.c +++ b/xtldr/xtldr.c @@ -302,6 +302,14 @@ BlStartXtLoader(IN EFI_HANDLE ImageHandle, BlEfiPrint(L"ERROR: Failed to initialize serial console\n"); } + /* Check SecureBoot status */ + EfiSecureBoot = BlEfiGetSecureBootStatus(); + + /* Print firmware information */ + BlDbgPrint(L"UEFI v%d.%d (%S 0x%08x), SecureBoot %S\n", EfiSystemTable->Hdr.Revision >> 16, + EfiSystemTable->Hdr.Revision & 0xFFFF, EfiSystemTable->FirmwareVendor, EfiSystemTable->FirmwareRevision, + EfiSecureBoot == 0 ? L"DISABLED" : EfiSecureBoot > 0 ? L"ENABLED" : L"SETUP"); + /* Disable watchdog timer */ Status = EfiSystemTable->BootServices->SetWatchdogTimer(0, 0x10000, 0, NULL); if(Status != STATUS_EFI_SUCCESS) @@ -310,10 +318,6 @@ BlStartXtLoader(IN EFI_HANDLE ImageHandle, BlDbgPrint(L"WARNING: Failed to disable watchdog timer\n"); } - /* Check SecureBoot status */ - EfiSecureBoot = BlEfiGetSecureBootStatus(); - BlDbgPrint(L"SecureBoot status: %S\n", EfiSecureBoot == 0 ? L"DISABLED" : EfiSecureBoot > 0 ? L"ENABLED" : L"SETUP"); - /* Register loader protocol */ Status = BlRegisterXtLoaderProtocol(); if(Status != STATUS_EFI_SUCCESS)