hw_x86_64: Implement Thread::_mmu_exception() for x86_64

The function is a copy of the ARM version minus the in_fault
distinction.
This commit is contained in:
Reto Buerki 2015-02-27 14:20:36 +01:00 committed by Christian Helmuth
parent 0992c233bd
commit 466ad3aed4
1 changed files with 14 additions and 1 deletions

View File

@ -63,7 +63,20 @@ Thread_event Thread::* Thread::_event(unsigned const id) const
void Thread::_mmu_exception()
{
PDBG("not implemented");
_become_inactive(AWAITS_RESUME);
_fault_pd = (addr_t)_pd->platform_pd();
_fault_signal = _fault.signal_context_id();
/**
* core should never raise a page-fault,
* if this happens print out an error message with debug information
*/
if (_pd == Kernel::core_pd())
PERR("Pagefault in core thread (%s): ip=%p fault=%p",
label(), (void*)ip, (void*)_fault_addr);
_fault.submit();
return;
}