mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-07 01:45:18 +02:00
riscv: set trap vector earlier
[ Upstream commit 6ad8735994
]
The exception vector of the booting hart is not set before enabling
the mmu and then still points to the value of the previous firmware,
typically _start. That makes it hard to debug setup_vm() when bad
things happen. So fix that by setting the exception vector earlier.
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: yang.zhang <yang.zhang@hexintek.com>
Link: https://lore.kernel.org/r/20240508022445.6131-1-gaoshanliukou@163.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
124451bbc2
commit
ce2e63804a
|
@ -305,6 +305,9 @@ clear_bss_done:
|
||||||
#else
|
#else
|
||||||
mv a0, a1
|
mv a0, a1
|
||||||
#endif /* CONFIG_BUILTIN_DTB */
|
#endif /* CONFIG_BUILTIN_DTB */
|
||||||
|
/* Set trap vector to spin forever to help debug */
|
||||||
|
la a3, .Lsecondary_park
|
||||||
|
csrw CSR_TVEC, a3
|
||||||
call setup_vm
|
call setup_vm
|
||||||
#ifdef CONFIG_MMU
|
#ifdef CONFIG_MMU
|
||||||
la a0, early_pg_dir
|
la a0, early_pg_dir
|
||||||
|
|
Loading…
Reference in New Issue
Block a user