gonzui


Format: Advanced Search

mtkernel_3/kernel/sysdepend/cpu/core/armv7a/exc_hdl.cbare sourcepermlink (0.00 seconds)

Search this content:

    1: /*
    2:  *----------------------------------------------------------------------
    3:  *    micro T-Kernel 3.00.05
    4:  *
    5:  *    Copyright (C) 2006-2021 by Ken Sakamura.
    6:  *    This software is distributed under the T-License 2.2.
    7:  *----------------------------------------------------------------------
    8:  *
    9:  *    Released by TRON Forum(http://www.tron.org) at 2021/11.
   10:  *
   11:  *----------------------------------------------------------------------
   12:  */
   13: 
   14: #include <sys/machine.h>
   15: #ifdef CPU_CORE_ARMV7A
   16: 
   17: /*
   18:  *      exc_hdr.c (ARMv7-A)
   19:  *      Exception handler
   20:  */
   21: 
   22: #include <tk/tkernel.h>
   23: #include <tm/tmonitor.h>
   24: #include <kernel.h>
   25: #include "../../../sysdepend.h"
   26: 
   27: #if USE_EXCEPTION_DBG_MSG
   28:         #define EXCEPTION_DBG_MSG(a)   tm_printf((UB*)a)
   29: #else
   30:         #define EXCEPTION_DBG_MSG(a)
   31: #endif
   32: 
   33: /*
   34:  * Undefined instruction exception handler
   35:  */
   36: WEAK_FUNC EXPORT void FIQ_Handler(void)
   37: {
   38:         EXCEPTION_DBG_MSG("FIQ\n");
   39:         while(1);
   40: }
   41: 
   42: 
   43: /*
   44:  * Undefined instruction exception handler
   45:  */
   46: WEAK_FUNC EXPORT void UndefinedInst_Handler(void)
   47: {
   48:         EXCEPTION_DBG_MSG("Undef\n");
   49:         while(1);
   50: }
   51: 
   52: /*
   53:  * Prefetch abort exception handler
   54:  */
   55: WEAK_FUNC EXPORT void PrefetchAbort_Handler(void)
   56: {
   57:         EXCEPTION_DBG_MSG("iabort\n");
   58:         while(1);
   59: }
   60: 
   61: /*
   62:  * Data abort exception handler
   63:  */
   64: WEAK_FUNC EXPORT void DataAbort_Handler(void)
   65: {
   66:         EXCEPTION_DBG_MSG("dabort\n");
   67:         while(1);
   68: }
   69: 
   70: /*
   71:  * VFP invalid handler
   72:  */
   73: WEAK_FUNC EXPORT void VFPInvalid_Handler(void)
   74: {
   75:         EXCEPTION_DBG_MSG("VFP invalid\n");
   76:         while(1);
   77: }
   78: 
   79: /*
   80:  * Default Handler (Undefine Interrupt) 
   81:  */
   82: WEAK_FUNC EXPORT void Default_Handler(void)
   83: {
   84:         EXCEPTION_DBG_MSG("Undefine Interrupt\n");
   85:         while(1);
   86: }
   87: 
   88: 
   89: /*
   90:  * SVC default Handler (Undefine SVC) 
   91:  */
   92: WEAK_FUNC EXPORT void SVC_default_Handler(void)
   93: {
   94:         EXCEPTION_DBG_MSG("Undefine SVC\n");
   95:         while(1);
   96: }
   97: 
   98: 
   99: #endif  /* CPU_CORE_ARMV7A */