Built paging / the kernel's own page tables (with a TSS+IST)
This commit is contained in:
@@ -36,6 +36,7 @@ fn kmain(boot_info: *const BootInfo) noreturn {
|
||||
arch.init();
|
||||
|
||||
con.write("danos: framebuffer console online\n");
|
||||
con.write("danos: cpu tables online (GDT, IDT, TSS)\n");
|
||||
con.print(" resolution : {d}x{d}\n", .{ fb.width, fb.height });
|
||||
con.print(" pitch : {d} bytes\n", .{fb.pitch});
|
||||
con.print(" format : {s}\n", .{@tagName(fb.format)});
|
||||
@@ -81,6 +82,11 @@ fn kmain(boot_info: *const BootInfo) noreturn {
|
||||
if (f2) |p| pmm.free(p);
|
||||
con.print(" after free : {d} frames free\n", .{pmm.stats().free_frames});
|
||||
|
||||
// Switch off the firmware's page tables onto our own.
|
||||
arch.enablePaging(pmm.alloc);
|
||||
con.print("\ndanos: paging enabled\n", .{});
|
||||
con.print(" page tables: CR3 = 0x{x:0>16}\n", .{arch.readCr3()});
|
||||
|
||||
con.write("\nkernel initialised; nothing left to do, halting.\n");
|
||||
|
||||
arch.halt();
|
||||
|
||||
Reference in New Issue
Block a user