summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/kernel/exception.C12
-rw-r--r--src/kernel/start.S8
2 files changed, 19 insertions, 1 deletions
diff --git a/src/kernel/exception.C b/src/kernel/exception.C
index 0cd192c77..6f015a57c 100644
--- a/src/kernel/exception.C
+++ b/src/kernel/exception.C
@@ -213,3 +213,15 @@ void kernel_execute_softpatch()
}
}
}
+
+extern "C"
+void kernel_execute_machine_check()
+{
+ task_t* t = TaskManager::getCurrentTask();
+ printk("Machine check in %d on %ld:\n"
+ "\tSRR0 = %lx, SRR1 = %lx\n"
+ "\tDSISR = %lx, DAR = %lx\n",
+ t->tid, getPIR(),
+ getSRR0(), getSRR0(), getDSISR(), getDAR());
+ kassert(false);
+}
diff --git a/src/kernel/start.S b/src/kernel/start.S
index cda7e92f9..71f3b6db9 100644
--- a/src/kernel/start.S
+++ b/src/kernel/start.S
@@ -140,7 +140,13 @@ hbi_pre_phyp_breakpoint:
attn; /* TODO: Add actual breakpoint attention. */
b _start
-UNIMPL_INTERRUPT(machine_check, 0x200)
+ /* TODO: Eventually we likely need specific code for machine check
+ * interrupts because they can happen at any time, including
+ * while we're already in an interrupt path. (Don't want to
+ * save kernel state over top of a user-space task structure).
+ */
+STD_INTERRUPT(machine_check, 0x200)
+
STD_INTERRUPT(data_storage, 0x300)
STD_INTERRUPT(data_segment, 0x380)
STD_INTERRUPT(inst_storage, 0x400)
OpenPOWER on IntegriCloud