Commit 1ca1f032 authored by Christian Dietrich's avatar Christian Dietrich

i386: FaultDetectedHook in page fault handler

Like the last change, this one does not change the SDC rate, but does only make
them detectable by application/FAIL*. Until now, MPU faults were routed to isr_undetected

Change-Id: Iac81f8611753cafbddb6d1f9c4bbe505a788890e
parent 01ad46c1
......@@ -5,6 +5,7 @@
*/
#include "paging.h"
#include "hooks.h"
namespace arch {
......@@ -22,7 +23,7 @@ void MMU::init() {
}
// Pagefault interrupt handler printing details for debugging
#if DEBUG
#ifdef CONFIG_ARCH_MPU
#include "idt.h"
#include "output.h"
#include "os/util/inline.h"
......@@ -38,6 +39,8 @@ ISR(14) {
asm("mov %%cr2, %0" : "=r"(fault_addr));
asm("mov %%cr3, %0" : "=r"(cr3));
CALL_HOOK(FaultDetectedHook, MPUdetected, fault_addr, cr3);
debug << "PAGE FAULT for 0x" << hex << fault_addr;
debug << ", IP @ 0x" << cpu->eip;
debug << ", PD @ 0x" << cr3;
......@@ -47,4 +50,4 @@ ISR(14) {
}
}
#endif // DEBUG
#endif // CONFIG_ARCH_CPU
......@@ -76,6 +76,7 @@ typedef enum DetectedFault_t {
STATE_ASSERTdetected = 9,
RETRY_ERRORdetected = 10,
TMRdetected = 11,
MPUdetected = 12,
} DetectedFault_t;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment