mirror of
https://github.com/rdmsr/zag.git
synced 2026-11-01 15:48:21 +00:00
all: rework source tree structure
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
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,
|
||||
};
|
||||
Reference in New Issue
Block a user