From 68a51aac78186ef9c86b5657cfde3336609d69ce Mon Sep 17 00:00:00 2001 From: Helge Deller Date: Thu, 18 Jan 2024 17:27:22 +0100 Subject: parisc: Add firmware_fault_handler() Used to print faults/traps which may happen at Firmware start. Signed-off-by: Helge Deller --- src/parisc/parisc.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/parisc/parisc.c b/src/parisc/parisc.c index ab10a7d..1922f8d 100644 --- a/src/parisc/parisc.c +++ b/src/parisc/parisc.c @@ -244,6 +244,14 @@ void __VISIBLE __noreturn reset(void) while (1); } +void __VISIBLE __noreturn firmware_fault_handler(unsigned long fault) +{ + printf("\n***************************\n" + "SeaBIOS: Detected trap #%lu, at 0x%lx:0x%lx, IIR=0x%lx, IOR addr=0x%lx:0x%lx\n", fault, + mfctl(17), mfctl(18), mfctl(19), mfctl(20), mfctl(21)); + while (1) { asm("or %r10,%r10,%r10"); }; +} + #undef BUG_ON #define BUG_ON(cond) \ if (unlikely(cond)) { \ -- cgit v1.1