Simplify task switches
No longer using the rsp from the entry to the kernel, but instead switching rsp at task-switching time in assembly. This currently breaks fork()
This commit is contained in:
@@ -12,6 +12,9 @@ print_regs(const cpu_state ®s)
|
||||
{
|
||||
console *cons = console::get();
|
||||
|
||||
uint64_t cr2 = 0;
|
||||
__asm__ __volatile__ ("mov %%cr2, %0" : "=r"(cr2));
|
||||
|
||||
print_regL("rax", regs.rax);
|
||||
print_regM("rbx", regs.rbx);
|
||||
print_regR("rcx", regs.rcx);
|
||||
@@ -36,7 +39,9 @@ print_regs(const cpu_state ®s)
|
||||
|
||||
print_regL("rip", regs.rip);
|
||||
print_regM("cr3", page_manager::get()->get_pml4());
|
||||
cons->puts("\n\n");
|
||||
print_regR("cr2", cr2);
|
||||
|
||||
cons->puts("\n");
|
||||
}
|
||||
|
||||
struct frame
|
||||
|
||||
Reference in New Issue
Block a user