mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
target/riscv: remove RISCV_FEATURE_MMU
RISCV_FEATURE_MMU is set whether cpu->cfg.mmu is set, so let's just use the flag directly instead. With this change the enum is also removed. It is worth noticing that this enum, and all the RISCV_FEATURES_* that were contained in it, predates the existence of the cpu->cfg object. Today, using cpu->cfg is an easier way to retrieve all the features and extensions enabled in the hart. Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Reviewed-by: Weiwei Li <liweiwei@iscas.ac.cn> Reviewed-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> Message-ID: <20230222185205.355361-10-dbarboza@ventanamicro.com> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
This commit is contained in:
parent
c95c9d200e
commit
dcf654a3e8
6 changed files with 5 additions and 16 deletions
|
@ -796,7 +796,7 @@ static int get_physical_address(CPURISCVState *env, hwaddr *physical,
|
|||
mode = PRV_U;
|
||||
}
|
||||
|
||||
if (mode == PRV_M || !riscv_feature(env, RISCV_FEATURE_MMU)) {
|
||||
if (mode == PRV_M || !riscv_cpu_cfg(env)->mmu) {
|
||||
*physical = addr;
|
||||
*prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC;
|
||||
return TRANSLATE_SUCCESS;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue