49 lines
1.0 KiB
C
49 lines
1.0 KiB
C
/**
|
|
* PROJECT: ExectOS
|
|
* COPYRIGHT: See COPYING.md in the top level directory
|
|
* FILE: xtldr/console.c
|
|
* DESCRIPTION: EFI console support
|
|
* DEVELOPERS: Rafal Kupiec <belliash@codingworkshop.eu.org>
|
|
*/
|
|
|
|
#include <xtbm.h>
|
|
|
|
|
|
/**
|
|
* This routine clears the UEFI console screen.
|
|
*
|
|
* @return This routine does not return any value.
|
|
*
|
|
* @since XT 1.0
|
|
*/
|
|
XTCDECL
|
|
VOID
|
|
BmClearScreen()
|
|
{
|
|
/* Clear screen */
|
|
EfiSystemTable->ConOut->ClearScreen(EfiSystemTable->ConOut);
|
|
}
|
|
|
|
/**
|
|
* This routine initializes the EFI console.
|
|
*
|
|
* @return This routine returns status code.
|
|
*
|
|
* @since XT 1.0
|
|
*/
|
|
XTCDECL
|
|
VOID
|
|
BmInitializeConsole()
|
|
{
|
|
/* Clear console buffers */
|
|
EfiSystemTable->ConIn->Reset(EfiSystemTable->ConIn, TRUE);
|
|
EfiSystemTable->ConOut->Reset(EfiSystemTable->ConOut, TRUE);
|
|
EfiSystemTable->StdErr->Reset(EfiSystemTable->StdErr, TRUE);
|
|
|
|
/* Clear screen */
|
|
BmClearScreen();
|
|
|
|
/* Enable cursor */
|
|
EfiSystemTable->ConOut->EnableCursor(EfiSystemTable->ConOut, TRUE);
|
|
}
|