All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: Guillaume Tucker <guillaume.tucker@collabora.com>,
	Russell King <linux@armlinux.org.uk>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	Nicolas Pitre <nico@fluxnic.net>
Subject: Re: [PATCH] ARM: head.S: explicitly map DT even if it lives in the first physical section
Date: Tue, 17 Nov 2020 00:33:41 +0100	[thread overview]
Message-ID: <CACRpkdZwOdARRRYOTqh=a9FWvgS5gsZsOrt8A2qFgfa9qqn-mg@mail.gmail.com> (raw)
In-Reply-To: <20201116145650.25513-1-ardb@kernel.org>

On Mon, Nov 16, 2020 at 3:57 PM Ard Biesheuvel <ardb@kernel.org> wrote:

> The early ATAGS/DT mapping code uses SECTION_SHIFT to mask low order
> bits of R2, and decides that no ATAGS/DTB were provided if the resulting
> value is 0x0.
>
> This means that on systems where DRAM starts at 0x0 (such as Raspberry
> Pi), no explicit mapping of the DT will be created if R2 points into the
> first 1 MB section of memory. This was not a problem before, because the
> decompressed kernel is loaded at the base of DRAM and mapped using
> sections as well, and so as long as the DT is referenced via a virtual
> address that uses the same translation (the linear map, in this case),
> things work fine.
>
> However, commit 149a3ffe62b9dbc3 ("9012/1: move device tree mapping out of
> linear region") changes this, and now the DT is referenced via a virtual
> address that is disjoint from the linear mapping of DRAM, and so we need
> the early code to create the DT mapping unconditionally.
>
> So let's create the early DT mapping for any value of R2 != 0x0.
>
> Fixes: 149a3ffe62b9dbc3 ("9012/1: move device tree mapping out of linear region")
> Reported-by: Guillaume Tucker <guillaume.tucker@collabora.com>
> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>

That's a good catch!
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2020-11-16 23:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-16 14:56 [PATCH] ARM: head.S: explicitly map DT even if it lives in the first physical section Ard Biesheuvel
2020-11-16 22:19 ` Guillaume Tucker
2020-11-16 23:33 ` Linus Walleij [this message]
2020-11-17  8:21   ` Ard Biesheuvel

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='CACRpkdZwOdARRRYOTqh=a9FWvgS5gsZsOrt8A2qFgfa9qqn-mg@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --cc=ardb@kernel.org \
    --cc=guillaume.tucker@collabora.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=nico@fluxnic.net \
    /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.