Beispiel #1
0
static void busfault(struct arm_cm_exception_frame *frame)
{
	printf("busfault: ");
	dump_frame(frame);

	platform_halt(HALT_ACTION_HALT, HALT_REASON_SW_PANIC);
}
Beispiel #2
0
static void memmanage(struct arm_cm_exception_frame *frame)
{
	printf("memmanage: ");
	dump_frame(frame);

	uint32_t mmfsr = SCB->CFSR & 0xff;

	if (mmfsr & (1<<0)) { // IACCVIOL
		printf("instruction fault\n");
	}
	if (mmfsr & (1<<1)) { // DACCVIOL
		printf("data fault\n");
	}
	if (mmfsr & (1<<3)) { // MUNSTKERR
		printf("fault on exception return\n");
	}
	if (mmfsr & (1<<4)) { // MSTKERR
		printf("fault on exception entry\n");
	}
	if (mmfsr & (1<<5)) { // MLSPERR
		printf("fault on lazy fpu preserve\n");
	}
	if (mmfsr & (1<<7)) { // MMARVALID
		printf("fault address 0x%x\n", SCB->MMFAR);
	}

	platform_halt(HALT_ACTION_HALT, HALT_REASON_SW_PANIC);
}
Beispiel #3
0
static void usagefault(struct arm_cm_exception_frame *frame)
{
    inc_critical_section();
    printf("usagefault: ");
    dump_frame(frame);

    platform_halt(HALT_ACTION_HALT, HALT_REASON_SW_PANIC);
}
Beispiel #4
0
static void exception_die(struct arm_fault_frame *frame, const char *msg)
{
	dprintf(CRITICAL, msg);
	dump_fault_frame(frame);

	platform_halt(HALT_ACTION_HALT, HALT_REASON_SW_PANIC);
	for (;;);
}
Beispiel #5
0
static void hardfault(struct arm_cm_exception_frame *frame)
{
	printf("hardfault: ");
	dump_frame(frame);

	printf("HFSR 0x%x\n", SCB->HFSR);

	platform_halt(HALT_ACTION_HALT, HALT_REASON_SW_PANIC);
}
Beispiel #6
0
static void exception_die(struct arm_fault_frame *frame, int pc_off, const char *msg)
{
	inc_critical_section();
	frame->pc += pc_off;
	dprintf(CRITICAL, msg);
	dump_fault_frame(frame);
	
#ifdef LGE_WITH_CRASH_HANDLER
	platform_halt();
#else
	halt();
#endif
	for(;;);
}
Beispiel #7
0
static int cmd_reboot(int argc, const cmd_args *argv)
{
    platform_halt(HALT_ACTION_REBOOT, HALT_REASON_SW_RESET);
    return 0;
}
Beispiel #8
0
void __WEAK _debugmonitor(void)
{
	printf("debugmonitor\n");
	platform_halt(HALT_ACTION_HALT, HALT_REASON_SW_PANIC);
}
Beispiel #9
0
/* systick handler */
void __WEAK _systick(void)
{
	printf("systick\n");
	platform_halt(HALT_ACTION_HALT, HALT_REASON_SW_PANIC);
}
Beispiel #10
0
void _nmi(void)
{
	printf("nmi\n");
	platform_halt(HALT_ACTION_HALT, HALT_REASON_SW_PANIC);
}
Beispiel #11
0
void _memmanage(void)
{
	printf("memmanage\n");
	platform_halt(HALT_ACTION_HALT, HALT_REASON_SW_PANIC);
}
Beispiel #12
0
void _nmi(void)
{
    inc_critical_section();
    printf("nmi\n");
    platform_halt(HALT_ACTION_HALT, HALT_REASON_SW_PANIC);
}
Beispiel #13
0
/* systick handler */
void __WEAK _systick(void)
{
    inc_critical_section();
    printf("systick\n");
    platform_halt(HALT_ACTION_HALT, HALT_REASON_SW_PANIC);
}
Beispiel #14
0
void halt(void)
{
	enter_critical_section(); // disable ints
	platform_halt();
}
Beispiel #15
0
static int do_reboot(void *arg) {
    thread_sleep(250);
    platform_halt(HALT_ACTION_REBOOT, HALT_REASON_SW_RESET);
    return 0;
}
Beispiel #16
0
void platform_restart(void)
{
	platform_halt();
}
Beispiel #17
0
void platform_power_off(void)
{
	platform_halt();
}
Beispiel #18
0
void _memmanage(void)
{
    inc_critical_section();
    printf("memmanage\n");
    platform_halt(HALT_ACTION_HALT, HALT_REASON_SW_PANIC);
}
void machine_halt(void)
{
	platform_halt();
	while (1);
}
Beispiel #20
0
static int cmd_poweroff(int argc, const cmd_args *argv)
{
    platform_halt(HALT_ACTION_SHUTDOWN, HALT_REASON_SW_RESET);
    return 0;
}