/** * The software interrupt instruction (SWI) is used for entering * Supervisor mode, usually to request a particular supervisor * function. * * @param regs system registers * * @note never invoke this function in application */ void rt_hw_trap_swi(struct rt_hw_register *regs) { rt_hw_show_register(regs); rt_kprintf("software interrupt\n"); rt_hw_cpu_shutdown(); }
/** * Normally, system will never reach here * * @param regs system registers * * @note never invoke this function in application */ void rt_hw_trap_resv(struct rt_hw_register *regs) { rt_kprintf("not used\n"); rt_hw_show_register(regs); if (rt_thread_self() != RT_NULL) rt_kprintf("Current Thread: %s\n", rt_thread_self()->name); rt_hw_cpu_shutdown(); }
/** * When ARM7TDMI comes across an instruction which it cannot handle, * it takes the undefined instruction trap. * * @param regs system registers * * @note never invoke this function in application */ void rt_hw_trap_udef(struct rt_hw_register *regs) { rt_kprintf("undefined instruction\n"); rt_hw_show_register(regs); if (rt_thread_self() != RT_NULL) rt_kprintf("Current Thread: %s\n", rt_thread_self()->name); rt_hw_cpu_shutdown(); }
/** * The software interrupt instruction (SWI) is used for entering * Supervisor mode, usually to request a particular supervisor * function. * * @param regs system registers * * @note never invoke this function in application */ void rt_hw_trap_swi(struct rt_hw_register *regs) { rt_kprintf("software interrupt\n"); rt_hw_show_register(regs); if (rt_thread_self() != RT_NULL) rt_kprintf("Current Thread: %s\n", rt_thread_self()->name); rt_hw_cpu_shutdown(); }
/** * An abort indicates that the current memory access cannot be completed, * which occurs during an instruction prefetch. * * @param regs system registers * * @note never invoke this function in application */ void rt_hw_trap_pabt(struct rt_hw_register *regs) { rt_kprintf("prefetch abort\n"); rt_hw_show_register(regs); if (rt_thread_self() != RT_NULL) rt_kprintf("Current Thread: %s\n", rt_thread_self()->name); rt_hw_cpu_shutdown(); }
/** * An abort indicates that the current memory access cannot be completed, * which occurs during an instruction prefetch. * * @param regs system registers * * @note never invoke this function in application */ void rt_hw_trap_pabt(struct rt_hw_exp_stack *regs) { rt_kprintf("prefetch abort:\n"); rt_hw_show_register(regs); #ifdef RT_USING_FINSH list_thread(); #endif rt_hw_cpu_shutdown(); }
/** * The software interrupt instruction (SWI) is used for entering * Supervisor mode, usually to request a particular supervisor * function. * * @param regs system registers * * @note never invoke this function in application */ void rt_hw_trap_swi(struct rt_hw_exp_stack *regs) { rt_kprintf("software interrupt:\n"); rt_hw_show_register(regs); #ifdef RT_USING_FINSH list_thread(); #endif rt_hw_cpu_shutdown(); }
/** * When comes across an instruction which it cannot handle, * it takes the undefined instruction trap. * * @param regs system registers * * @note never invoke this function in application */ void rt_hw_trap_undef(struct rt_hw_exp_stack *regs) { rt_kprintf("undefined instruction:\n"); rt_hw_show_register(regs); #ifdef RT_USING_FINSH list_thread(); #endif rt_hw_cpu_shutdown(); }
/** * Normally, system will never reach here * * @param regs system registers * * @note never invoke this function in application */ void rt_hw_trap_resv(struct rt_hw_exp_stack *regs) { rt_kprintf("reserved trap:\n"); rt_hw_show_register(regs); #ifdef RT_USING_FINSH list_thread(); #endif rt_hw_cpu_shutdown(); }
/** * An abort indicates that the current memory access cannot be completed, * which occurs during an instruction prefetch. * * @param regs system registers * * @note never invoke this function in application */ void rt_hw_trap_pabt(struct rt_hw_register *regs) { rt_hw_show_register(regs); rt_kprintf("prefetch abort\n"); rt_kprintf("thread - %s stack:\n", rt_current_thread->name); rt_hw_backtrace((rt_uint32_t *)regs->fp, (rt_uint32_t)rt_current_thread->entry); rt_hw_cpu_shutdown(); }
/** * When unicore comes across an instruction which it cannot handle, * it takes the extn instruction trap. * * @param regs system registers * * @note never invoke this function in application */ void rt_hw_trap_extn(struct rt_hw_register *regs) { rt_hw_show_register(regs); rt_kprintf("extn instruction\n"); rt_kprintf("thread - %s stack:\n", rt_current_thread->name); rt_hw_backtrace((rt_uint32_t *)regs->fp, (rt_uint32_t)rt_current_thread->entry); rt_hw_cpu_shutdown(); }
/** * When ARM7TDMI comes across an instruction which it cannot handle, * it takes the undefined instruction trap. * * @param regs system registers * * @note never invoke this function in application */ void rt_hw_trap_udef(struct rt_hw_register *regs) { rt_hw_show_register(regs); rt_kprintf("undefined instruction\n"); rt_kprintf("thread - %s stack:\n", rt_current_thread->name); #ifdef RT_USING_FINSH list_thread(); #endif rt_hw_cpu_shutdown(); }
/** * An abort indicates that the current memory access cannot be completed, * which occurs during an instruction prefetch. * * @param regs system registers * * @note never invoke this function in application */ void rt_hw_trap_pabt(struct rt_hw_register *regs) { rt_hw_show_register(regs); rt_kprintf("prefetch abort\n"); rt_kprintf("thread %.*s stack:\n", RT_NAME_MAX, rt_current_thread->name); #ifdef RT_USING_FINSH list_thread(); #endif rt_hw_cpu_shutdown(); }
/** * An abort indicates that the current memory access cannot be completed, * which occurs during a data access. * * @param regs system registers * * @note never invoke this function in application */ void rt_hw_trap_dabt(struct rt_hw_register *regs) { rt_hw_show_register(regs); rt_kprintf("data abort\n"); rt_kprintf("thread - %s stack:\n", rt_current_thread->name); #ifdef RT_USING_FINSH list_thread(); #endif rt_hw_cpu_shutdown(); }
/** * An abort indicates that the current memory access cannot be completed, * which occurs during a data access. * * @param regs system registers * * @note never invoke this function in application */ void rt_hw_trap_dabt(struct rt_hw_register *regs) { #ifdef RT_USING_GDB if (gdb_mem_fault_handler) { regs->pc = (unsigned long)gdb_mem_fault_handler; return; } #endif rt_hw_show_register(regs); rt_kprintf("data abort\n"); rt_kprintf("thread %.*s stack:\n", RT_NAME_MAX, rt_current_thread->name); #ifdef RT_USING_FINSH list_thread(); #endif rt_hw_cpu_shutdown(); }
/** * When ARM7TDMI comes across an instruction which it cannot handle, * it takes the undefined instruction trap. * * @param regs system registers * * @note never invoke this function in application */ void rt_hw_trap_udef(struct rt_hw_register *regs) { #ifdef RT_USING_GDB regs->pc -= 4; //lr in undef is pc + 4 if (gdb_undef_hook(regs)) return; #endif rt_hw_show_register(regs); rt_kprintf("undefined instruction\n"); rt_kprintf("thread %.*s stack:\n", RT_NAME_MAX, rt_current_thread->name); #ifdef RT_USING_FINSH list_thread(); #endif rt_hw_cpu_shutdown(); }
/** * Normally, system will never reach here * * @param regs system registers * * @note never invoke this function in application */ void rt_hw_trap_resv(struct rt_hw_register *regs) { rt_kprintf("not used\n"); rt_hw_show_register(regs); rt_hw_cpu_shutdown(); }