hw_x86_64: Forward page faults to the _mmu_exception function

This commit is contained in:
Reto Buerki 2015-02-27 14:18:52 +01:00 committed by Christian Helmuth
parent 112ff2609a
commit 0992c233bd
1 changed files with 5 additions and 0 deletions

View File

@ -16,6 +16,7 @@
#include <kernel/thread.h>
enum Cpu_exception {
PAGE_FAULT = 0x0e,
SUPERVISOR_CALL = 0x80,
};
@ -30,6 +31,10 @@ Thread::Thread(unsigned const priority, unsigned const quota,
void Thread::exception(unsigned const cpu)
{
if (trapno == PAGE_FAULT) {
_mmu_exception();
return;
}
if (trapno == SUPERVISOR_CALL) {
_call();
return;