sched: add kernel-mode context switching

This commit is contained in:
2023-04-30 14:27:57 +01:00
parent 2cb2d9100a
commit 085c3d2a89
12 changed files with 340 additions and 27 deletions

View File

@@ -96,7 +96,7 @@ static void gpf_handler(struct cpu_context *regs)
static void pf_handler(struct cpu_context *regs)
{
printk("page fault (%016llx %016llx)", pf_faultptr(), regs->rip);
printk("page fault (%016llx %016llx %016llx)", pf_faultptr(), regs->rip, regs->err_no);
ml_halt_cpu();
}
@@ -241,6 +241,10 @@ void irq_dispatch(struct cpu_context *regs)
hook->irq_callback();
}
if (need_resched()) {
schedule();
}
start_charge_period();
}