[U-Boot] [PATCH] rpi: Adjust fdt_addr_r to a sane address

Tuomas Tynkkynen tuomas at tuxera.com
Sat Apr 14 18:04:35 UTC 2018


Hi Alexander,

On Fri, 13 Apr 2018 17:49:00 +0200
Alexander Graf <agraf at suse.de> wrote:

[...]
> 
> diff --git a/include/configs/rpi.h b/include/configs/rpi.h
> index 325e52a019..fcf7e0976b 100644
> --- a/include/configs/rpi.h
> +++ b/include/configs/rpi.h
> @@ -124,7 +124,7 @@
>  #define ENV_MEM_LAYOUT_SETTINGS \
>  	"fdt_high=ffffffff\0" \
>  	"initrd_high=ffffffff\0" \
> -	"fdt_addr_r=0x00000100\0" \
> +	"fdt_addr_r=0x01f00000\0" \
>  	"pxefile_addr_r=0x00100000\0" \
>  	"kernel_addr_r=0x01000000\0" \
>  	"scriptaddr=0x02000000\0" \

Note that above the #define is a larger comment block that needs to be
updated as well. Also the other addresses also need updatingfor bigger
kernels on AArch64: https://patchwork.ozlabs.org/patch/777725/

Though now I double-checked that the smallest possible GPU-CPU memory
split is actually 64MB for the CPU, not 128M. So maybe something like:

         "kernel_addr_r=0x00080000\0" \
         "fdt_addr_r=0x02400000\0" \
         "scriptaddr=0x02500000\0" \
         "pxefile_addr_r=0x02600000\0" \
         "ramdisk_addr_r=0x02700000\0"

which would allow a kernel up to 36M, 1M for dtb, script and pxe files
each, and at least 25M for the initrd. Also I think giving up with the
constraint of locating the zImage high enough so that the kernel
decompressor doesn't need to relocate itself can be dropped. If the
boot speed of their Raspi matters that much, probably they wouldn't use
U-Boot in the first place.

What is the address that the RPi firmware loads its device tree to? I
hope that we don't have to worry about the positioning of that too...

- Tuomas



More information about the U-Boot mailing list