From: Justin Fletcher <gerph@gerph.org>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] ARM MMU translation - fix small (4k) page access
Date: Fri, 2 Feb 2007 09:58:52 +0000 (GMT) [thread overview]
Message-ID: <Pine.LNX.4.63.0702020951190.2647@buttercup.gerph.org> (raw)
In-Reply-To: <45C2CA29.1010107@hoko.org>
On Fri, 2 Feb 2007, Scott Oom wrote:
> Hello,
> Found a problem when using small pages and getting permission faults.
> This patch corrects the decoding of access permissions for small pages
> on ARM, was just off by 2 bits.
I may be confused on this, but it still doesn't seem right to me.
You have...
- ap = (desc >> (4 + ((address >> 13) & 6))) & 3;
+ ap = (desc >> (4 + ((address >> 11) & 6))) & 3; /* SRO */
For 4K pages, the L2 table is ...
b0-1 = 2
b2 = B
b3 = C
b4-5 = AP0
b6-7 = AP1
b8-9 = AP2
b10-11=AP3
b12-31=physical address
(from ARMARM 'D', 3.3.7)
The use of AP0-AP3 is dependant on bits 10 and 11. So, the code should be
more like...
ap = (desc >> (4 + ((address >> 10) & 3) )) & 3;
That is, (address>>10) & 3 => bits 10 and 11
add on 4 as the offset to the AP fields in the descriptor
shift down and & 3 to leave just those two bits.
The AP bits haven't been used all that often in my own use of qemu, and I
imagine that most uses set all 3 to the same value.
--
Gerph <http://gerph.org/>
... It's only a lifetime.
next prev parent reply other threads:[~2007-02-02 9:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-02 5:20 [Qemu-devel] [PATCH] ARM MMU translation - fix small (4k) page access Scott Oom
2007-02-02 9:58 ` Justin Fletcher [this message]
2007-02-02 17:48 ` Justin Fletcher
2007-02-02 18:33 ` Scott Oom
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=Pine.LNX.4.63.0702020951190.2647@buttercup.gerph.org \
--to=gerph@gerph.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 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).