danos/system/kernel/architecture/x86_64
Daniel Samson 10c11d1806
paging: map the framebuffer write-combining, and clear it after paging
The console's one-time full-screen clear was millions of individual uncached word-writes to the GPU BAR: fine in QEMU, but on real hardware firmware MTRRs force that region uncacheable, so the clear crawls. Program PAT entry 4 to write-combining (setupPat, on the BSP and every AP) and map the framebuffer window with the PAT bit, so those writes batch into bursts.

The clear ran on the *loader's* uncached mapping because console.init happened before enablePaging. Move it to just after paging, so it uses the kernel's write-combining mapping instead. The cost: on-screen output is absent before paging (an early panic still lands in the serial/RAM log). Verified: 11 QEMU cases (incl. SMP AP-PAT, USB/FAT/ACPI) plus a screendump showing the framebuffer cleared to black with the status text rendered correctly.
2026-07-13 22:40:39 +01:00
..
apic.zig Add runtime.time, drop demo drivers, harden TSC timekeeping 2026-07-13 11:56:43 +01:00
cpu.zig serial: skip a dead COM1 via a loopback probe (fixes ~57s real-HW boot) 2026-07-13 21:15:56 +01:00
gdt.zig Re-organize the source tree as a monorepo mirroring the FHS 2026-07-10 12:55:56 +01:00
idt.zig zig fmt 2026-07-12 16:04:58 +01:00
io.zig Re-organize the source tree as a monorepo mirroring the FHS 2026-07-10 12:55:56 +01:00
ioapic.zig Re-organize the source tree as a monorepo mirroring the FHS 2026-07-10 12:55:56 +01:00
isr.s Re-organize the source tree as a monorepo mirroring the FHS 2026-07-10 12:55:56 +01:00
linker.ld Re-organize the source tree as a monorepo mirroring the FHS 2026-07-10 12:55:56 +01:00
paging.zig paging: map the framebuffer write-combining, and clear it after paging 2026-07-13 22:40:39 +01:00
per-cpu.zig Re-organize the source tree as a monorepo mirroring the FHS 2026-07-10 12:55:56 +01:00
serial.zig serial: skip a dead COM1 via a loopback probe (fixes ~57s real-HW boot) 2026-07-13 21:15:56 +01:00
smp.zig paging: map the framebuffer write-combining, and clear it after paging 2026-07-13 22:40:39 +01:00
trampoline.s Re-organize the source tree as a monorepo mirroring the FHS 2026-07-10 12:55:56 +01:00
tss.zig Re-organize the source tree as a monorepo mirroring the FHS 2026-07-10 12:55:56 +01:00