mirror of
https://github.com/fail0verflow/mini.git
synced 2024-11-28 06:04:19 +01:00
Add slot LED panics for exception and IPC
This commit is contained in:
parent
8335cc690e
commit
1cd160ebc9
@ -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
3
ipc.c
@ -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);
|
||||||
|
2
panic.h
2
panic.h
@ -2,6 +2,8 @@
|
|||||||
#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));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user