From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: ARM: add support to dump the kernel page tables
Date: Thu, 31 Oct 2013 17:40:50 +0000 [thread overview]
Message-ID: <20131031174050.GF16735@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <52729346.7080709@codeaurora.org>
On Thu, Oct 31, 2013 at 10:28:38AM -0700, Laura Abbott wrote:
> On 10/24/2013 12:16 AM, Russell King - ARM Linux wrote:
> ...
>> + }, {
>> + .mask = L_PTE_MT_MASK,
>> + .val = L_PTE_MT_DEV_SHARED,
>> + .set = "DEV/SHARED",
>> + }, {
>> + .mask = L_PTE_MT_MASK,
>> + .val = L_PTE_MT_DEV_NONSHARED,
>> + .set = "DEV/NONSHARED",
>> + }, {
>
> L_PTE_MT_DEV_SHARED and L_PTE_MT_DEV_NONSHARED are the same on LPAE
> systems which leads to bad output:
>
> 0xcd400000-0xcd401000 4K RW NX SHD DEV/SHARED DEV/NONSHARED
So we probably want to make this conditional:
#if L_PTE_MT_DEV_SHARED != L_PTE_MT_DEV_NONSHARED
... dev/non-shared entry
#endif
or we use a separate table for LPAE.
>> + .mask = L_PTE_MT_MASK,
>> + .val = L_PTE_MT_DEV_WC,
>> + .set = "DEV/WC",
>> + }, {
>> + .mask = L_PTE_MT_MASK,
>> + .val = L_PTE_MT_DEV_CACHED,
>> + .set = "DEV/CACHED",
>> + },
>> +};
>> +
>> +static const struct prot_bits section_bits[] = {
>> + /* These are approximate */
>> + {
>> + .mask = PMD_SECT_AP_READ | PMD_SECT_AP_WRITE,
>> + .val = 0,
>> + .set = " ro",
>> + }, {
>> + .mask = PMD_SECT_AP_READ | PMD_SECT_AP_WRITE,
>> + .val = PMD_SECT_AP_WRITE,
>> + .set = " RW",
>> + }, {
>> + .mask = PMD_SECT_AP_READ | PMD_SECT_AP_WRITE,
>> + .val = PMD_SECT_AP_READ,
>> + .set = "USR RO",
>> + }, {
>> + .mask = PMD_SECT_AP_READ | PMD_SECT_AP_WRITE,
>> + .val = PMD_SECT_AP_READ | PMD_SECT_AP_WRITE,
>> + .set = "USR RW",
>> + }, {
>
> Same issue here for PMD_SECT_AP_READ and PMD_SEC_AP_WRITE, both of those
> are 0 on LPAE so the output looks strange:
>
> 0xc0000000-0xcd400000 212M ro RW USR RO USR RW x SHD
I think this needs to be a separate table - it's just too different,
and it looks like the PMD_SECT_USER and PMD_SECT_RDONLY can be
separately decoded.
next prev parent reply other threads:[~2013-10-31 17:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-24 7:16 ARM: add support to dump the kernel page tables Russell King - ARM Linux
2013-10-24 10:51 ` Steve Capper
2013-10-24 12:23 ` Russell King - ARM Linux
2013-10-24 12:55 ` Steve Capper
2013-10-24 15:49 ` Russell King - ARM Linux
2013-10-24 16:25 ` Steve Capper
2013-10-24 21:31 ` Russell King - ARM Linux
2013-10-31 17:28 ` Laura Abbott
2013-10-31 17:40 ` Russell King - ARM Linux [this message]
2013-11-26 13:50 ` Uwe Kleine-König
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=20131031174050.GF16735@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.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).