Commit ea438d0a authored by Daniel Leung's avatar Daniel Leung Committed by Anas Nashif
Browse files

xtensa: asm2: add code for double exception vector



This adds a simple infinite loop when double exception is raised.
Without this, if double exception occurs, it would execute
arbitrary code.

Signed-off-by: default avatarDaniel Leung <daniel.leung@intel.com>
parent 04ae3808
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -307,4 +307,18 @@ _KernelExceptionVector:
	j _Level1Vector
.popsection

#ifdef XCHAL_DOUBLEEXC_VECTOR_VADDR
.pushsection .DoubleExceptionVector.text, "ax"
.global _DoubleExceptionVector
_DoubleExceptionVector:
#if XCHAL_HAVE_DEBUG
/* Signals an unhandled double exception */
1:	break	1, 4
#else
1:
#endif
	j	1b
.popsection
#endif

#endif /* CONFIG_XTENSA_ASM2 */