Rewrite core of the XTLDR boot loader

Reviewed-on: xt-sys/exectos#7
Reviewed-by: Piotr Likoski <likoski@noreply.codingworkshop.git>
Co-authored-by: Rafal Kupiec <belliash@codingworkshop.eu.org>
Co-committed-by: Rafal Kupiec <belliash@codingworkshop.eu.org>
This commit is contained in:
2024-01-09 18:51:04 +01:00
committed by CodingWorkshop Signing Team
parent 44905bb71d
commit 4412d4fc98
63 changed files with 6282 additions and 2371 deletions

50
xtldr/shell.c Normal file
View File

@@ -0,0 +1,50 @@
/**
* PROJECT: ExectOS
* COPYRIGHT: See COPYING.md in the top level directory
* FILE: xtldr/shell.c
* DESCRIPTION: XT Boot Loader shell
* DEVELOPERS: Rafal Kupiec <belliash@codingworkshop.eu.org>
*/
#include <xtldr.h>
/**
* Starts XTLDR shell.
*
* @return This routine does not return any value.
*
* @since XT 1.0
*/
XTCDECL
VOID
BlStartLoaderShell()
{
/* Initialize console */
BlInitializeConsole();
/* Print prompt */
BlpPrintShellPrompt();
for(;;);
}
/**
* Prints XTLDR shell prompt.
*
* @return This routine does not return any value.
*
* @since XT 1.0
*/
XTCDECL
VOID
BlpPrintShellPrompt()
{
/* Set prompt color */
BlSetConsoleAttributes(EFI_TEXT_BGCOLOR_BLACK | EFI_TEXT_FGCOLOR_YELLOW);
/* Print prompt */
BlConsolePrint(L"XTLDR> ");
/* Reset standard shell colors */
BlSetConsoleAttributes(EFI_TEXT_BGCOLOR_BLACK | EFI_TEXT_FGCOLOR_LIGHTGRAY);
}