From 5e20bbe22360e53ced900135690bc06efd863655 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Mon, 6 Feb 2023 20:49:11 +0000 Subject: [PATCH] x86_64: use higher-half pointer for VGA framebuffer --- arch/x86_64/vgacon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86_64/vgacon.c b/arch/x86_64/vgacon.c index f4f4115..4b15123 100644 --- a/arch/x86_64/vgacon.c +++ b/arch/x86_64/vgacon.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include @@ -11,7 +12,7 @@ #define VGA_CHAR(ch, attrib) ((uint16_t)(ch) | ((uint16_t)(attrib) << 8)) #define DEFAULT_ATTRIB 0x07 -static uint16_t *g_console_fb = (uint16_t *)0xb8000; +static uint16_t *g_console_fb = (uint16_t *)(VM_KERNEL_VOFFSET + 0xb8000); static const unsigned int k_console_width = 80; static const unsigned int k_console_height = 25; static unsigned int g_console_cursor_xpos = 0;