Add more debugging
All checks were successful
Builds / ExectOS (amd64) (push) Successful in 32s
Builds / ExectOS (i686) (push) Successful in 29s

This commit is contained in:
Rafal Kupiec 2023-12-20 15:54:11 +01:00
parent a7c345a9b2
commit 093ef010c8
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
2 changed files with 27 additions and 2 deletions

View File

@ -130,9 +130,35 @@ XTCDECL
VOID VOID
BlpInitializeEfiBootLoader() BlpInitializeEfiBootLoader()
{ {
EFI_GUID LipGuid = EFI_LOADED_IMAGE_PROTOCOL_GUID;
PEFI_LOADED_IMAGE_PROTOCOL LoadedImage;
EFI_STATUS Status;
/* Set current XTLDR status */ /* Set current XTLDR status */
BlpStatus.BootServices = TRUE; BlpStatus.BootServices = TRUE;
/* Initialize console */ /* Initialize console */
BlpInitializeConsole(); BlpInitializeConsole();
/* Print XTLDR version */
BlConsolePrint(L"XTLDR boot loader v%s\n", XTOS_VERSION);
/* Check if debug is enabled */
if(DEBUG)
{
Status = BlOpenXtProtocol((PVOID *)&LoadedImage, &LipGuid);
/* Print useful debug information */
BlConsolePrint(L"\n---------- BOOTLOADER DEBUG ----------\n"
L"Pointer Size : %d\n"
L"Image Base Address: 0x%lx\n"
L"Image Base Size : 0x%lx\n"
L"Image Revision : 0x%lx\n"
L"--------------------------------------\n",
sizeof(PVOID),
LoadedImage->ImageBase,
LoadedImage->ImageSize,
LoadedImage->Revision);
BlSleepExecution(5000);
}
} }

View File

@ -124,9 +124,8 @@ BlStartXtLoader(IN EFI_HANDLE ImageHandle,
EfiImageHandle = ImageHandle; EfiImageHandle = ImageHandle;
EfiSystemTable = SystemTable; EfiSystemTable = SystemTable;
/* Initialize XTLDR and early print XTLDR version */ /* Initialize XTLDR and */
BlpInitializeEfiBootLoader(); BlpInitializeEfiBootLoader();
BlConsolePrint(L"XTLDR boot loader v%s\n", XTOS_VERSION);
/* Parse configuration options passed from UEFI shell */ /* Parse configuration options passed from UEFI shell */
Status = BlpParseCommandLine(); Status = BlpParseCommandLine();