XTLDR Rewrite #7

Merged
belliash merged 184 commits from xtldr_rewrite into master 2024-01-09 18:51:04 +01:00
2 changed files with 27 additions and 2 deletions
Showing only changes of commit 093ef010c8 - Show all commits

View File

@ -130,9 +130,35 @@ XTCDECL
VOID
BlpInitializeEfiBootLoader()
{
EFI_GUID LipGuid = EFI_LOADED_IMAGE_PROTOCOL_GUID;
PEFI_LOADED_IMAGE_PROTOCOL LoadedImage;
EFI_STATUS Status;
/* Set current XTLDR status */
BlpStatus.BootServices = TRUE;
/* Initialize console */
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;
EfiSystemTable = SystemTable;
/* Initialize XTLDR and early print XTLDR version */
/* Initialize XTLDR and */
BlpInitializeEfiBootLoader();
BlConsolePrint(L"XTLDR boot loader v%s\n", XTOS_VERSION);
/* Parse configuration options passed from UEFI shell */
Status = BlpParseCommandLine();