core: Give init a pointer to its own page tables
This commit is contained in:
parent
e9b2f5968a
commit
34255d6c68
@ -51,8 +51,9 @@ pub fn setAddress(regs: *interrupts.InterruptStackFrame, address: u64) void {
|
||||
regs.rip = address;
|
||||
}
|
||||
|
||||
pub fn setArgument(regs: *interrupts.InterruptStackFrame, argument: u64) void {
|
||||
regs.rdi = argument;
|
||||
pub fn setArguments(regs: *interrupts.InterruptStackFrame, arg0: u64, arg1: u64) void {
|
||||
regs.rdi = arg0;
|
||||
regs.rsi = arg1;
|
||||
}
|
||||
|
||||
pub fn setStack(regs: *interrupts.InterruptStackFrame, stack: u64) void {
|
||||
|
@ -71,7 +71,7 @@ export fn _start(magic: u32, info: MultibootInfo) callconv(.C) noreturn {
|
||||
init.mapper = mapper;
|
||||
init.user_priority = 255;
|
||||
thread.arch.initUserRegisters(&init.regs);
|
||||
thread.arch.setArgument(&init.regs, base);
|
||||
thread.arch.setArguments(&init.regs, base, mapper.phys.address);
|
||||
|
||||
const ctx = Context{ .allocator = &allocator, .mapper = mapper, .regs = &init.regs };
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user