u-boot-brain/arch/mips
Daniel Schwierzeck 6c59363004 MIPS: add handling for generic and EJTAG exceptions
Add exception handlers for generic and EJTAG exceptions. Most of
the assembly code is imported from Linux kernel and adapted to U-Boot.
The exception vector table will be reserved above the stack before
U-Boot is relocated. The exception handlers will be installed and
activated after relocation in the initr_traps hook function.

Generic exceptions are handled by showing a CPU register dump similar
to Linux kernel. For example:

malta # md 1
00000001:
Ooops:
$ 0   : 00000000 00000000 00000009 00000004
$ 4   : 8ff7e108 00000000 0000003a 00000000
$ 8   : 00000008 00000001 8ff7cd18 00000004
$12   : 00000002 00000000 00000005 0000003a
$16   : 00000004 00000040 00000001 00000001
$20   : 00000000 8fff53c0 00000008 00000004
$24   : ffffffff 8ffdea44
$28   : 90001650 8ff7cd00 00000004 8ffe6818
Hi    : 00000000
Lo    : 00000004
epc   : 8ffe6848 (text bfc28848)
ra    : 8ffe6818 (text bfc28818)
Status: 00000006
Cause : 00000410 (ExcCode 04)
BadVA : 8ff9e928
PrId  : 00019300
 ### ERROR ### Please RESET the board ###

EJTAG exceptions are checked for SDBBP and delegated to the SDBBP handler
if necessary. Otherwise the debug mode will simply be exited. The SDBBP
handler currently prints the contents of registers c0_depc and c0_debug.
This could be extended in the future to handle semi-hosting according to
the MIPS UHI specification.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Paul Burton <paul.burton@imgtec.com>
Tested-by: Paul Burton <paul.burton@imgtec.com>
2016-11-30 16:12:17 +01:00
..
cpu MIPS: add possibility to setup initial stack and global data in SRAM 2016-11-30 16:11:46 +01:00
dts boston: Introduce support for the MIPS Boston development board 2016-09-21 16:24:36 +02:00
include/asm MIPS: add handling for generic and EJTAG exceptions 2016-11-30 16:12:17 +01:00
lib MIPS: add handling for generic and EJTAG exceptions 2016-11-30 16:12:17 +01:00
mach-ath79 MIPS: make inclusion of ROM exception vectors configurable 2016-11-30 16:07:17 +01:00
mach-au1x00 Fix spelling of "resetting". 2016-10-31 10:13:17 -04:00
mach-pic32 MIPS: make inclusion of ROM exception vectors configurable 2016-11-30 16:07:17 +01:00
config.mk MIPS: provide a default u-boot-spl.lds 2016-05-31 09:38:11 +02:00
Kconfig MIPS: add possibility to setup initial stack and global data in SRAM 2016-11-30 16:11:46 +01:00
Makefile MIPS: add tune for MIPS 34kc 2016-05-31 09:38:11 +02:00