mirror of
https://github.com/rdmsr/zag.git
synced 2026-10-27 13:58:20 +00:00
42 lines
928 B
Zig
42 lines
928 B
Zig
const config = @import("config");
|
|
pub const phys = @import("phys.zig");
|
|
pub const pmap = @import("pmap.zig");
|
|
pub const init = @import("init.zig");
|
|
pub const heap = @import("heap.zig");
|
|
pub const zone = @import("zone.zig");
|
|
pub const PMap = pmap.PMap;
|
|
pub const tlb = @import("tlb.zig");
|
|
pub const balance = @import("balance.zig");
|
|
|
|
const ke = @import("root").ke;
|
|
const ex = @import("root").ex;
|
|
|
|
pub const Space = struct {
|
|
pmap: PMap,
|
|
arena: ex.Arena,
|
|
lock: ke.Mutex,
|
|
};
|
|
|
|
pub const PfnList = extern struct {
|
|
head: u32,
|
|
tail: u32,
|
|
};
|
|
|
|
pub const PMapLevel = struct {
|
|
shift: u6,
|
|
mask: usize,
|
|
leaf: bool,
|
|
};
|
|
|
|
pub const impl = switch (config.arch) {
|
|
.amd64 => @import("amd64/impl.zig"),
|
|
.riscv64 => @import("riscv64/impl.zig"),
|
|
else => @compileError("unsupported architecture"),
|
|
};
|
|
|
|
pub var kernel_space: Space = .{
|
|
.pmap = undefined,
|
|
.arena = undefined,
|
|
.lock = undefined,
|
|
};
|