aboutsummaryrefslogtreecommitdiff
path: root/arch/mips/lib/bootm.c
diff options
context:
space:
mode:
authorWeijie Gao <weijie.gao@mediatek.com>2020-04-21 09:28:25 +0200
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2020-04-27 20:29:33 +0200
commit71059736b854462a474bc329a366c3392cf92462 (patch)
treeedbc20d4ceefa85a0d269e3e52c877556a39facf /arch/mips/lib/bootm.c
parent56ed625ba288faaca0c8b8cbd81e777548b6f7de (diff)
downloadu-boot-71059736b854462a474bc329a366c3392cf92462.zip
u-boot-71059736b854462a474bc329a366c3392cf92462.tar.gz
u-boot-71059736b854462a474bc329a366c3392cf92462.tar.bz2
mips: add support to restore exception vector base before booting linux
In U-Boot the exception vector base will be moved to top of memory, to be used to display register dump when exception occurs. But some old linux kernel does not honor the base set in CP0_EBASE. A modified exception vector base will cause kernel crash. This patch adds an option to enable reset exception vector base to its previous value, or a user configured value before booting linux kernel. Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Diffstat (limited to 'arch/mips/lib/bootm.c')
-rw-r--r--arch/mips/lib/bootm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
index 8c0d767..f1db6d2 100644
--- a/arch/mips/lib/bootm.c
+++ b/arch/mips/lib/bootm.c
@@ -294,6 +294,9 @@ static void boot_jump_linux(bootm_headers_t *images)
bootstage_report();
#endif
+ if (CONFIG_IS_ENABLED(RESTORE_EXCEPTION_VECTOR_BASE))
+ trap_restore();
+
if (images->ft_len)
kernel(-2, (ulong)images->ft_addr, 0, 0);
else