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:
@@ -5,6 +5,7 @@
|
||||
//! (halt, the descriptor tables, later paging), and nothing generic.
|
||||
|
||||
const danos = @import("danos");
|
||||
const config = @import("config");
|
||||
const gdt = @import("gdt.zig");
|
||||
const tss = @import("tss.zig");
|
||||
const idt = @import("idt.zig");
|
||||
@@ -148,8 +149,8 @@ pub fn pageExecutable(virt: u64) bool {
|
||||
return paging.isExecutable(virt);
|
||||
}
|
||||
|
||||
/// Kernel tick rate: 1000 Hz (1 ms), the scheduler's time quantum.
|
||||
pub const timer_hz = 1000;
|
||||
/// Kernel tick rate (the scheduler's time quantum), from config.
|
||||
pub const timer_hz = config.timer_hz;
|
||||
|
||||
/// The ACPI PM timer, as a calibration reference (re-exported for the config).
|
||||
pub const PmTimer = apic.PmTimer;
|
||||
|
||||
Reference in New Issue
Block a user