]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
fix: KVA_IOAPIC VA collision with BSS — move from 0xC0201000 to 0xC0401000
authorTulio A M Mendes <[email protected]>
Tue, 17 Feb 2026 00:45:26 +0000 (21:45 -0300)
committerTulio A M Mendes <[email protected]>
Tue, 17 Feb 2026 00:45:26 +0000 (21:45 -0300)
commit13bd34116cddb4768cd518a55152f668cca4d5b9
tree875da037d508a8304adb2320faa9d73c289ea944
parentfbb15d5e93edb52af04ec841ae88d77792a4cdf5
fix: KVA_IOAPIC VA collision with BSS — move from 0xC0201000 to 0xC0401000

Root cause: multiboot_copy (64KB static buffer) starts at VA 0xC0200FE0,
spanning pages 0xC0200000-0xC0210000. KVA_IOAPIC at 0xC0201000 mapped
IOAPIC MMIO over the BSS page containing the multiboot2 cmdline tag data.
After arch_platform_setup, reading bi->cmdline returned IOAPIC register
data (zeros) instead of the original cmdline string.

Symptom: [CMDLINE] "" regardless of GRUB menu entry selected.
Classic Heisenbug — adding a debug kprintf before IOAPIC init read the
correct data, masking the corruption.

Fix: move KVA_IOAPIC to 0xC0401000 (next to LAPIC at 0xC0400000),
well past _end at 0xC0265728. Updated VA map comment to reflect
current BSS extent (~0xC0266000).
include/arch/x86/kernel_va_map.h