zephyr/arch
Martin Åberg 83f733ce59 SPARC: improve fatal log
The fatal log now contains
- Trap type in human readable representation
- Integer registers visible to the program when trap was taken
- Special register values such as PC and PSR
- Backtrace with PC and SP

If CONFIG_EXTRA_EXCEPTION_INFO is enabled, then all the above is
logged. If not, only the special registers are logged.

The format is inspired by the GRMON debug monitor and TSIM simulator.
A quick guide on how to use the values is in fatal.c.

It now looks like this:

E: tt = 0x02, illegal_instruction
E:
E:       INS        LOCALS     OUTS       GLOBALS
E:   0:  00000000   f3900fc0   40007c50   00000000
E:   1:  00000000   40004bf0   40008d30   40008c00
E:   2:  00000000   40004bf4   40008000   00000003
E:   3:  40009158   00000000   40009000   00000002
E:   4:  40008fa8   40003c00   40008fa8   00000008
E:   5:  40009000   f3400fc0   00000000   00000080
E:   6:  4000a1f8   40000050   4000a190   00000000
E:   7:  40002308   00000000   40001fb8   000000c1
E:
E: psr: f30000c7   wim: 00000008   tbr: 40000020   y: 00000000
E:  pc: 4000a1f4   npc: 4000a1f8
E:
E:       pc         sp
E:  #0   4000a1f4   4000a190
E:  #1   40002308   4000a1f8
E:  #2   40003b24   4000a258

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2021-03-25 17:48:23 +01:00
..
arc kernel: arch: introduce k_float_enable() 2021-03-25 14:13:23 +01:00
arm arch: arm: remove compat headers 2021-03-25 16:40:25 +01:00
common gen_isr_tables: Added check of the IRQ num before accessing the vt 2021-01-24 10:12:54 -05:00
nios2 kernel: Cleanup logger setup in kernel files 2020-11-27 09:56:34 -05:00
posix kernel: Add new k_thread_abort()/k_thread_join() 2021-02-24 16:39:15 -05:00
riscv kernel: arch: introduce k_float_enable() 2021-03-25 14:13:23 +01:00
sparc SPARC: improve fatal log 2021-03-25 17:48:23 +01:00
x86 kernel: arch: use ENOTSUP instead of ENOSYS in k_float_disable() 2021-03-25 14:13:23 +01:00
xtensa arch/xtensa: Remember to spill windows in arch_cohere_stacks() 2021-03-08 11:14:27 -05:00
CMakeLists.txt cmake: fix include directories to work with out-of-tree arch 2020-08-05 08:06:07 -04:00
Kconfig SPARC: improve fatal log 2021-03-25 17:48:23 +01:00