XTLDR Rewrite #7
@ -138,6 +138,36 @@ BlConsoleWrite(IN PUSHORT String)
|
|||||||
EfiSystemTable->ConOut->OutputString(EfiSystemTable->ConOut, String);
|
EfiSystemTable->ConOut->OutputString(EfiSystemTable->ConOut, String);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This routine initializes the EFI console.
|
||||||
|
*
|
||||||
|
* @return This routine returns status code.
|
||||||
|
*
|
||||||
|
* @since XT 1.0
|
||||||
|
*/
|
||||||
|
XTCDECL
|
||||||
|
VOID
|
||||||
|
BlInitializeConsole()
|
||||||
|
{
|
||||||
|
/* Clear console buffers */
|
||||||
|
EfiSystemTable->ConIn->Reset(EfiSystemTable->ConIn, TRUE);
|
||||||
|
EfiSystemTable->ConOut->Reset(EfiSystemTable->ConOut, TRUE);
|
||||||
|
EfiSystemTable->StdErr->Reset(EfiSystemTable->StdErr, TRUE);
|
||||||
|
|
||||||
|
/* Make sure that current console mode is 80x25 characters, as some broken EFI implementations might
|
||||||
|
* set different mode that do not fit on the screen, causing a text to be displayed offscreen */
|
||||||
|
if(EfiSystemTable->ConOut->Mode->Mode != 0)
|
||||||
|
{
|
||||||
|
/* Set console mode to 0, which is standard, 80x25 text mode */
|
||||||
|
BlSetConsoleMode(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Clear screen and enable cursor */
|
||||||
|
BlSetConsoleAttributes(EFI_TEXT_BGCOLOR_BLACK | EFI_TEXT_FGCOLOR_LIGHTGRAY);
|
||||||
|
BlClearConsoleScreen();
|
||||||
|
BlEnableConsoleCursor();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Queries information concerning the output device’s supported text mode.
|
* Queries information concerning the output device’s supported text mode.
|
||||||
*
|
*
|
||||||
@ -266,32 +296,3 @@ BlpConsolePrintChar(IN USHORT Character)
|
|||||||
Buffer[1] = 0;
|
Buffer[1] = 0;
|
||||||
EfiSystemTable->ConOut->OutputString(EfiSystemTable->ConOut, Buffer);
|
EfiSystemTable->ConOut->OutputString(EfiSystemTable->ConOut, Buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This routine initializes the EFI console.
|
|
||||||
*
|
|
||||||
* @return This routine returns status code.
|
|
||||||
*
|
|
||||||
* @since XT 1.0
|
|
||||||
*/
|
|
||||||
XTCDECL
|
|
||||||
VOID
|
|
||||||
BlpInitializeConsole()
|
|
||||||
{
|
|
||||||
/* Clear console buffers */
|
|
||||||
EfiSystemTable->ConIn->Reset(EfiSystemTable->ConIn, TRUE);
|
|
||||||
EfiSystemTable->ConOut->Reset(EfiSystemTable->ConOut, TRUE);
|
|
||||||
EfiSystemTable->StdErr->Reset(EfiSystemTable->StdErr, TRUE);
|
|
||||||
|
|
||||||
/* Make sure that current console mode is 80x25 characters, as some broken EFI implementations might
|
|
||||||
* set different mode that do not fit on the screen, causing a text to be displayed offscreen */
|
|
||||||
if(EfiSystemTable->ConOut->Mode->Mode != 0)
|
|
||||||
{
|
|
||||||
/* Set console mode to 0, which is standard, 80x25 text mode */
|
|
||||||
BlSetConsoleMode(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Clear screen and enable cursor */
|
|
||||||
BlClearConsoleScreen();
|
|
||||||
BlEnableConsoleCursor();
|
|
||||||
}
|
|
||||||
|
@ -131,6 +131,10 @@ BlInitializeBootMenuList(OUT PXTBL_BOOTMENU_ITEM MenuEntries,
|
|||||||
OUT PULONG EntriesCount,
|
OUT PULONG EntriesCount,
|
||||||
OUT PULONG DefaultId);
|
OUT PULONG DefaultId);
|
||||||
|
|
||||||
|
XTCDECL
|
||||||
|
VOID
|
||||||
|
BlInitializeConsole();
|
||||||
|
|
||||||
XTCDECL
|
XTCDECL
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
BlInvokeBootProtocol(IN PLIST_ENTRY OptionsList);
|
BlInvokeBootProtocol(IN PLIST_ENTRY OptionsList);
|
||||||
@ -254,10 +258,6 @@ XTCDECL
|
|||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
BlpActivateSerialIOController();
|
BlpActivateSerialIOController();
|
||||||
|
|
||||||
XTCDECL
|
|
||||||
VOID
|
|
||||||
BlpInitializeConsole();
|
|
||||||
|
|
||||||
XTCDECL
|
XTCDECL
|
||||||
VOID
|
VOID
|
||||||
BlpConsolePrintChar(IN USHORT Character);
|
BlpConsolePrintChar(IN USHORT Character);
|
||||||
|
@ -28,7 +28,7 @@ BlInitializeBootLoader()
|
|||||||
BlpStatus.BootServices = TRUE;
|
BlpStatus.BootServices = TRUE;
|
||||||
|
|
||||||
/* Initialize console */
|
/* Initialize console */
|
||||||
BlpInitializeConsole();
|
BlInitializeConsole();
|
||||||
|
|
||||||
/* 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);
|
||||||
|
Loading…
Reference in New Issue
Block a user