RISC-V: Skip setting up PMPs on traps
authorPalmer Dabbelt <palmerdabbelt@google.com>
Tue, 7 Apr 2020 18:33:40 +0000 (11:33 -0700)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Mon, 18 May 2020 18:38:08 +0000 (11:38 -0700)
commiteb077c9c387f931767d7b737bdf696b753c57e46
tree88af9168580ea274222a54df31c66de3f53f5983
parent045c654220e5772b6bc59e89b5700fa4673c6450
RISC-V: Skip setting up PMPs on traps

The RISC-V ISA manual says that PMPs are WARL, but it appears the K210
doesn't implement them and instead traps on the unsupported accesses.
This patch handles those traps by just skipping the PMP
initialization entirely, under the theory that machines that trap on PMP
accesses must allow memory accesses as otherwise they're pretty useless.

Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/kernel/head.S