kernel: add k_panic() and k_oops() APIs
Unlike assertions, these APIs are active at all times. The kernel will treat these errors in the same way as fatal CPU exceptions. Ultimately, the policy of what to do with these errors is implemented in _SysFatalErrorHandler. If the archtecture supports it, a real CPU exception can be triggered which will provide a complete register dump and PC value when the problem occurs. This will provide more helpful information than a fake exception stack frame (_default_esf) passed to the arch-specific exception handling code. Issue: ZEP-843 Change-Id: I8f136905c05bb84772e1c5ed53b8e920d24eb6fd Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
dc91536855
commit
cdb94d6425
19 changed files with 192 additions and 81 deletions
|
@ -50,6 +50,8 @@ extern "C" {
|
|||
#define _NANO_ERR_STACK_CHK_FAIL (2) /* Stack corruption detected */
|
||||
#define _NANO_ERR_ALLOCATION_FAIL (3) /* Kernel Allocation Failure */
|
||||
#define _NANO_ERR_RESERVED_IRQ (4) /* Reserved interrupt */
|
||||
#define _NANO_ERR_KERNEL_OOPS (5) /* Kernel oops (fatal to thread) */
|
||||
#define _NANO_ERR_KERNEL_PANIC (6) /* Kernel panic (fatal to system) */
|
||||
|
||||
/* Xtensa GPRs are often designated by two different names */
|
||||
#define sys_define_gpr_with_alias(name1, name2) union { u32_t name1, name2; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue