From 0992c233bd81922ee35b2285f1199f95136821e6 Mon Sep 17 00:00:00 2001 From: Reto Buerki Date: Fri, 27 Feb 2015 14:18:52 +0100 Subject: [PATCH] hw_x86_64: Forward page faults to the _mmu_exception function --- repos/base-hw/src/core/spec/x86/kernel/thread.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/repos/base-hw/src/core/spec/x86/kernel/thread.cc b/repos/base-hw/src/core/spec/x86/kernel/thread.cc index 841ff59ef..e810a5ecf 100644 --- a/repos/base-hw/src/core/spec/x86/kernel/thread.cc +++ b/repos/base-hw/src/core/spec/x86/kernel/thread.cc @@ -16,6 +16,7 @@ #include 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;