gather kernel tunables into config.zig

max_cpus, max_tasks, kernel/IST stack sizes, and timer_hz move from scattered constants into one config module. root.zig goes back to being just the boot contract. Values unchanged; any can become a -D build option later.
This commit is contained in:
Daniel Samson
2026-07-08 16:26:36 +01:00
parent 1b47de5058
commit 7501bd1703
9 changed files with 56 additions and 21 deletions
-8
View File
@@ -45,14 +45,6 @@ pub const Framebuffer = extern struct {
/// targets so far.
pub const page_size = 4096;
/// Ceiling on logical CPUs the kernel tracks — the size of the per-CPU bookkeeping
/// arrays (discovery pool, scheduler state, per-core GDT/TSS). A generous headroom:
/// these structs are small (a few hundred bytes each), and the *large* per-core
/// resources (IST/kernel stacks) are allocated at bring-up, only for cores that
/// actually come online — so this ceiling costs little. A machine with more logical
/// CPUs than this has its surplus reported and left parked (see acpi `cpusDropped`).
pub const max_cpus = 128;
/// danos's own classification of a span of physical memory — deliberately not
/// UEFI's vocabulary. Each boot path (UEFI now, device tree later) translates its
/// native memory description into these kinds, so the kernel never learns what