xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <ian.campbell@citrix.com>, xen-devel@lists.xen.org
Cc: tim@xen.org, stefano.stabellini@eu.citrix.com
Subject: Re: [PATCH] xen: arm: Write to the correct PT when mapping the DTB on boot on arm64
Date: Fri, 25 Jul 2014 13:12:54 +0100	[thread overview]
Message-ID: <53D249C6.70204@linaro.org> (raw)
In-Reply-To: <ae6d0334bc37442af171d8b7196995894d01f5e3.1406280726.git.ian.campbell@citrix.com>

On 07/25/2014 10:32 AM, Ian Campbell wrote:
> We currently get away with this because when debug=y and earlyprintk is enabled
> the previous block of (conditinal) code would have set this up. Historically we

NIT: conditional

> mostly got away with it even without those options because the pre paging code
> would normally (at least on h/w we test) leave x4 set to the paddr of
> boot_second.
> 
> This latent bug has always been present but was exposed by ca59618967fe "xen:
> arm: Handle 4K aligned hypervisor load address" (or one of the related patches)
> since now x4 is quite likely to point to boot_third not boot_second.
> 
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>

Acked-by: Julien Grall <julien.grall@linaro.org>

Regards,

> ---
>  xen/arch/arm/arm64/head.S |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S
> index dcb7071..43b5e72 100644
> --- a/xen/arch/arm/arm64/head.S
> +++ b/xen/arch/arm/arm64/head.S
> @@ -428,6 +428,7 @@ paging:
>          /* Map the DTB in the boot misc slot */
>          cbnz  x22, 1f                /* Only on boot CPU */
>  
> +        ldr   x4, =boot_second       /* x4 := vaddr (boot_second) */
>          lsr   x2, x21, #SECOND_SHIFT
>          lsl   x2, x2, #SECOND_SHIFT  /* x2 := 2MB-aligned paddr of DTB */
>          mov   x3, #PT_MEM            /* x2 := 2MB RAM incl. DTB */
> 


-- 
Julien Grall

  reply	other threads:[~2014-07-25 12:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-25  9:32 [PATCH] xen: arm: Write to the correct PT when mapping the DTB on boot on arm64 Ian Campbell
2014-07-25 12:12 ` Julien Grall [this message]
2014-08-04 14:01   ` Ian Campbell

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=53D249C6.70204@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=ian.campbell@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tim@xen.org \
    --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).