target/riscv/pmp: Restrict priviledged PMP to system-mode emulation

The RISC-V Physical Memory Protection is restricted to privileged
modes. Restrict its compilation to QEMU system builds.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
This commit is contained in:
Philippe Mathieu-Daudé 2019-07-23 14:08:15 +02:00 committed by Palmer Dabbelt
parent 04ece4f820
commit 0b84b6629d
No known key found for this signature in database
GPG key ID: EF4CA1502CCBAB41
2 changed files with 2 additions and 5 deletions

View file

@ -1,4 +1,5 @@
obj-y += translate.o op_helper.o cpu_helper.o cpu.o csr.o fpu_helper.o gdbstub.o pmp.o
obj-y += translate.o op_helper.o cpu_helper.o cpu.o csr.o fpu_helper.o gdbstub.o
obj-$(CONFIG_SOFTMMU) += pmp.o
DECODETREE = $(SRC_PATH)/scripts/decodetree.py

View file

@ -28,8 +28,6 @@
#include "qapi/error.h"
#include "cpu.h"
#ifndef CONFIG_USER_ONLY
#define RISCV_DEBUG_PMP 0
#define PMP_DEBUG(fmt, ...) \
do { \
@ -382,5 +380,3 @@ target_ulong pmpaddr_csr_read(CPURISCVState *env, uint32_t addr_index)
return 0;
}
}
#endif