From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: qemu-devel@nongnu.org
Cc: "Marek Vasut" <marex@denx.de>, "Chris Wulff" <crwulff@gmail.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"Joe Komlodi" <komlodi@xilinx.com>
Subject: [PATCH 1/2] target/nios2: Replace magic value by MMU definitions
Date: Thu, 28 Jan 2021 00:41:18 +0100 [thread overview]
Message-ID: <20210127234119.3537399-2-f4bug@amsat.org> (raw)
In-Reply-To: <20210127234119.3537399-1-f4bug@amsat.org>
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
next prev parent reply other threads:[~2021-01-27 23:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-27 23:41 [PATCH 0/2] target/nios2: Pass MMUAccessType to mmu_translate() Philippe Mathieu-Daudé
2021-01-27 23:41 ` Philippe Mathieu-Daudé [this message]
2021-02-04 2:44 ` [PATCH 1/2] target/nios2: Replace magic value by MMU definitions Richard Henderson
2021-01-27 23:41 ` [PATCH 2/2] target/nios2: Use MMUAccessType enum type when possible Philippe Mathieu-Daudé
2021-02-04 2:45 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210127234119.3537399-2-f4bug@amsat.org \
--to=f4bug@amsat.org \
--cc=crwulff@gmail.com \
--cc=komlodi@xilinx.com \
--cc=marex@denx.de \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).