WIP
Page fault loop Fixed up the virtual memory mapping Removed un-used parameters in arch.init Some doc comments Name changes
This commit is contained in:
parent
fde6894bf2
commit
1030633d1d
12 changed files with 348 additions and 263 deletions
|
@ -122,7 +122,7 @@ pub fn initTTY(boot_payload: BootPayload) TTY {
|
|||
};
|
||||
}
|
||||
|
||||
pub fn initMem(payload: BootPayload) std.mem.Allocator.Error!mem.MemProfile {
|
||||
pub fn initMem(payload: BootPayload) Allocator.Error!mem.MemProfile {
|
||||
return MemProfile{
|
||||
.vaddr_end = @ptrCast([*]u8, &KERNEL_VADDR_END),
|
||||
.vaddr_start = @ptrCast([*]u8, &KERNEL_VADDR_START),
|
||||
|
@ -142,7 +142,7 @@ pub fn initTaskStack(entry_point: usize, allocator: *Allocator) Allocator.Error!
|
|||
return ret;
|
||||
}
|
||||
|
||||
pub fn init(payload: BootPayload, mem_profile: *const MemProfile, allocator: *Allocator) void {
|
||||
pub fn init(mem_profile: *const MemProfile) void {
|
||||
// I'll get back to this as this doesn't effect the current testing.
|
||||
// When I come on to the mem.zig testing, I'll fix :)
|
||||
//return mock_framework.performAction("init", void, mem_profile, allocator);
|
||||
|
|
|
@ -28,7 +28,6 @@ pub const MemProfile = struct {
|
|||
fixed_allocator: std.heap.FixedBufferAllocator,
|
||||
};
|
||||
|
||||
// The size of the fixed allocator used before the heap is set up. Set to 1MiB.
|
||||
const FIXED_ALLOC_SIZE = 1024 * 1024;
|
||||
|
||||
pub fn virtToPhys(virt: anytype) @TypeOf(virt) {
|
||||
|
|
|
@ -120,6 +120,8 @@ pub const RuntimeStep = struct {
|
|||
std.debug.warn("{}\n", .{msg});
|
||||
if (std.mem.indexOf(u8, msg, "FAILURE")) |_| {
|
||||
return false;
|
||||
} else if (std.mem.indexOf(u8, msg, "Kernel panic")) |_| {
|
||||
return false;
|
||||
} else if (std.mem.eql(u8, msg, "[info] (kmain): SUCCESS")) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue