xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: xen-devel@lists.xen.org
Cc: Julien Grall <julien.grall@linaro.org>,
	stefano.stabellini@citrix.com, ian.campbell@citrix.com,
	patches@linaro.org
Subject: [PATCH] xen/arm: Update VTCR to use region size of 2^40 bytes instead of 2^39
Date: Thu,  6 Jun 2013 13:06:55 +0100	[thread overview]
Message-ID: <1370520415-5598-1-git-send-email-julien.grall@linaro.org> (raw)

According to the ARM manual, T0SZ is a 4-bit signed integer.
The current value of T0SZ = b1000 which is equal to -7. This is result
to a size of 2^39 bytes instead of the desired value 2^40.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
---
 xen/arch/arm/mm.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
index d1290cd..7d4e186 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -315,9 +315,9 @@ void __cpuinit setup_virt_paging(void)
     /* Setup Stage 2 address translation */
     /* SH0=00, ORGN0=IRGN0=01
      * SL0=01 (Level-1)
-     * T0SZ=(1)1000 = -8 (40 bit physical addresses)
+     * T0SZ=(1)1111 = -8 (40 bit physical addresses)
      */
-    WRITE_SYSREG32(0x80002558, VTCR_EL2); isb();
+    WRITE_SYSREG32(0x8000255f, VTCR_EL2); isb();
 }
 
 /* This needs to be a macro to stop the compiler spilling to the stack
-- 
1.7.10.4

             reply	other threads:[~2013-06-06 12:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-06 12:06 Julien Grall [this message]
2013-06-06 13:17 ` [PATCH] xen/arm: Update VTCR to use region size of 2^40 bytes instead of 2^39 Tim Deegan
2013-06-06 13:25   ` Stefano Stabellini
2013-06-06 13:51   ` Julien Grall

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=1370520415-5598-1-git-send-email-julien.grall@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=ian.campbell@citrix.com \
    --cc=patches@linaro.org \
    --cc=stefano.stabellini@citrix.com \
    --cc=xen-devel@lists.xen.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).