[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/2] target/nios2: Replace magic value by MMU definitions
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 1/2] target/nios2: Replace magic value by MMU definitions |
Date: |
Thu, 28 Jan 2021 00:41:18 +0100 |
cpu_get_phys_page_debug() uses 'DATA LOAD' MMU access type.
The first MMU is the supervisor one.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
target/nios2/helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/nios2/helper.c b/target/nios2/helper.c
index 57c97bde3c6..fea34c957d9 100644
--- a/target/nios2/helper.c
+++ b/target/nios2/helper.c
@@ -209,7 +209,7 @@ hwaddr nios2_cpu_get_phys_page_debug(CPUState *cs, vaddr
addr)
unsigned int hit;
if (cpu->mmu_present && (addr < 0xC0000000)) {
- hit = mmu_translate(env, &lu, addr, 0, 0);
+ hit = mmu_translate(env, &lu, addr, MMU_DATA_LOAD, MMU_SUPERVISOR_IDX);
if (hit) {
vaddr = addr & TARGET_PAGE_MASK;
paddr = lu.paddr + vaddr - lu.vaddr;
--
2.26.2