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 "utils.h"
#include "ipc.h" #include "ipc.h"
#include "memory.h" #include "memory.h"
#include "panic.h"
const char *exceptions[] = { const char *exceptions[] = {
"RESET", "UNDEFINED INSTR", "SWI", "INSTR ABORT", "DATA ABORT", "RESERVED", "IRQ", "FIQ", "(unknown exception type)" "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; default: break;
} }
panic(0xA3); panic2(0, PANIC_EXCEPTION);
} }

3
ipc.c
View File

@ -10,6 +10,7 @@
#include "sdhc.h" #include "sdhc.h"
#include "crypto.h" #include "crypto.h"
#include "boot2.h" #include "boot2.h"
#include "panic.h"
static volatile ipc_request in_queue[IPC_IN_SIZE] ALIGNED(32) MEM2_BSS; 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; static volatile ipc_request out_queue[IPC_OUT_SIZE] ALIGNED(32) MEM2_BSS;
@ -193,7 +194,7 @@ static void process_in(void)
} else { } else {
if(slow_queue_head == ((slow_queue_tail + 1)&(IPC_SLOW_SIZE-1))) { if(slow_queue_head == ((slow_queue_tail + 1)&(IPC_SLOW_SIZE-1))) {
gecko_printf("IPC: Slowqueue overrun\n"); gecko_printf("IPC: Slowqueue overrun\n");
panic(0x33); panic2(0, PANIC_IPCOVF);
} }
slow_queue[slow_queue_tail] = *req; slow_queue[slow_queue_tail] = *req;
slow_queue_tail = (slow_queue_tail+1)&(IPC_SLOW_SIZE-1); slow_queue_tail = (slow_queue_tail+1)&(IPC_SLOW_SIZE-1);

View File

@ -1,7 +1,9 @@
#ifndef __PANIC_H__ #ifndef __PANIC_H__
#define __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)); void panic2(int mode, ...) __attribute__ ((noreturn));