Store boot loader image information and close EFI_LOADED_IMAGE_PROTOCOL afterwards
This commit is contained in:
parent
8580557985
commit
22a7676b9b
@ -195,6 +195,8 @@ typedef struct _XTBL_STATUS
|
|||||||
PBL_XT_BOOT_MENU BootMenu;
|
PBL_XT_BOOT_MENU BootMenu;
|
||||||
BOOLEAN BootServices;
|
BOOLEAN BootServices;
|
||||||
ULONG DebugPort;
|
ULONG DebugPort;
|
||||||
|
PVOID LoaderBase;
|
||||||
|
ULONGLONG LoaderSize;
|
||||||
INT_PTR SecureBoot;
|
INT_PTR SecureBoot;
|
||||||
CPPORT SerialPort;
|
CPPORT SerialPort;
|
||||||
} XTBL_STATUS, *PXTBL_STATUS;
|
} XTBL_STATUS, *PXTBL_STATUS;
|
||||||
|
@ -42,12 +42,16 @@ BlInitializeBootLoader()
|
|||||||
/* Store SecureBoot status */
|
/* Store SecureBoot status */
|
||||||
BlpStatus.SecureBoot = BlGetSecureBootStatus();
|
BlpStatus.SecureBoot = BlGetSecureBootStatus();
|
||||||
|
|
||||||
/* Check if debug is enabled */
|
/* Attempt to open EFI LoadedImage protocol */
|
||||||
if(DEBUG)
|
Status = BlOpenProtocol(&Handle, (PVOID *)&LoadedImage, &LipGuid);
|
||||||
|
if(Status == STATUS_EFI_SUCCESS)
|
||||||
{
|
{
|
||||||
/* Attempt to open EFI LoadedImage protocol */
|
/* Store boot loader image base and size */
|
||||||
Status = BlOpenProtocol(&Handle, (PVOID *)&LoadedImage, &LipGuid);
|
BlpStatus.LoaderBase = LoadedImage->ImageBase;
|
||||||
if(Status == STATUS_EFI_SUCCESS)
|
BlpStatus.LoaderSize = LoadedImage->ImageSize;
|
||||||
|
|
||||||
|
/* Check if debug is enabled */
|
||||||
|
if(DEBUG)
|
||||||
{
|
{
|
||||||
/* Protocol opened successfully, print useful debug information */
|
/* Protocol opened successfully, print useful debug information */
|
||||||
BlConsolePrint(L"\n---------- BOOTLOADER DEBUG ----------\n"
|
BlConsolePrint(L"\n---------- BOOTLOADER DEBUG ----------\n"
|
||||||
@ -62,6 +66,9 @@ BlInitializeBootLoader()
|
|||||||
LoadedImage->Revision);
|
LoadedImage->Revision);
|
||||||
BlSleepExecution(3000);
|
BlSleepExecution(3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Close EFI LoadedImage protocol */
|
||||||
|
BlCloseProtocol(&Handle, &LipGuid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user