Initialize XTLDR configuration list and check if EFI LoadedImage protocol opened successfully
All checks were successful
Builds / ExectOS (amd64) (push) Successful in 33s
Builds / ExectOS (i686) (push) Successful in 28s

This commit is contained in:
Rafal Kupiec 2023-12-22 22:37:33 +01:00
parent 16a2565ad9
commit 32042ef643
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
3 changed files with 21 additions and 15 deletions

View File

@ -564,7 +564,7 @@ BlpUpdateConfiguration(IN PLIST_ENTRY NewConfig)
/* Make sure config entry does not exist yet */ /* Make sure config entry does not exist yet */
if(BlGetConfigValue(ConfigEntry->Name) == NULL) if(BlGetConfigValue(ConfigEntry->Name) == NULL)
{ {
/* Remove new config entry from input list and put it into global config list */ /* Put new config entry into global config list */
RtlInsertTailList(BlpConfig, &ConfigEntry->Flink); RtlInsertTailList(BlpConfig, &ConfigEntry->Flink);
} }

View File

@ -143,22 +143,28 @@ BlpInitializeEfiBootLoader()
/* Print XTLDR version */ /* Print XTLDR version */
BlConsolePrint(L"XTLDR boot loader v%s\n", XTOS_VERSION); BlConsolePrint(L"XTLDR boot loader v%s\n", XTOS_VERSION);
/* Initialize XTLDR configuration list */
RtlInitializeListHead(BlpConfig);
/* Check if debug is enabled */ /* Check if debug is enabled */
if(DEBUG) if(DEBUG)
{ {
/* Attempt to open EFI LoadedImage protocol */
Status = BlOpenXtProtocol((PVOID *)&LoadedImage, &LipGuid); Status = BlOpenXtProtocol((PVOID *)&LoadedImage, &LipGuid);
if(Status == STATUS_EFI_SUCCESS)
/* Print useful debug information */ {
BlConsolePrint(L"\n---------- BOOTLOADER DEBUG ----------\n" /* Protocol opened successfully, print useful debug information */
L"Pointer Size : %d\n" BlConsolePrint(L"\n---------- BOOTLOADER DEBUG ----------\n"
L"Image Base Address: 0x%lx\n" L"Pointer Size : %d\n"
L"Image Base Size : 0x%lx\n" L"Image Base Address: 0x%lx\n"
L"Image Revision : 0x%lx\n" L"Image Base Size : 0x%lx\n"
L"--------------------------------------\n", L"Image Revision : 0x%lx\n"
sizeof(PVOID), L"--------------------------------------\n",
LoadedImage->ImageBase, sizeof(PVOID),
LoadedImage->ImageSize, LoadedImage->ImageBase,
LoadedImage->Revision); LoadedImage->ImageSize,
BlSleepExecution(5000); LoadedImage->Revision);
BlSleepExecution(3000);
}
} }
} }

View File

@ -10,7 +10,7 @@
/* XT Boot Loader configuration list */ /* XT Boot Loader configuration list */
PLIST_ENTRY BlpConfig = NULL; PLIST_ENTRY BlpConfig;
/* XT Boot Loader loaded configuration */ /* XT Boot Loader loaded configuration */
LIST_ENTRY BlpConfigSections; LIST_ENTRY BlpConfigSections;