* Re: [PATCH/RFC] ARM: boot: Relax kernel image alignment for RZ/A with CS3 SDRAM
@ 2019-11-13 10:39 ` Russell King - ARM Linux admin
0 siblings, 0 replies; 20+ messages in thread
From: Russell King - ARM Linux admin @ 2019-11-13 10:39 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Arnd Bergmann, Nicolas Pitre, linux-renesas-soc, Chris Brandt,
Uwe Kleine-König, Eric Miao, linux-arm-kernel
On Wed, Nov 13, 2019 at 11:27:29AM +0100, Geert Uytterhoeven wrote:
> 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.
We occasionally have discussions about this - the last one was a big
one in Edinburgh, and the answer is we can't change this in mainline.
They've also come up on the mailing lists as well.
I'm not going to rehash this old argument yet again - the comment
details the reason for it, and is there to prevent exactly this.
If someone is silly enough to come up with a platform that violates
the documented 32-bit ARM booting protocol, then they can't expect
the kernel to bend to their platform's requirements at the expense of
already merged platforms.
Sorry.
>
> 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
>
>
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH/RFC] ARM: boot: Relax kernel image alignment for RZ/A with CS3 SDRAM
2019-11-13 10:39 ` Russell King - ARM Linux admin
@ 2019-11-13 10:50 ` Uwe Kleine-König
-1 siblings, 0 replies; 20+ messages in thread
From: Uwe Kleine-König @ 2019-11-13 10:50 UTC (permalink / raw)
To: Russell King - ARM Linux admin
Cc: Geert Uytterhoeven, Arnd Bergmann, Nicolas Pitre, Eric Miao,
Chris Brandt, linux-arm-kernel, linux-renesas-soc
Hello Russell,
On Wed, Nov 13, 2019 at 10:39:19AM +0000, Russell King - ARM Linux admin wrote:
> On Wed, Nov 13, 2019 at 11:27:29AM +0100, Geert Uytterhoeven wrote:
> > 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.
>
> We occasionally have discussions about this - the last one was a big
> one in Edinburgh, and the answer is we can't change this in mainline.
> They've also come up on the mailing lists as well.
>
> I'm not going to rehash this old argument yet again - the comment
> details the reason for it, and is there to prevent exactly this.
>
> If someone is silly enough to come up with a platform that violates
> the documented 32-bit ARM booting protocol, then they can't expect
> the kernel to bend to their platform's requirements at the expense of
> already merged platforms.
While I agree to your conclusion I think the last paragraph isn't a
valid justification. The "32-bit ARM booting protocol"[1] doesn't
mention an alignment, it only states "The kernel should be placed in the
first 128MiB of RAM." And if this is done on a platform where RAM starts
at 0x0C000000 this results in writes to [0x0b000000, 0x0c000000].
Best regards
Uwe
[1] that's Documentation/arm/booting.rst, right?
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH/RFC] ARM: boot: Relax kernel image alignment for RZ/A with CS3 SDRAM
@ 2019-11-13 10:50 ` Uwe Kleine-König
0 siblings, 0 replies; 20+ messages in thread
From: Uwe Kleine-König @ 2019-11-13 10:50 UTC (permalink / raw)
To: Russell King - ARM Linux admin
Cc: Geert Uytterhoeven, Arnd Bergmann, Nicolas Pitre,
linux-renesas-soc, Chris Brandt, Eric Miao, linux-arm-kernel
Hello Russell,
On Wed, Nov 13, 2019 at 10:39:19AM +0000, Russell King - ARM Linux admin wrote:
> On Wed, Nov 13, 2019 at 11:27:29AM +0100, Geert Uytterhoeven wrote:
> > 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.
>
> We occasionally have discussions about this - the last one was a big
> one in Edinburgh, and the answer is we can't change this in mainline.
> They've also come up on the mailing lists as well.
>
> I'm not going to rehash this old argument yet again - the comment
> details the reason for it, and is there to prevent exactly this.
>
> If someone is silly enough to come up with a platform that violates
> the documented 32-bit ARM booting protocol, then they can't expect
> the kernel to bend to their platform's requirements at the expense of
> already merged platforms.
While I agree to your conclusion I think the last paragraph isn't a
valid justification. The "32-bit ARM booting protocol"[1] doesn't
mention an alignment, it only states "The kernel should be placed in the
first 128MiB of RAM." And if this is done on a platform where RAM starts
at 0x0C000000 this results in writes to [0x0b000000, 0x0c000000].
Best regards
Uwe
[1] that's Documentation/arm/booting.rst, right?
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH/RFC] ARM: boot: Relax kernel image alignment for RZ/A with CS3 SDRAM
2019-11-13 10:39 ` Russell King - ARM Linux admin
@ 2019-11-13 13:32 ` Geert Uytterhoeven
-1 siblings, 0 replies; 20+ messages in thread
From: Geert Uytterhoeven @ 2019-11-13 13:32 UTC (permalink / raw)
To: Russell King - ARM Linux admin
Cc: Arnd Bergmann, Nicolas Pitre, Eric Miao, Uwe Kleine-König,
Chris Brandt, Linux ARM, Linux-Renesas
Hi Russell,
On Wed, Nov 13, 2019 at 11:39 AM Russell King - ARM Linux admin
<linux@armlinux.org.uk> wrote:
> On Wed, Nov 13, 2019 at 11:27:29AM +0100, Geert Uytterhoeven wrote:
> > 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.
>
> We occasionally have discussions about this - the last one was a big
> one in Edinburgh, and the answer is we can't change this in mainline.
> They've also come up on the mailing lists as well.
>
> I'm not going to rehash this old argument yet again - the comment
> details the reason for it, and is there to prevent exactly this.
Sorry, I wasn't aware of that discussion.
I had a chat about this at ELC-E with Arnd, and he was open to this change.
> If someone is silly enough to come up with a platform that violates
> the documented 32-bit ARM booting protocol, then they can't expect
> the kernel to bend to their platform's requirements at the expense of
> already merged platforms.
Documentation/arm/booting.rst:
1. The kernel should be placed in the first 128MiB of RAM: check.
2. A safe location is just above the 128MiB boundary from start of RAM:
oops. Not all platforms have more than 128 MiB of RAM...
An alternative is to fall to the builtin 4 MiB of SRAM, or the 8 MiB of
HyperRAM on RZA2MEVB, but doing that requires using XIP.
Which brings us to your response in the other email:
> Are we going back to non-multi-platform kernels? ;)
Good question! ;-)
1. CONFIG_AUTO_ZRELADDR=n
2. CONFIG_XIP_KERNEL=y
What do you suggest?
Thanks!
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] 20+ messages in thread* Re: [PATCH/RFC] ARM: boot: Relax kernel image alignment for RZ/A with CS3 SDRAM
@ 2019-11-13 13:32 ` Geert Uytterhoeven
0 siblings, 0 replies; 20+ messages in thread
From: Geert Uytterhoeven @ 2019-11-13 13:32 UTC (permalink / raw)
To: Russell King - ARM Linux admin
Cc: Arnd Bergmann, Nicolas Pitre, Linux-Renesas, Chris Brandt,
Uwe Kleine-König, Eric Miao, Linux ARM
Hi Russell,
On Wed, Nov 13, 2019 at 11:39 AM Russell King - ARM Linux admin
<linux@armlinux.org.uk> wrote:
> On Wed, Nov 13, 2019 at 11:27:29AM +0100, Geert Uytterhoeven wrote:
> > 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.
>
> We occasionally have discussions about this - the last one was a big
> one in Edinburgh, and the answer is we can't change this in mainline.
> They've also come up on the mailing lists as well.
>
> I'm not going to rehash this old argument yet again - the comment
> details the reason for it, and is there to prevent exactly this.
Sorry, I wasn't aware of that discussion.
I had a chat about this at ELC-E with Arnd, and he was open to this change.
> If someone is silly enough to come up with a platform that violates
> the documented 32-bit ARM booting protocol, then they can't expect
> the kernel to bend to their platform's requirements at the expense of
> already merged platforms.
Documentation/arm/booting.rst:
1. The kernel should be placed in the first 128MiB of RAM: check.
2. A safe location is just above the 128MiB boundary from start of RAM:
oops. Not all platforms have more than 128 MiB of RAM...
An alternative is to fall to the builtin 4 MiB of SRAM, or the 8 MiB of
HyperRAM on RZA2MEVB, but doing that requires using XIP.
Which brings us to your response in the other email:
> Are we going back to non-multi-platform kernels? ;)
Good question! ;-)
1. CONFIG_AUTO_ZRELADDR=n
2. CONFIG_XIP_KERNEL=y
What do you suggest?
Thanks!
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [PATCH/RFC] ARM: boot: Relax kernel image alignment for RZ/A with CS3 SDRAM
2019-11-13 13:32 ` Geert Uytterhoeven
@ 2019-11-13 17:04 ` Russell King - ARM Linux admin
-1 siblings, 0 replies; 20+ messages in thread
From: Russell King - ARM Linux admin @ 2019-11-13 17:04 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Arnd Bergmann, Nicolas Pitre, Eric Miao, Uwe Kleine-König,
Chris Brandt, Linux ARM, Linux-Renesas
On Wed, Nov 13, 2019 at 02:32:19PM +0100, Geert Uytterhoeven wrote:
> Hi Russell,
>
> On Wed, Nov 13, 2019 at 11:39 AM Russell King - ARM Linux admin
> <linux@armlinux.org.uk> wrote:
> > On Wed, Nov 13, 2019 at 11:27:29AM +0100, Geert Uytterhoeven wrote:
> > > 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.
> >
> > We occasionally have discussions about this - the last one was a big
> > one in Edinburgh, and the answer is we can't change this in mainline.
> > They've also come up on the mailing lists as well.
> >
> > I'm not going to rehash this old argument yet again - the comment
> > details the reason for it, and is there to prevent exactly this.
>
> Sorry, I wasn't aware of that discussion.
> I had a chat about this at ELC-E with Arnd, and he was open to this change.
>
> > If someone is silly enough to come up with a platform that violates
> > the documented 32-bit ARM booting protocol, then they can't expect
> > the kernel to bend to their platform's requirements at the expense of
> > already merged platforms.
>
> Documentation/arm/booting.rst:
> 1. The kernel should be placed in the first 128MiB of RAM: check.
> 2. A safe location is just above the 128MiB boundary from start of RAM:
> oops. Not all platforms have more than 128 MiB of RAM...
>
> An alternative is to fall to the builtin 4 MiB of SRAM, or the 8 MiB of
> HyperRAM on RZA2MEVB, but doing that requires using XIP.
> Which brings us to your response in the other email:
>
> > Are we going back to non-multi-platform kernels? ;)
>
> Good question! ;-)
>
> 1. CONFIG_AUTO_ZRELADDR=n
> 2. CONFIG_XIP_KERNEL=y
If you're using an XIP kernel, you are by definition not using the
decompressor.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH/RFC] ARM: boot: Relax kernel image alignment for RZ/A with CS3 SDRAM
@ 2019-11-13 17:04 ` Russell King - ARM Linux admin
0 siblings, 0 replies; 20+ messages in thread
From: Russell King - ARM Linux admin @ 2019-11-13 17:04 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Arnd Bergmann, Nicolas Pitre, Linux-Renesas, Chris Brandt,
Uwe Kleine-König, Eric Miao, Linux ARM
On Wed, Nov 13, 2019 at 02:32:19PM +0100, Geert Uytterhoeven wrote:
> Hi Russell,
>
> On Wed, Nov 13, 2019 at 11:39 AM Russell King - ARM Linux admin
> <linux@armlinux.org.uk> wrote:
> > On Wed, Nov 13, 2019 at 11:27:29AM +0100, Geert Uytterhoeven wrote:
> > > 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.
> >
> > We occasionally have discussions about this - the last one was a big
> > one in Edinburgh, and the answer is we can't change this in mainline.
> > They've also come up on the mailing lists as well.
> >
> > I'm not going to rehash this old argument yet again - the comment
> > details the reason for it, and is there to prevent exactly this.
>
> Sorry, I wasn't aware of that discussion.
> I had a chat about this at ELC-E with Arnd, and he was open to this change.
>
> > If someone is silly enough to come up with a platform that violates
> > the documented 32-bit ARM booting protocol, then they can't expect
> > the kernel to bend to their platform's requirements at the expense of
> > already merged platforms.
>
> Documentation/arm/booting.rst:
> 1. The kernel should be placed in the first 128MiB of RAM: check.
> 2. A safe location is just above the 128MiB boundary from start of RAM:
> oops. Not all platforms have more than 128 MiB of RAM...
>
> An alternative is to fall to the builtin 4 MiB of SRAM, or the 8 MiB of
> HyperRAM on RZA2MEVB, but doing that requires using XIP.
> Which brings us to your response in the other email:
>
> > Are we going back to non-multi-platform kernels? ;)
>
> Good question! ;-)
>
> 1. CONFIG_AUTO_ZRELADDR=n
> 2. CONFIG_XIP_KERNEL=y
If you're using an XIP kernel, you are by definition not using the
decompressor.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH/RFC] ARM: boot: Relax kernel image alignment for RZ/A with CS3 SDRAM
2019-11-13 17:04 ` Russell King - ARM Linux admin
@ 2019-11-13 18:34 ` Geert Uytterhoeven
-1 siblings, 0 replies; 20+ messages in thread
From: Geert Uytterhoeven @ 2019-11-13 18:34 UTC (permalink / raw)
To: Russell King - ARM Linux admin
Cc: Arnd Bergmann, Nicolas Pitre, Eric Miao, Uwe Kleine-König,
Chris Brandt, Linux ARM, Linux-Renesas
Hi Russell,
On Wed, Nov 13, 2019 at 6:04 PM Russell King - ARM Linux admin
<linux@armlinux.org.uk> wrote:
> On Wed, Nov 13, 2019 at 02:32:19PM +0100, Geert Uytterhoeven wrote:
> > On Wed, Nov 13, 2019 at 11:39 AM Russell King - ARM Linux admin
> > <linux@armlinux.org.uk> wrote:
> > > On Wed, Nov 13, 2019 at 11:27:29AM +0100, Geert Uytterhoeven wrote:
> > > > 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.
> > >
> > > We occasionally have discussions about this - the last one was a big
> > > one in Edinburgh, and the answer is we can't change this in mainline.
> > > They've also come up on the mailing lists as well.
> > >
> > > I'm not going to rehash this old argument yet again - the comment
> > > details the reason for it, and is there to prevent exactly this.
> >
> > Sorry, I wasn't aware of that discussion.
> > I had a chat about this at ELC-E with Arnd, and he was open to this change.
> >
> > > If someone is silly enough to come up with a platform that violates
> > > the documented 32-bit ARM booting protocol, then they can't expect
> > > the kernel to bend to their platform's requirements at the expense of
> > > already merged platforms.
> >
> > Documentation/arm/booting.rst:
> > 1. The kernel should be placed in the first 128MiB of RAM: check.
> > 2. A safe location is just above the 128MiB boundary from start of RAM:
> > oops. Not all platforms have more than 128 MiB of RAM...
> >
> > An alternative is to fall to the builtin 4 MiB of SRAM, or the 8 MiB of
> > HyperRAM on RZA2MEVB, but doing that requires using XIP.
> > Which brings us to your response in the other email:
> >
> > > Are we going back to non-multi-platform kernels? ;)
> >
> > Good question! ;-)
> >
> > 1. CONFIG_AUTO_ZRELADDR=n
> > 2. CONFIG_XIP_KERNEL=y
>
> If you're using an XIP kernel, you are by definition not using the
> decompressor.
Sure. I mean we may need 3 different setups for RZ/A:
1. multiplatform,
2. CONFIG_AUTO_ZRELADDR=n,
3. CONFIG_XIP_KERNEL=y.
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] 20+ messages in thread* Re: [PATCH/RFC] ARM: boot: Relax kernel image alignment for RZ/A with CS3 SDRAM
@ 2019-11-13 18:34 ` Geert Uytterhoeven
0 siblings, 0 replies; 20+ messages in thread
From: Geert Uytterhoeven @ 2019-11-13 18:34 UTC (permalink / raw)
To: Russell King - ARM Linux admin
Cc: Arnd Bergmann, Nicolas Pitre, Linux-Renesas, Chris Brandt,
Uwe Kleine-König, Eric Miao, Linux ARM
Hi Russell,
On Wed, Nov 13, 2019 at 6:04 PM Russell King - ARM Linux admin
<linux@armlinux.org.uk> wrote:
> On Wed, Nov 13, 2019 at 02:32:19PM +0100, Geert Uytterhoeven wrote:
> > On Wed, Nov 13, 2019 at 11:39 AM Russell King - ARM Linux admin
> > <linux@armlinux.org.uk> wrote:
> > > On Wed, Nov 13, 2019 at 11:27:29AM +0100, Geert Uytterhoeven wrote:
> > > > 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.
> > >
> > > We occasionally have discussions about this - the last one was a big
> > > one in Edinburgh, and the answer is we can't change this in mainline.
> > > They've also come up on the mailing lists as well.
> > >
> > > I'm not going to rehash this old argument yet again - the comment
> > > details the reason for it, and is there to prevent exactly this.
> >
> > Sorry, I wasn't aware of that discussion.
> > I had a chat about this at ELC-E with Arnd, and he was open to this change.
> >
> > > If someone is silly enough to come up with a platform that violates
> > > the documented 32-bit ARM booting protocol, then they can't expect
> > > the kernel to bend to their platform's requirements at the expense of
> > > already merged platforms.
> >
> > Documentation/arm/booting.rst:
> > 1. The kernel should be placed in the first 128MiB of RAM: check.
> > 2. A safe location is just above the 128MiB boundary from start of RAM:
> > oops. Not all platforms have more than 128 MiB of RAM...
> >
> > An alternative is to fall to the builtin 4 MiB of SRAM, or the 8 MiB of
> > HyperRAM on RZA2MEVB, but doing that requires using XIP.
> > Which brings us to your response in the other email:
> >
> > > Are we going back to non-multi-platform kernels? ;)
> >
> > Good question! ;-)
> >
> > 1. CONFIG_AUTO_ZRELADDR=n
> > 2. CONFIG_XIP_KERNEL=y
>
> If you're using an XIP kernel, you are by definition not using the
> decompressor.
Sure. I mean we may need 3 different setups for RZ/A:
1. multiplatform,
2. CONFIG_AUTO_ZRELADDR=n,
3. CONFIG_XIP_KERNEL=y.
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 20+ messages in thread