From ea06286a8bbda2cb30d302fade1907ef10aba79d Mon Sep 17 00:00:00 2001 From: Rafal Kupiec Date: Sat, 30 Dec 2023 10:31:28 +0100 Subject: [PATCH] Store SecureBoot status --- sdk/xtdk/bltypes.h | 1 + xtldr2/efiutils.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/sdk/xtdk/bltypes.h b/sdk/xtdk/bltypes.h index f42ffc9..d3cb9aa 100644 --- a/sdk/xtdk/bltypes.h +++ b/sdk/xtdk/bltypes.h @@ -183,6 +183,7 @@ typedef struct _XTBL_STATUS PBL_XT_BOOT_MENU BootMenu; BOOLEAN BootServices; ULONG DebugPort; + INT_PTR SecureBoot; CPPORT SerialPort; } XTBL_STATUS, *PXTBL_STATUS; diff --git a/xtldr2/efiutils.c b/xtldr2/efiutils.c index 6d2e866..a41b5a5 100644 --- a/xtldr2/efiutils.c +++ b/xtldr2/efiutils.c @@ -147,6 +147,9 @@ BlpInitializeEfiBootLoader() RtlInitializeListHead(&BlpConfig); RtlInitializeListHead(&BlpLoadedModules); + /* Store SecureBoot status */ + BlpStatus.SecureBoot = BlGetSecureBootStatus(); + /* Check if debug is enabled */ if(DEBUG) {