]> 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)
commit7909c255a86c28536daddef32b08055ca2cf9969
treed66e04fa1429d85238143dfe20f047307e88f283
parentcd0bed68b109eea9ce7590dd9cf64cf2f906ed88
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