[PATCH] arm: bootm: Disable LMB reservation for command line and board info on arm64

Jan Kiszka jan.kiszka at siemens.com
Tue Jul 20 11:08:24 CEST 2021


On 29.05.21 13:34, Marek Vasut wrote:
> On arm64, board info is not applicable and kernel command line patched into
> the DT, so the LMB reservation here makes no sense anymore. On legacy arm32,
> this might still be necessary on systems which do not use DT or use legacy
> ATAGS. Disable this LMB reservation on arm64.
> 
> This also permits Linux DT to specify reserved memory node at address close
> to the end of DRAM bank, i.e. overlaping with U-Boot location. Since after
> boot, U-Boot will be no more, this is OK.
> 
> Signed-off-by: Marek Vasut <marek.vasut+renesas at gmail.com>
> Cc: Hai Pham <hai.pham.ud at renesas.com>
> Cc: Simon Goldschmidt <simon.k.r.goldschmidt at gmail.com>
> Cc: Stephen Warren <swarren at nvidia.com>
> Cc: Tom Rini <trini at konsulko.com>
> ---
>  arch/arm/lib/bootm.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
> index f60ee3a7e6..23b99a541c 100644
> --- a/arch/arm/lib/bootm.c
> +++ b/arch/arm/lib/bootm.c
> @@ -43,6 +43,7 @@ DECLARE_GLOBAL_DATA_PTR;
>  
>  static struct tag *params;
>  
> +#ifndef CONFIG_ARM64
>  static ulong get_sp(void)
>  {
>  	ulong ret;
> @@ -86,6 +87,7 @@ void arch_lmb_reserve(struct lmb *lmb)
>  		break;
>  	}
>  }
> +#endif
>  
>  __weak void board_quiesce_devices(void)
>  {
> 
This causes troubles for [1], but I have no clue yet, what is happening. 
Without the patch, we start like this:

Found U-Boot script /boot/boot.scr
889 bytes read in 21 ms (41 KiB/s)
## Executing script at 83000000
Loading /usr/lib/linux-image-4.19.94/ti/k3-am6548-iot2050-advanced.dtb...
78306 bytes read in 25 ms (3 MiB/s)
Loading /boot/vmlinux-4.19.94...
13537288 bytes read in 107 ms (120.7 MiB/s)
## Flattened Device Tree blob at 82000000
   Booting using the fdt blob at 0x82000000
   Loading Device Tree to 00000000fdefa000, end 00000000fdf101e1 ... OK

Starting kernel ...


With the patch applied, I'm getting stuck like this:

Found U-Boot script /boot/boot.scr
889 bytes read in 21 ms (41 KiB/s)
## Executing script at 83000000
Loading /usr/lib/linux-image-4.19.94/ti/k3-am6548-iot2050-advanced.dtb...
78306 bytes read in 25 ms (3 MiB/s)
Loading /boot/vmlinux-4.19.94...
13537288 bytes read in 109 ms (118.4 MiB/s)
## Flattened Device Tree blob at 82000000
   Booting using the fdt blob at 0x82000000
   Loading Device Tree to 00000000fffe9000, end 00000000fffff1e1 ...


Obviously, the DT target adress changed, possibly to an 
unsupported/reserved address. But I do not understand the mechanics 
behind all this yet. Any hints welcome on what goes wrong here and 
whether something needs to be adjusted in our board settings.

Thanks,
Jan

[1] https://patchwork.ozlabs.org/project/uboot/list/?series=248449&state=*

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux


More information about the U-Boot mailing list