From: Alexandre Courbot <gnurou@gmail.com>
To: Aurelien Jarno <aurelien@aurel32.net>
Cc: Alexandre Courbot <gnurou@gmail.com>, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH v2] target-sh4: update PTEH upon MMU exception
Date: Wed, 26 Jan 2011 11:57:53 +0900 [thread overview]
Message-ID: <1296010673-3841-1-git-send-email-gnurou@gmail.com> (raw)
In-Reply-To: <20110125080510.GD23331@hall.aurel32.net>
Update the PTEH register to contain the VPN at which an MMU
exception occured as specified by the SH4 reference.
Signed-off-by: Alexandre Courbot <gnurou@gmail.com>
---
target-sh4/helper.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/target-sh4/helper.c b/target-sh4/helper.c
index 19b309b..8f8c66c 100644
--- a/target-sh4/helper.c
+++ b/target-sh4/helper.c
@@ -453,6 +453,10 @@ int cpu_sh4_handle_mmu_fault(CPUState * env, target_ulong address, int rw,
if (ret != MMU_OK) {
env->tea = address;
+ if (ret != MMU_DTLB_MULTIPLE && ret != MMU_ITLB_MULTIPLE) {
+ env->pteh = (env->pteh & PTEH_ASID_MASK) |
+ (address & PTEH_VPN_MASK);
+ }
switch (ret) {
case MMU_ITLB_MISS:
case MMU_DTLB_MISS_READ:
--
1.7.3.5
next prev parent reply other threads:[~2011-01-26 2:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-25 4:51 [Qemu-devel] [PATCH] target-sh4: fix index of address read error exception Alexandre Courbot
2011-01-25 4:51 ` [Qemu-devel] [PATCH] target-sh4: update PTEH upon MMU exception Alexandre Courbot
2011-01-25 8:05 ` Aurelien Jarno
2011-01-26 2:57 ` Alexandre Courbot [this message]
2011-01-26 13:31 ` [Qemu-devel] [PATCH v2] " Aurelien Jarno
2011-01-25 8:03 ` [Qemu-devel] [PATCH] target-sh4: fix index of address read error exception Aurelien Jarno
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=1296010673-3841-1-git-send-email-gnurou@gmail.com \
--to=gnurou@gmail.com \
--cc=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.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).