x86_64: use higher-half pointer for VGA framebuffer

This commit is contained in:
2023-02-06 20:49:11 +00:00
parent 0516ef06a3
commit 5e20bbe223

View File

@@ -2,6 +2,7 @@
#include <socks/libc/ctype.h>
#include <arch/ports.h>
#include <socks/console.h>
#include <socks/vm.h>
#include <socks/printk.h>
#include <stdint.h>
@@ -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;