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: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2019-07-23 16:25:06 -07:00 committed by Anas Nashif
commit ea438d0a9b

View file

@ -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 */