scheduler: Fix page table switch for scheduler

The userspace process may map pages where the kernel has allocated data and cause a crash.

This patch fixes this issue by having a separate IRQ handler which sets the kernel page table at the start of SchedulerInterruptHandler() and restores it in SchedulerHandlerStub() function.
This commit is contained in:
EnderIce2
2024-11-17 03:11:20 +02:00
parent 079055082a
commit 86a119ea51
9 changed files with 161 additions and 21 deletions

View File

@ -78,6 +78,7 @@ namespace Interrupts
public:
virtual void OnInterruptReceived(CPU::TrapFrame *Frame);
virtual void OnInterruptReceived(CPU::SchedulerFrame *Frame);
};
}