From 49d2b0a8472ffb301281ab9421c6f30e6c0812d8 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Sat, 4 Feb 2023 19:19:37 +0000 Subject: [PATCH] x86_64: make vgacon clear the display on init --- arch/x86_64/vgacon.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/x86_64/vgacon.c b/arch/x86_64/vgacon.c index dc3b652..52e9525 100644 --- a/arch/x86_64/vgacon.c +++ b/arch/x86_64/vgacon.c @@ -114,7 +114,11 @@ static console_t vgacon = { void vgacon_init(void) { g_console_cursor_xpos = 0; - g_console_cursor_ypos = 5; + g_console_cursor_ypos = 0; + + for (int i = 0; i < k_console_width * k_console_height; i++) { + g_console_fb[i] = DEFAULT_ATTRIB << 8; + } init_vga_cursor(); move_vga_cursor(g_console_cursor_xpos, g_console_cursor_ypos);