diff --git a/exception.c b/exception.c index cbd7c93..813539a 100644 --- a/exception.c +++ b/exception.c @@ -4,6 +4,7 @@ #include "utils.h" #include "ipc.h" #include "memory.h" +#include "panic.h" const char *exceptions[] = { "RESET", "UNDEFINED INSTR", "SWI", "INSTR ABORT", "DATA ABORT", "RESERVED", "IRQ", "FIQ", "(unknown exception type)" @@ -92,5 +93,5 @@ void exc_handler(u32 type, u32 spsr, u32 *regs) default: break; } - panic(0xA3); + panic2(0, PANIC_EXCEPTION); } diff --git a/ipc.c b/ipc.c index b9c4e26..f24a680 100644 --- a/ipc.c +++ b/ipc.c @@ -10,6 +10,7 @@ #include "sdhc.h" #include "crypto.h" #include "boot2.h" +#include "panic.h" static volatile ipc_request in_queue[IPC_IN_SIZE] ALIGNED(32) MEM2_BSS; static volatile ipc_request out_queue[IPC_OUT_SIZE] ALIGNED(32) MEM2_BSS; @@ -193,7 +194,7 @@ static void process_in(void) } else { if(slow_queue_head == ((slow_queue_tail + 1)&(IPC_SLOW_SIZE-1))) { gecko_printf("IPC: Slowqueue overrun\n"); - panic(0x33); + panic2(0, PANIC_IPCOVF); } slow_queue[slow_queue_tail] = *req; slow_queue_tail = (slow_queue_tail+1)&(IPC_SLOW_SIZE-1); diff --git a/panic.h b/panic.h index 79d4bf7..497009d 100644 --- a/panic.h +++ b/panic.h @@ -1,7 +1,9 @@ #ifndef __PANIC_H__ #define __PANIC_H__ -#define PANIC_MOUNT 1,1,-1 +#define PANIC_MOUNT 1,1,-1 +#define PANIC_EXCEPTION 1,3,1,-1 +#define PANIC_IPCOVF 1,3,3,-1 void panic2(int mode, ...) __attribute__ ((noreturn));