]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
riscv: set trap vector earlier
authoryang.zhang <yang.zhang@hexintek.com>
Wed, 8 May 2024 02:24:45 +0000 (10:24 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Sep 2024 09:11:37 +0000 (11:11 +0200)
commitce2e63804abf4e1f3a1a13ff09c6540f587dc711
treed2c2a1267f51ba2e44acb66ca608377761109a21
parent124451bbc2d3aae70f0c54c02129312237d01871
riscv: set trap vector earlier

[ Upstream commit 6ad8735994b854b23c824dd6b1dd2126e893a3b4 ]

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>
arch/riscv/kernel/head.S