linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH/RFC] ARM: boot: Relax kernel image alignment for RZ/A with CS3 SDRAM
@ 2019-11-13 10:27 Geert Uytterhoeven
  2019-11-13 10:39 ` Russell King - ARM Linux admin
  2019-11-13 10:40 ` Uwe Kleine-König
  0 siblings, 2 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2019-11-13 10:27 UTC (permalink / raw)
  To: Russell King, Arnd Bergmann, Nicolas Pitre, Eric Miao,
	Uwe Kleine-König
  Cc: linux-renesas-soc, Chris Brandt, Geert Uytterhoeven,
	linux-arm-kernel

The RZA2MEVB sub board has 64 MiB of SDRAM at 0x0C000000 (CS3 space).
Hence the mask for CONFIG_AUTO_ZRELADDR needs to be changed, otherwise
the system will crash because it will try to decompress a zImage or
uImage to a non-RAM garbage address.

Based on a patch in the BSP by Chris Brandt <chris.brandt@renesas.com>.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
No idea what to do with the rest of the comment, or if this breaks
existing platforms.

Thanks for your comments!
---
 arch/arm/boot/compressed/head.S | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index 93dffed0ac6e02b4..cfee6bd1e7a0a582 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -231,10 +231,10 @@ not_angel:
 		 * address.
 		 *
 		 * This alignment is a balance between the requirements of
-		 * different platforms - we have chosen 128MB to allow
+		 * different platforms - we have chosen 64MB to allow
 		 * platforms which align the start of their physical memory
-		 * to 128MB to use this feature, while allowing the zImage
-		 * to be placed within the first 128MB of memory on other
+		 * to 64MB to use this feature, while allowing the zImage
+		 * to be placed within the first 64MB of memory on other
 		 * platforms.  Increasing the alignment means we place
 		 * stricter alignment requirements on the start of physical
 		 * memory, but relaxing it means that we break people who
@@ -242,7 +242,7 @@ not_angel:
 		 * of this range.
 		 */
 		mov	r4, pc
-		and	r4, r4, #0xf8000000
+		and	r4, r4, #0xfc000000
 		/* Determine final kernel image address. */
 		add	r4, r4, #TEXT_OFFSET
 #else
-- 
2.17.1


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

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

end of thread, other threads:[~2019-11-13 18:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-13 10:27 [PATCH/RFC] ARM: boot: Relax kernel image alignment for RZ/A with CS3 SDRAM Geert Uytterhoeven
2019-11-13 10:39 ` Russell King - ARM Linux admin
2019-11-13 10:50   ` Uwe Kleine-König
2019-11-13 13:32   ` Geert Uytterhoeven
2019-11-13 17:04     ` Russell King - ARM Linux admin
2019-11-13 18:34       ` Geert Uytterhoeven
2019-11-13 10:40 ` Uwe Kleine-König
2019-11-13 10:44   ` Russell King - ARM Linux admin
2019-11-13 13:16   ` Geert Uytterhoeven
2019-11-13 16:56   ` 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).