summaryrefslogtreecommitdiff
path: root/src/console/console.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/console/console.c')
-rw-r--r--src/console/console.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/console/console.c b/src/console/console.c
index c176bc5d0c..008130fb63 100644
--- a/src/console/console.c
+++ b/src/console/console.c
@@ -81,3 +81,11 @@ void post_code(uint8_t value)
outb(value, 0x80);
#endif
}
+
+/* Report a fatal error */
+void __attribute__((noreturn)) die(const char *msg)
+{
+ printk_emerg("%s", msg);
+ post_code(0xff);
+ while (1); /* Halt */
+}