summaryrefslogtreecommitdiffstats
path: root/memtestEDK
diff options
context:
space:
mode:
authorRegina König2020-08-04 00:04:50 +0200
committerRegina König2020-08-04 00:04:50 +0200
commitd814cd16b8c5c1c0d9e2837eae5364085eaba833 (patch)
treebd4f4df3fc4df313caede2c9ae8012ac719c53c0 /memtestEDK
parentmoving display function to bios/ or efi/ respectively (diff)
downloadmemtest86-d814cd16b8c5c1c0d9e2837eae5364085eaba833.tar.gz
memtest86-d814cd16b8c5c1c0d9e2837eae5364085eaba833.tar.xz
memtest86-d814cd16b8c5c1c0d9e2837eae5364085eaba833.zip
TextOutput.c set foreground/background color, clears screen and sets display mode
Diffstat (limited to 'memtestEDK')
-rw-r--r--memtestEDK/Memtest/GraphicsOutput/TextOutput.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/memtestEDK/Memtest/GraphicsOutput/TextOutput.c b/memtestEDK/Memtest/GraphicsOutput/TextOutput.c
index 2438786..31c6066 100644
--- a/memtestEDK/Memtest/GraphicsOutput/TextOutput.c
+++ b/memtestEDK/Memtest/GraphicsOutput/TextOutput.c
@@ -5,6 +5,8 @@
#include <Library/UefiLib.h>
#include <Library/UefiApplicationEntryPoint.h>
+EFI_STATUS efiStatus = EFI_SUCCESS;
+
EFI_STATUS
EFIAPI
UefiMain (
@@ -14,8 +16,26 @@ UefiMain (
{
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *Console = SystemTable->ConOut;
+ efiStatus = Console->SetAttribute(Console, EFI_TEXT_ATTR(EFI_BLACK, EFI_GREEN));
Console->ClearScreen(Console);
- while(1) {}
+
+ Print(L"Status after SetAttribute(): %r\n", efiStatus);
+
+ for (UINTN mode = 0; mode < 5; mode++) {
+ UINTN *columns;
+ UINTN *rows;
+ efiStatus = Console->QueryMode(Console, mode, columns, rows);
+ Print(L"Status: %r\n", efiStatus);
+ Print(L"Mode: %d has %d columns and %d rows\n", mode, *columns, *rows);
+ }
+
+ CHAR16 test[2] = {0x2191, '\n'};
+ efiStatus = Console->OutputString(Console, test);
+ Print(L"efiStatus: %r\n", efiStatus);
+
+ //Console->SetMode(Console, 2);
+
+ // while(1) {}
return EFI_SUCCESS;
} \ No newline at end of file