From: Dmitry Osipenko <digetx@gmail.com>
To: Geert Uytterhoeven <geert+renesas@glider.be>,
Russell King <linux@armlinux.org.uk>,
Ard Biesheuvel <ardb@kernel.org>,
Nicolas Pitre <nico@fluxnic.net>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Linus Walleij <linus.walleij@linaro.org>
Cc: "Arnd Bergmann" <arnd@arndb.de>,
"Eric Miao" <eric.miao@nvidia.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Lukasz Stelmach" <l.stelmach@samsung.com>,
"Stephen Boyd" <sboyd@kernel.org>,
"Chris Brandt" <chris.brandt@renesas.com>,
linux-arm-kernel@lists.infradead.org,
linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v12] ARM: uncompress: Validate start of physical memory against passed DTB
Date: Sat, 9 Jan 2021 20:27:54 +0300 [thread overview]
Message-ID: <5f23561e-4099-8578-2c28-4ba39bbaa071@gmail.com> (raw)
In-Reply-To: <20210104130111.1269694-1-geert+renesas@glider.be>
04.01.2021 16:01, Geert Uytterhoeven пишет:
> 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@fluxnic.net>
> Suggested-by: Ard Biesheuvel <ardb@kernel.org>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
> Acked-by: Nicolas Pitre <nico@fluxnic.net>
> ---
> Submitted to RMK's patch tracker.
>
> v12:
> - Drop unneeded initialization of r in get_val(),
I tested this patch on NVIDIA Tegra and haven't spotted any problems.
Tested-by: Dmitry Osipenko <digetx@gmail.com>
prev parent reply other threads:[~2021-01-09 17:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20210104130133eucas1p2d4e75b0dfd3afca7af8952ff09568070@eucas1p2.samsung.com>
2021-01-04 13:01 ` Geert Uytterhoeven
2021-01-07 10:36 ` Marek Szyprowski
2021-01-07 10:47 ` Geert Uytterhoeven
2021-01-08 23:57 ` Linus Walleij
2021-01-11 16:19 ` Geert Uytterhoeven
2021-01-18 13:09 ` Linus Walleij
2021-01-09 17:27 ` Dmitry Osipenko [this message]
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=5f23561e-4099-8578-2c28-4ba39bbaa071@gmail.com \
--to=digetx@gmail.com \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=chris.brandt@renesas.com \
--cc=eric.miao@nvidia.com \
--cc=geert+renesas@glider.be \
--cc=l.stelmach@samsung.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=m.szyprowski@samsung.com \
--cc=nico@fluxnic.net \
--cc=sboyd@kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/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
all inboxes | Powered by JetHome®