kernel: fatal: use nested exception info in z_fatal_error

In z_fatal_error() we invoke the arch-specific API that
evaluates whether we are in a nested exception. We then
use the result to log a message that the error occurred
in ISR. In non-test mode, we unconditionally panic, if
an exception has occurred in an ISR and the fatal error
handler has not returned (apart from the case of an
error in stack sentinel check).

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
Ioannis Glaropoulos 2019-10-07 11:24:36 +02:00 committed by Andrew Boie
commit df02923944
2 changed files with 40 additions and 7 deletions

View file

@ -4794,7 +4794,7 @@ static inline void k_cpu_atomic_idle(unsigned int key)
extern void z_sys_power_save_idle_exit(s32_t ticks);
#ifdef Z_ARCH_EXCEPT
/* This archtecture has direct support for triggering a CPU exception */
/* This architecture has direct support for triggering a CPU exception */
#define z_except_reason(reason) Z_ARCH_EXCEPT(reason)
#else