|
@@ -362,6 +362,15 @@ it to `0x7E00`. The kernel region itself only has one wall (`_end` below
|
|
|
trampoline at `0x6000`), and `spinlock.h` (the IRQ-safe spinlocks).
|
|
trampoline at `0x6000`), and `spinlock.h` (the IRQ-safe spinlocks).
|
|
|
`cpu_enable_sse()` runs on every AP: an AP starts with firmware CR4, and the
|
|
`cpu_enable_sse()` runs on every AP: an AP starts with firmware CR4, and the
|
|
|
SSE2 drawing fast paths #UD until OSFXSR/OSXMMEXCPT are set.
|
|
SSE2 drawing fast paths #UD until OSFXSR/OSXMMEXCPT are set.
|
|
|
|
|
+ `cpu_init_fpu()` runs on the BSP and every AP: CR0.NE|MP, no EM/TS, and
|
|
|
|
|
+ FNINIT. An AP leaves INIT with CR0.NE clear and the x87 control word
|
|
|
|
|
+ 0x0040 (every exception unmasked, 24-bit precision); each inexact result
|
|
|
|
|
+ then froze the CPU until the next timer tick, so QuickJS ran several
|
|
|
|
|
+ hundred times slower on an AP at 100% CPU (QEMU models none of it). Each
|
|
|
|
|
+ process owns its x87 state: `schedule()` FNSAVEs the outgoing process
|
|
|
|
|
+ into `struct process.fpu` and FRSTORs the incoming one (FNINIT for a
|
|
|
|
|
+ process that never ran); the kernel uses no x87, and its SSE helpers
|
|
|
|
|
+ touch only XMM registers, which ring 3 (`-mno-sse`) never uses.
|
|
|
- **Memory**: `phys.h` — `MM_MAX_PHYS` (1 GB, the lowmem/identity-map
|
|
- **Memory**: `phys.h` — `MM_MAX_PHYS` (1 GB, the lowmem/identity-map
|
|
|
ceiling, also used by the UEFI loader for the pack buffer), `MM_KMAP_VA`
|
|
ceiling, also used by the UEFI loader for the pack buffer), `MM_KMAP_VA`
|
|
|
(`0x4FC00000`) and `MM_HIGH_LIMIT` (4 GB). Lowmem ends where ring-3 space
|
|
(`0x4FC00000`) and `MM_HIGH_LIMIT` (4 GB). Lowmem ends where ring-3 space
|