Store boot loader image information and close EFI_LOADED_IMAGE_PROTOCOL afterwards
Some checks failed
Builds / ExectOS (amd64) (push) Failing after 15s
Builds / ExectOS (i686) (push) Failing after 15s

This commit is contained in:
Rafal Kupiec 2024-01-22 15:11:56 +01:00
parent 8580557985
commit 22a7676b9b
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
2 changed files with 14 additions and 5 deletions

View File

@ -195,6 +195,8 @@ typedef struct _XTBL_STATUS
PBL_XT_BOOT_MENU BootMenu;
BOOLEAN BootServices;
ULONG DebugPort;
PVOID LoaderBase;
ULONGLONG LoaderSize;
INT_PTR SecureBoot;
CPPORT SerialPort;
} XTBL_STATUS, *PXTBL_STATUS;

View File

@ -42,12 +42,16 @@ BlInitializeBootLoader()
/* Store SecureBoot status */
BlpStatus.SecureBoot = BlGetSecureBootStatus();
/* Check if debug is enabled */
if(DEBUG)
{
/* Attempt to open EFI LoadedImage protocol */
Status = BlOpenProtocol(&Handle, (PVOID *)&LoadedImage, &LipGuid);
if(Status == STATUS_EFI_SUCCESS)
{
/* Store boot loader image base and size */
BlpStatus.LoaderBase = LoadedImage->ImageBase;
BlpStatus.LoaderSize = LoadedImage->ImageSize;
/* Check if debug is enabled */
if(DEBUG)
{
/* Protocol opened successfully, print useful debug information */
BlConsolePrint(L"\n---------- BOOTLOADER DEBUG ----------\n"
@ -62,6 +66,9 @@ BlInitializeBootLoader()
LoadedImage->Revision);
BlSleepExecution(3000);
}
/* Close EFI LoadedImage protocol */
BlCloseProtocol(&Handle, &LipGuid);
}
}