From: Paul Brook <paul@nowt.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [6099] Implement ARMv7 MMU access permissions.
Date: Fri, 19 Dec 2008 12:39:01 +0000 [thread overview]
Message-ID: <E1LDedB-0000AD-28@cvs.savannah.gnu.org> (raw)
Revision: 6099
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6099
Author: pbrook
Date: 2008-12-19 12:39:00 +0000 (Fri, 19 Dec 2008)
Log Message:
-----------
Implement ARMv7 MMU access permissions.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Modified Paths:
--------------
trunk/target-arm/helper.c
Modified: trunk/target-arm/helper.c
===================================================================
--- trunk/target-arm/helper.c 2008-12-18 22:51:31 UTC (rev 6098)
+++ trunk/target-arm/helper.c 2008-12-19 12:39:00 UTC (rev 6099)
@@ -900,12 +900,16 @@
return PAGE_READ | PAGE_WRITE;
case 3:
return PAGE_READ | PAGE_WRITE;
- case 4: case 7: /* Reserved. */
+ case 4: /* Reserved. */
return 0;
case 5:
return is_user ? 0 : prot_ro;
case 6:
return prot_ro;
+ case 7:
+ if (!arm_feature (env, ARM_FEATURE_V7))
+ return 0;
+ return prot_ro;
default:
abort();
}
@@ -1085,6 +1089,12 @@
if (xn && access_type == 2)
goto do_fault;
+ /* The simplified model uses AP[0] as an access control bit. */
+ if ((env->cp15.c1_sys & (1 << 29)) && (ap & 1) == 0) {
+ /* Access flag fault. */
+ code = (code == 15) ? 6 : 3;
+ goto do_fault;
+ }
*prot = check_ap(env, ap, domain, access_type, is_user);
if (!*prot) {
/* Access permission fault. */
reply other threads:[~2008-12-19 12:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=E1LDedB-0000AD-28@cvs.savannah.gnu.org \
--to=paul@nowt.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.