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
+2 -1
View File
@@ -16,6 +16,7 @@
const std = @import("std");
const danos = @import("danos");
const config = @import("config");
const device = @import("device.zig");
const aml = @import("aml/aml.zig");
const DeviceTree = device.DeviceTree;
@@ -116,7 +117,7 @@ pub const CpuInfo = struct {
dropped: usize = 0,
};
const max_cpus = danos.max_cpus;
const max_cpus = config.max_cpus;
/// Filled in by `discover` (from the MADT); SMP bring-up reads it to wake the APs.
pub var cpu_info: CpuInfo = .{};