SchOS/kernel/arch/x86_64
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nexoniarz 132a2981b1 uefi, vm: 2 MB pages where the CPU has no 1 GB ones
Every page table SchOS built -- the loader's, which the kernel starts on
and the other CPUs start through, and the kernel's own direct map and
device window -- mapped memory in 1 GB pages. Intel's desktop CPUs
before Haswell do not have them, and there the PS bit in a PDPT entry is
reserved: the first access after the switch is a page fault that cannot
be handled either. An HP all-in-one with an Ivy Bridge i3 showed "Placing
and starting the kernel" and reset.

Both now check CPUID 0x80000001 EDX bit 26. Without it the loader maps
the low 4 GB through four page directories of 2 MB pages, placed below
the kernel where nothing reuses them, and keeps the staged kernel
segments below 4 GB; the kernel gives each gigabyte of its direct map
and of ioremap() a page directory of its own.

Neither KVM nor QEMU's emulator enforces the reserved bit, so the fault
itself could not be reproduced here. With the fallback forced on, the
kernel boots at 2 and 8 GB, both CPUs start, and evtest passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1giNvrHTrPMPw7V6x1kQ4
2026-10-24 11:45:18 +02:00
..
acpi.c include: one folder per subsystem, and includes that name it 2026-10-23 15:05:12 +02:00
e820.c include: one folder per subsystem, and includes that name it 2026-10-23 15:05:12 +02:00
entry.S include: one folder per subsystem, and includes that name it 2026-10-23 15:05:12 +02:00
entryother.S include: one folder per subsystem, and includes that name it 2026-10-23 15:05:12 +02:00
ioapic.c include: one folder per subsystem, and includes that name it 2026-10-23 15:05:12 +02:00
ioperm.c include: one folder per subsystem, and includes that name it 2026-10-23 15:05:12 +02:00
lapic.c include: one folder per subsystem, and includes that name it 2026-10-23 15:05:12 +02:00
mp.c include: one folder per subsystem, and includes that name it 2026-10-23 15:05:12 +02:00
swtch.S Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
trap.c include: one folder per subsystem, and includes that name it 2026-10-23 15:05:12 +02:00
trapasm.S include: one folder per subsystem, and includes that name it 2026-10-23 15:05:12 +02:00
vectors.S Initial commit: Schunix as it stands before the SchOS rename 2026-08-09 13:47:01 +02:00
vm.c uefi, vm: 2 MB pages where the CPU has no 1 GB ones 2026-10-24 11:45:18 +02:00
watch.c include: one folder per subsystem, and includes that name it 2026-10-23 15:05:12 +02:00