aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2008-03-11 19:39:10 -0400
committerKevin O'Connor <kevin@koconnor.net>2008-03-11 19:39:10 -0400
commit83b56406ed945a81d01d99f7180d06679dd2e247 (patch)
tree6c5836c8a4b7eb538bba331f2209845e68c073ad
parentbc28a2bc4c9560cb25baa985707ce661dea5d1e5 (diff)
downloadseabios-83b56406ed945a81d01d99f7180d06679dd2e247.tar.gz
Halt machine on call to BX_PANIC.
-rw-r--r--src/util.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/util.h b/src/util.h
index 0ea4a01b..7d5b7c8b 100644
--- a/src/util.h
+++ b/src/util.h
@@ -42,8 +42,12 @@ static inline void hlt(void)
asm volatile("hlt");
}
-// XXX - should halt machine
-#define BX_PANIC(fmt, args...) bprintf(0, fmt , ##args)
+// XXX - move this to a c file and use PANIC PORT.
+#define BX_PANIC(fmt, args...) do { \
+ bprintf(0, fmt , ##args); \
+ for (;;) \
+ hlt(); \
+ } while (0)
#define BX_INFO(fmt, args...) bprintf(0, fmt , ##args)