u-boot/arch/mips/include/asm
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
..
mach-generic MIPS: sync I/O related header files with linux-4.4 2016-01-16 21:06:46 +01:00
addrspace.h MIPS: fix SPDX license identifier in remaining arch header files 2016-01-16 21:06:46 +01:00
asm-offsets.h MIPS: add asm-offsets for struct pt_regs 2016-11-30 16:11:46 +01:00
asm.h MIPS: sync processor and register definitions with linux-4.4 2016-01-16 21:06:46 +01:00
bitops.h MIPS: fix SPDX license identifier in remaining arch header files 2016-01-16 21:06:46 +01:00
byteorder.h MIPS: fix SPDX license identifier in remaining arch header files 2016-01-16 21:06:46 +01:00
cache.h MIPS: Probe cache line sizes once during boot 2016-09-21 15:04:04 +02:00
cachectl.h MIPS: fix SPDX license identifier in remaining arch header files 2016-01-16 21:06:46 +01:00
cacheops.h MIPS: fix mips_cache fallback without __builtin_mips_cache 2016-03-09 11:00:40 +01:00
cm.h MIPS: Join the coherent domain when a CM is present 2016-09-21 15:04:04 +02:00
config.h MIPS: add support for pre-relocation malloc 2015-01-21 14:07:23 +01:00
const.h MIPS: fix SPDX license identifier in remaining arch header files 2016-01-16 21:06:46 +01:00
cpu-features.h MIPS: sync I/O related header files with linux-4.4 2016-01-16 21:06:46 +01:00
global_data.h MIPS: L2 cache support 2016-09-21 15:04:04 +02:00
gpio.h MIPS: add asm/gpio.h to fix compilation error with CONFIG_CMD_GPIO. 2016-01-16 21:06:45 +01:00
io.h MIPS: Use CPHYSADDR to implement mips32 virt_to_phys 2016-05-31 09:38:11 +02:00
isadep.h MIPS: sync processor and register definitions with linux-4.4 2016-01-16 21:06:46 +01:00
linkage.h efi: Use asmlinkage for EFIAPI 2016-10-19 09:01:53 +02:00
malta.h malta: IDE support 2015-01-29 13:11:02 +01:00
mipsregs.h MIPS: fix iand optimize setup of CP0 registers 2016-11-30 16:11:46 +01:00
pgtable-bits.h MIPS: sync I/O related header files with linux-4.4 2016-01-16 21:06:46 +01:00
posix_types.h MIPS: fix SPDX license identifier in remaining arch header files 2016-01-16 21:06:46 +01:00
processor.h MIPS: sync processor and register definitions with linux-4.4 2016-01-16 21:06:46 +01:00
ptrace.h MIPS: sync processor and register definitions with linux-4.4 2016-01-16 21:06:46 +01:00
reboot.h MIPS: fix SPDX license identifier in remaining arch header files 2016-01-16 21:06:46 +01:00
reg.h MIPS: fix SPDX license identifier in remaining arch header files 2016-01-16 21:06:46 +01:00
regdef.h MIPS: sync processor and register definitions with linux-4.4 2016-01-16 21:06:46 +01:00
sections.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
sgidefs.h MIPS: fix SPDX license identifier in remaining arch header files 2016-01-16 21:06:46 +01:00
string.h MIPS: fix SPDX license identifier in remaining arch header files 2016-01-16 21:06:46 +01:00
system.h MIPS: add handling for generic and EJTAG exceptions 2016-11-30 16:12:17 +01:00
types.h MIPS: fix SPDX license identifier in remaining arch header files 2016-01-16 21:06:46 +01:00
u-boot-mips.h MIPS: add handling for generic and EJTAG exceptions 2016-11-30 16:12:17 +01:00
u-boot.h mips: Drop unused code in u-boot.h 2016-05-27 15:39:53 -04:00
unaligned.h MIPS: fix SPDX license identifier in remaining arch header files 2016-01-16 21:06:46 +01:00