u-boot/arch/riscv
Heinrich Schuchardt c48e9f310b riscv: restore global data pointer in trap handler
The gp register is used to store U-Boot's global data pointer. We should
not assume that an UEFI application leaves the gp register unchanged as
the UEFI specifications does not define who is the owner of the gp and tp
registers.

So the following sequence should be followed in the trap handler:

* save the caller's gp register
* restore the global data pointer
* serve interrupts or print crash dump and reset
* restore the caller's gp register

Cc: Abner Chang <abner.chang@hpe.com>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>
2020-09-28 12:20:19 +02:00
..
cpu riscv: fu540: Use correct API to get L2 cache controller base address 2020-08-25 09:33:16 +08:00
dts fu540: dtsi: add reset producer and consumer entries 2020-08-04 09:19:41 +08:00
include/asm riscv: define function set_gd() 2020-09-14 23:28:52 +02:00
lib riscv: restore global data pointer in trap handler 2020-09-28 12:20:19 +02:00
config.mk kconfig / kbuild: Re-sync with Linux 4.19 2020-04-10 11:18:32 -04:00
Kconfig Merge branch 'next' 2020-07-06 15:46:38 -04:00
Makefile riscv: add Kconfig entries for the code model 2018-12-18 09:56:26 +08:00