Add a physical memory manager
This commit is contained in:
parent
6a46d263cf
commit
7043ccd6b9
10 changed files with 567 additions and 7 deletions
|
@ -9,6 +9,7 @@ const tty = @import("tty.zig");
|
|||
const vga = @import("vga.zig");
|
||||
const log = @import("log.zig");
|
||||
const serial = @import("serial.zig");
|
||||
const pmm = @import("pmm.zig");
|
||||
const mem = if (is_test) @import(mock_path ++ "mem_mock.zig") else @import("mem.zig");
|
||||
const panic_root = if (is_test) @import(mock_path ++ "panic_mock.zig") else @import("panic.zig");
|
||||
const options = @import("build_options");
|
||||
|
@ -42,6 +43,7 @@ export fn kmain(mb_info: *multiboot.multiboot_info_t, mb_magic: u32) void {
|
|||
var buffer = mem_profile.vaddr_end[0..mem_profile.fixed_alloc_size];
|
||||
var fixed_allocator = std.heap.FixedBufferAllocator.init(buffer);
|
||||
|
||||
pmm.init(&mem_profile, &fixed_allocator.allocator);
|
||||
log.logInfo("Init arch " ++ @tagName(builtin.arch) ++ "\n", .{});
|
||||
arch.init(mb_info, &mem_profile, &fixed_allocator.allocator);
|
||||
log.logInfo("Arch init done\n", .{});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue