mirror of
https://github.com/rdmsr/zag.git
synced 2026-10-27 13:58:20 +00:00
98 lines
4.2 KiB
Zig
98 lines
4.2 KiB
Zig
.{
|
|
.title = "Zag configuration",
|
|
.entries = .{
|
|
.{
|
|
.kind = .choice,
|
|
.key = "arch",
|
|
.label = "CPU Architecture",
|
|
.default = .{ .choice = "amd64" },
|
|
.options = .{
|
|
.{ .value = "amd64" },
|
|
.{ .value = "aarch64" },
|
|
.{ .value = "um", .label = "Usermode (Linux)" },
|
|
},
|
|
},
|
|
.{
|
|
.kind = .choice,
|
|
.key = "bootloader",
|
|
.label = "Bootloader",
|
|
.default = .{ .choice = "limine" },
|
|
.options = .{
|
|
.{ .value = "limine", .label = "Limine" },
|
|
},
|
|
.depends_on = .{
|
|
.not = .{
|
|
.key_eq = .{ .key = "arch", .value = "um" },
|
|
},
|
|
},
|
|
},
|
|
.{
|
|
.kind = .menu,
|
|
.label = "Kernel Options",
|
|
.entries = .{
|
|
.{
|
|
.kind = .int,
|
|
.key = "sched_timeslice",
|
|
.label = "Scheduler time slice",
|
|
.default = .{ .int = 10 },
|
|
.help = "This option sets the default time slice (in milliseconds) used by the scheduler.",
|
|
},
|
|
|
|
.{
|
|
.kind = .int,
|
|
.key = "sched_balance_interval",
|
|
.label = "Load balancing interval",
|
|
.default = .{ .int = 1000 },
|
|
.help = "This option sets the rate (in milliseconds) at which thread load balancing is performed.",
|
|
},
|
|
|
|
.{
|
|
.kind = .int,
|
|
.key = "ncpus",
|
|
.label = "Maximal number of CPUs",
|
|
.default = .{ .int = 64 },
|
|
.range = .{ .min = 1, .max = 16384 },
|
|
.help = "This option sets the maximum number of CPUs the kernel can support.",
|
|
},
|
|
|
|
.{
|
|
.kind = .int,
|
|
.key = "log_buffer_shift",
|
|
.label = "Log buffer size shift",
|
|
.default = .{ .int = 14 },
|
|
.help = "This option sets the size of the kernel log buffer as a power of two. The actual size is calculated as 2 raised to the power of this value (i.e., 2^LOG_BUFFER_SHIFT bytes).",
|
|
},
|
|
|
|
.{
|
|
.kind = .menu,
|
|
.label = "Memory Management Options",
|
|
|
|
.entries = .{
|
|
.{
|
|
.kind = .menu,
|
|
.label = "Kernel memory allocator",
|
|
.entries = .{
|
|
.{
|
|
.kind = .bool,
|
|
.key = "slab_poison",
|
|
.label = "Poison slab objects",
|
|
.default = .{ .bool = false },
|
|
.help = "This option enables poisoning of slab allocator objects. When enabled, freed objects are filled with a specific pattern to help detect use-after-free bugs. This can be useful for debugging memory corruption issues, but may have a performance impact.",
|
|
},
|
|
.{
|
|
.kind = .bool,
|
|
.key = "slab_check_poison",
|
|
.label = "Check poison on allocation",
|
|
.default = .{ .bool = false },
|
|
.help = "This option enables checking of the poison pattern when allocating objects from the slab allocator. When enabled, the allocator will verify that the poison pattern is intact before reusing a freed object. This can help detect use-after-free bugs where an object is accessed after being freed, but may have a performance impact.",
|
|
.depends_on = .{ .key = "slab_poison" },
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|