allocate AP kernel/IST stacks at bring-up, not statically
Hoist max_cpus into danos (root.zig), raise it to 128, and stop reserving a static [max_cpus][16 KiB] IST array. Only the BSP's IST stack is static (needed before the allocator); each AP's is heap-allocated when it comes online. Shrinks the kernel from ~1.1 MB to ~139 KiB in ReleaseSmall.
This commit is contained in:
+2
-1
@@ -15,6 +15,7 @@
|
||||
//! the `Hal.mapMmio` callback the caller supplies (the arch VMM's map primitive).
|
||||
|
||||
const std = @import("std");
|
||||
const danos = @import("danos");
|
||||
const device = @import("device.zig");
|
||||
const aml = @import("aml/aml.zig");
|
||||
const DeviceTree = device.DeviceTree;
|
||||
@@ -115,7 +116,7 @@ pub const CpuInfo = struct {
|
||||
dropped: usize = 0,
|
||||
};
|
||||
|
||||
const max_cpus = 64;
|
||||
const max_cpus = danos.max_cpus;
|
||||
|
||||
/// Filled in by `discover` (from the MADT); SMP bring-up reads it to wake the APs.
|
||||
pub var cpu_info: CpuInfo = .{};
|
||||
|
||||
Reference in New Issue
Block a user