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:
DrDeano 2020-07-24 23:51:27 +01:00
parent fde6894bf2
commit 1030633d1d
No known key found for this signature in database
GPG key ID: 96188600582B9ED7
12 changed files with 348 additions and 263 deletions

View file

@ -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);

View file

@ -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) {