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:
+2
-1
@@ -1,5 +1,6 @@
|
||||
const std = @import("std");
|
||||
const danos = @import("danos");
|
||||
const config = @import("config");
|
||||
const arch = @import("arch");
|
||||
const console = @import("console.zig");
|
||||
const log = @import("log.zig");
|
||||
@@ -278,7 +279,7 @@ fn bringUpSecondaries() void {
|
||||
log.print("\ndanos: bringing up {d} application processor(s)\n", .{cores.len - 1});
|
||||
const max_wake_attempts = 3; // a core that misses the first INIT-SIPI-SIPI gets retried
|
||||
for (cores[1..], 1..) |core, index| {
|
||||
const stack = heap.allocator().alloc(u8, 16 * 1024) catch {
|
||||
const stack = heap.allocator().alloc(u8, config.kernel_stack_size) catch {
|
||||
log.print(" cpu apic_id {d}: no stack; skipped\n", .{core.apic_id});
|
||||
continue;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user