[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdVH+0=_o7ztC+H+tN7H0P3Bv4FzESYCDLeQpH4SR8z6Ag@mail.gmail.com>
Date: Thu, 7 Jan 2021 11:47:56 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Marek Szyprowski <m.szyprowski@...sung.com>
Cc: Russell King <linux@...linux.org.uk>,
Ard Biesheuvel <ardb@...nel.org>,
Nicolas Pitre <nico@...xnic.net>,
Dmitry Osipenko <digetx@...il.com>,
Linus Walleij <linus.walleij@...aro.org>,
Arnd Bergmann <arnd@...db.de>,
Eric Miao <eric.miao@...dia.com>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>,
Lukasz Stelmach <l.stelmach@...sung.com>,
Stephen Boyd <sboyd@...nel.org>,
Chris Brandt <chris.brandt@...esas.com>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v12] ARM: uncompress: Validate start of physical memory
against passed DTB
Hi Marek,
On Thu, Jan 7, 2021 at 11:36 AM Marek Szyprowski
<m.szyprowski@...sung.com> wrote:
> On 04.01.2021 14:01, Geert Uytterhoeven wrote:
> > Currently, the start address of physical memory is obtained by masking
> > the program counter with a fixed mask of 0xf8000000. This mask value
> > was chosen as a balance between the requirements of different platforms.
> > However, this does require that the start address of physical memory is
> > a multiple of 128 MiB, precluding booting Linux on platforms where this
> > requirement is not fulfilled.
> >
> > Fix this limitation by validating the masked address against the memory
> > information in the passed DTB. Only use the start address
> > from DTB when masking would yield an out-of-range address, prefer the
> > traditional method in all other cases. Note that this applies only to the
> > explicitly passed DTB on modern systems, and not to a DTB appended to
> > the kernel, or to ATAGS. The appended DTB may need to be augmented by
> > information from ATAGS, which may need to rely on knowledge of the start
> > address of physical memory itself.
> >
> > This allows to boot Linux on r7s9210/rza2mevb using the 64 MiB of SDRAM
> > on the RZA2MEVB sub board, which is located at 0x0C000000 (CS3 space),
> > i.e. not at a multiple of 128 MiB.
> >
> > Suggested-by: Nicolas Pitre <nico@...xnic.net>
> > Suggested-by: Ard Biesheuvel <ardb@...nel.org>
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>
> > Reviewed-by: Ard Biesheuvel <ardb@...nel.org>
> > Acked-by: Nicolas Pitre <nico@...xnic.net>
>
> I've checked all of my arm 32bit test systems and they still boot fine
> with this patch. Feel free to add my:
>
> Tested-by: Marek Szyprowski <m.szyprowski@...sung.com>
>
> although I didn't test exactly the new features added by it.
Thank you, regression-testing is very valuable!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists