linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v10 0/3] ARM: uncompress: Validate start of physical memory against passed DTB
@ 2020-12-03 12:19 Geert Uytterhoeven
  2020-12-03 12:19 ` [PATCH v10 1/3] ARM: uncompress: Add be32tocpu macro Geert Uytterhoeven
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Geert Uytterhoeven @ 2020-12-03 12:19 UTC (permalink / raw)
  To: Russell King, Nicolas Pitre, Ard Biesheuvel, Marek Szyprowski,
	Dmitry Osipenko, Linus Walleij
  Cc: Arnd Bergmann, Eric Miao, Uwe Kleine-König, Lukasz Stelmach,
	Stephen Boyd, Chris Brandt, linux-arm-kernel, linux-renesas-soc,
	linux-kernel, Geert Uytterhoeven

	Hi all,

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, to support booting 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.

Compared to v9[*], the major change is a step back, and only supporting
this on modern systems that pass the DTB explicitly, with improved
validation to avoid regressions.

This has been regression-tested on a variety of boards using a passed or
appended DTB.

Thanks for your comments!

[*] "[PATCH v9] ARM: boot: Validate start of physical memory against DTB"
    (https://lore.kernel.org/r/20200902153606.13652-1-geert+renesas@glider.be)

Geert Uytterhoeven (3):
  ARM: uncompress: Add be32tocpu macro
  ARM: uncompress: Add OF_DT_MAGIC macro
  ARM: uncompress: Validate start of physical memory against passed DTB

 arch/arm/Kconfig                              |   7 +-
 arch/arm/boot/compressed/Makefile             |   5 +-
 .../arm/boot/compressed/fdt_check_mem_start.c | 131 ++++++++++++++++++
 arch/arm/boot/compressed/head.S               |  70 +++++++---
 4 files changed, 187 insertions(+), 26 deletions(-)
 create mode 100644 arch/arm/boot/compressed/fdt_check_mem_start.c

-- 
2.25.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-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

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-12-04  9:44 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-03 12:19 [PATCH v10 0/3] ARM: uncompress: Validate start of physical memory against passed DTB Geert Uytterhoeven
2020-12-03 12:19 ` [PATCH v10 1/3] ARM: uncompress: Add be32tocpu macro Geert Uytterhoeven
2020-12-03 12:49   ` Ard Biesheuvel
2020-12-04  9:43     ` Geert Uytterhoeven
2020-12-03 16:26   ` Nicolas Pitre
2020-12-03 12:19 ` [PATCH v10 2/3] ARM: uncompress: Add OF_DT_MAGIC macro Geert Uytterhoeven
2020-12-03 12:50   ` Ard Biesheuvel
2020-12-03 16:27   ` Nicolas Pitre
2020-12-04  9:43     ` Geert Uytterhoeven
2020-12-03 12:19 ` [PATCH v10 3/3] ARM: uncompress: Validate start of physical memory against passed DTB Geert Uytterhoeven
2020-12-03 13:14   ` Ard Biesheuvel
2020-12-03 14:04   ` Russell King - ARM Linux admin
2020-12-03 14:29     ` Geert Uytterhoeven
2020-12-03 16:34   ` Nicolas Pitre

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).