Implement BlConsoleWrite() routine
All checks were successful
Builds / ExectOS (amd64) (push) Successful in 30s
Builds / ExectOS (i686) (push) Successful in 24s

This commit is contained in:
Rafal Kupiec 2023-12-11 16:58:08 +01:00
parent 0cea10ad42
commit 02cc0cd522
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
4 changed files with 24 additions and 0 deletions

View File

@ -36,6 +36,7 @@ typedef VOID (*PBL_CONSOLE_CLEAR_SCREEN)();
typedef VOID (*PBL_CONSOLE_DISABLE_CURSOR)(); typedef VOID (*PBL_CONSOLE_DISABLE_CURSOR)();
typedef VOID (*PBL_CONSOLE_ENABLE_CURSOR)(); typedef VOID (*PBL_CONSOLE_ENABLE_CURSOR)();
typedef VOID (*PBL_CONSOLE_PRINT)(IN PUINT16 Format, IN ...); typedef VOID (*PBL_CONSOLE_PRINT)(IN PUINT16 Format, IN ...);
typedef VOID (*PBL_CONSOLE_WRITE)(IN PUSHORT String);
typedef VOID (*PBL_DEBUG_PRINT)(IN PUINT16 Format, IN ...); typedef VOID (*PBL_DEBUG_PRINT)(IN PUINT16 Format, IN ...);
typedef EFI_STATUS (*PBL_EXIT_BOOT_SERVICES)(IN UINT_PTR MapKey); typedef EFI_STATUS (*PBL_EXIT_BOOT_SERVICES)(IN UINT_PTR MapKey);
typedef EFI_STATUS (*PBL_FREE_PAGES)(IN UINT64 Size, IN EFI_PHYSICAL_ADDRESS Memory); typedef EFI_STATUS (*PBL_FREE_PAGES)(IN UINT64 Size, IN EFI_PHYSICAL_ADDRESS Memory);
@ -77,6 +78,7 @@ typedef struct _XTBL_LOADER_PROTOCOL
PBL_CONSOLE_CLEAR_SCREEN ClearScreen; PBL_CONSOLE_CLEAR_SCREEN ClearScreen;
PBL_CONSOLE_DISABLE_CURSOR DisableCursor; PBL_CONSOLE_DISABLE_CURSOR DisableCursor;
PBL_CONSOLE_ENABLE_CURSOR EnableCursor; PBL_CONSOLE_ENABLE_CURSOR EnableCursor;
PBL_CONSOLE_WRITE Write;
PBL_CONSOLE_PRINT Print; PBL_CONSOLE_PRINT Print;
} Console; } Console;
struct struct

View File

@ -93,6 +93,23 @@ BlConsolePrint(IN PUINT16 Format,
VA_END(Arguments); VA_END(Arguments);
} }
/**
* Displays the string on the device at the current cursor location.
*
* @param String
* The string to be displayed.
*
* @return This routine does not return any value.
*
* @since XT 1.0
*/
XTCDECL
VOID
BlConsoleWrite(IN PUSHORT String)
{
EfiSystemTable->ConOut->OutputString(EfiSystemTable->ConOut, String);
}
/** /**
* This routine initializes the EFI console. * This routine initializes the EFI console.
* *

View File

@ -37,6 +37,10 @@ VOID
BlConsolePrint(IN PUINT16 Format, BlConsolePrint(IN PUINT16 Format,
IN ...); IN ...);
XTCDECL
VOID
BlConsoleWrite(IN PUSHORT String);
XTCDECL XTCDECL
VOID VOID
BlDebugPrint(IN PUINT16 Format, BlDebugPrint(IN PUINT16 Format,

View File

@ -94,6 +94,7 @@ BlpRegisterXtLoaderProtocol()
LdrProtocol.Console.DisableCursor = BlConsoleDisableCursor; LdrProtocol.Console.DisableCursor = BlConsoleDisableCursor;
LdrProtocol.Console.EnableCursor = BlConsoleEnableCursor; LdrProtocol.Console.EnableCursor = BlConsoleEnableCursor;
LdrProtocol.Console.Print = BlConsolePrint; LdrProtocol.Console.Print = BlConsolePrint;
LdrProtocol.Console.Write = BlConsoleWrite;
LdrProtocol.Debug.Print = BlDebugPrint; LdrProtocol.Debug.Print = BlDebugPrint;
LdrProtocol.Disk.CloseVolume = BlCloseVolume; LdrProtocol.Disk.CloseVolume = BlCloseVolume;
LdrProtocol.Disk.OpenVolume = BlOpenVolume; LdrProtocol.Disk.OpenVolume = BlOpenVolume;