Add slot LED panics for exception and IPC

This commit is contained in:
marcan 2009-03-06 05:15:20 +01:00 committed by bushing
parent 8335cc690e
commit 1cd160ebc9
3 changed files with 7 additions and 3 deletions

View File

@ -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);
}

3
ipc.c
View File

@ -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);

View File

@ -2,6 +2,8 @@
#define __PANIC_H__
#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));