Re: [PATCH/RFC] ARM: boot: Relax kernel image alignment for RZ/A with CS3 SDRAM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> ---
> 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



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux