]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commitdiff
fix: move VBE framebuffer VA from 0xD0000000 to 0xE0000000
authorTulio A M Mendes <[email protected]>
Tue, 10 Feb 2026 04:01:02 +0000 (01:01 -0300)
committerTulio A M Mendes <[email protected]>
Tue, 10 Feb 2026 04:01:02 +0000 (01:01 -0300)
The kernel heap starts at KHEAP_START=0xD0000000 and spans 10MB.
The VBE framebuffer was also mapped at 0xD0000000, causing a
virtual address collision that would corrupt the heap when a
framebuffer is present.

Move VBE mapping to 0xE0000000 which is safely above the heap.

Passes: make, cppcheck, QEMU smoke test.

src/drivers/vbe.c

index a29a6bcdeb74f565b909be1bcc3d220ebc3ef9e4..c638ea3ce6f441dfc64843cc9ddabeb90eda80e6 100644 (file)
@@ -22,7 +22,7 @@ int vbe_init(const struct boot_info* bi) {
     g_vbe.size = g_vbe.pitch * g_vbe.height;
 
     uint32_t pages = (g_vbe.size + 0xFFF) >> 12;
-    uintptr_t virt_base = 0xD0000000U;
+    uintptr_t virt_base = 0xE0000000U;
 
     for (uint32_t i = 0; i < pages; i++) {
         vmm_map_page((uint64_t)(g_vbe.phys_addr + i * 0x1000),