mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-09 04:15:52 +00:00
hw: print page faults of core (fix #1286)
This commit is contained in:
parent
eedf3fa413
commit
d452f37c25
@ -15,6 +15,7 @@
|
||||
/* core includes */
|
||||
#include <kernel/thread.h>
|
||||
#include <kernel/pd.h>
|
||||
#include <kernel/kernel.h>
|
||||
|
||||
using namespace Kernel;
|
||||
|
||||
@ -82,6 +83,15 @@ void Thread::_mmu_exception()
|
||||
if (in_fault(_fault_addr, _fault_writes)) {
|
||||
_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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user