From d0024e18931dfb3d66cbcb91dce6a32dd9a5de5f Mon Sep 17 00:00:00 2001 From: Reto Buerki Date: Thu, 12 Mar 2015 09:21:38 +0100 Subject: [PATCH] hw_x86_64: Fill _fault_addr from cr2 in _mmu_exception Use the Cpu::Cr2 register to read the linear page fault address in the Thread::_mmu_exception function. --- repos/base-hw/src/core/spec/x86_64/kernel/thread_base.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/repos/base-hw/src/core/spec/x86_64/kernel/thread_base.cc b/repos/base-hw/src/core/spec/x86_64/kernel/thread_base.cc index f2bc3af0b..a16156547 100644 --- a/repos/base-hw/src/core/spec/x86_64/kernel/thread_base.cc +++ b/repos/base-hw/src/core/spec/x86_64/kernel/thread_base.cc @@ -64,8 +64,9 @@ Thread_event Thread::* Thread::_event(unsigned const id) const void Thread::_mmu_exception() { _become_inactive(AWAITS_RESUME); - _fault_pd = (addr_t)_pd->platform_pd(); + _fault_pd = (addr_t)_pd->platform_pd(); _fault_signal = _fault.signal_context_id(); + _fault_addr = Cpu::Cr2::read(); /** * core should never raise a page-fault,