exectos/xtldr2/xtldr.c
Rafal Kupiec 5131a682b8
All checks were successful
Builds / ExectOS (amd64) (push) Successful in 25s
Builds / ExectOS (i686) (push) Successful in 24s
Refactor part 5; Implement debugging ports
2023-12-03 23:18:49 +01:00

61 lines
1.5 KiB
C

/**
* PROJECT: ExectOS
* COPYRIGHT: See COPYING.md in the top level directory
* FILE: xtldr/xtldr.c
* DESCRIPTION: XTOS UEFI Boot Loader
* DEVELOPERS: Rafal Kupiec <belliash@codingworkshop.eu.org>
*/
#include <xtldr.h>
/**
* This routine is the entry point of the XT EFI boot loader.
*
* @param ImageHandle
* Firmware-allocated handle that identifies the image.
*
* @param SystemTable
* Provides the EFI system table.
*
* @return This routine returns status code.
*
* @since XT 1.0
*/
XTCDECL
EFI_STATUS
BlStartXtLoader(IN EFI_HANDLE ImageHandle,
IN PEFI_SYSTEM_TABLE SystemTable)
{
EFI_STATUS Status;
/* Set the system table and image handle */
EfiImageHandle = ImageHandle;
EfiSystemTable = SystemTable;
/* Initialize UEFI console and early print XTLDR version */
BlpConsoleInitialize();
BlConsolePrint(L"XTLDR boot loader v%s\n", XTOS_VERSION);
/* Parse configuration options passed from UEFI shell */
BlpConfigParseCommandLine();
/* Attempt to early initialize debug console */
if(DEBUG)
{
Status = BlpDebugInitializeConsole();
if(Status != STATUS_EFI_SUCCESS)
{
/* Initialization failed, notify user on stdout */
BlConsolePrint(L"ERROR: Failed to initialize debug console\n");
BlSleepExecution(3000);
}
}
/* Temporary infinite loop */
for(;;);
/* This point should be never reached, if this happen return error code */
return STATUS_EFI_LOAD_ERROR;
}