[PATCH 7/8] efi_selftest: Add box drawing character selftest

Andre Przywara andre.przywara at arm.com
Mon Jan 10 01:56:37 CET 2022


UEFI applications rely on Unicode output capability, and might use that
for drawing pseudo-graphical interfaces using Unicode defined box
drawing characters.

Add a simple test to display the most basic box characters, which would
need to be checked manually on the screen for correctness.
To facilitate this, add a three second delay after the output at this
point.

Signed-off-by: Andre Przywara <andre.przywara at arm.com>
---
 lib/efi_selftest/efi_selftest_textoutput.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/lib/efi_selftest/efi_selftest_textoutput.c b/lib/efi_selftest/efi_selftest_textoutput.c
index a437732496b..1542c187de7 100644
--- a/lib/efi_selftest/efi_selftest_textoutput.c
+++ b/lib/efi_selftest/efi_selftest_textoutput.c
@@ -123,6 +123,17 @@ static int execute(void)
 		efi_st_error("OutputString failed for international chars\n");
 		return EFI_ST_FAILURE;
 	}
+	ret  = con_out->output_string(con_out, L"┌─┬─┐\n");
+	ret |= con_out->output_string(con_out, L"│ │ │\n");
+	ret |= con_out->output_string(con_out, L"├─┼─┤\n");
+	ret |= con_out->output_string(con_out, L"│ │ │\n");
+	ret |= con_out->output_string(con_out, L"└─┴─┘\n");
+	if (ret != EFI_ST_SUCCESS) {
+		efi_st_error("OutputString failed for box drawing chars\n");
+		return EFI_ST_FAILURE;
+	}
+	con_out->output_string(con_out, L"waiting for admiration...\n");
+	EFI_CALL(systab.boottime->stall(3000000));
 	efi_st_printf("\n");
 
 	return EFI_ST_SUCCESS;
-- 
2.17.6



More information about the U-Boot mailing list