[PATCH] arm: layerscape: Check zero size memory bank before lmb_add

Peng Fan peng.fan at oss.nxp.com
Mon Apr 20 14:53:56 CEST 2026


On Thu, Apr 16, 2026 at 09:48:38PM +0800, Ye Li wrote:
>In layerspace's lmb_arch_add_memory implementation, all memory bank
>are added to lmb, even some is with zero size. This will cause lmb
>treating it as overlap with available memory by lmb_addrs_overlap
>and merge with available memory. Finally causing available memory
>start address changed to 0.
>
>For example, on LX2160, before zero memory bank added to lmb, there
>are two available memory regions:
>  - region 0, start 0x80000000, size 0x7be00000
>  - region 1, start 0x2080000000, size 0x700000000
>After zero size memory bank added, merge to one region:
>  - region 0, start 0, size 0x2780000000
>This wrong new region causes efi_memory_init issue when allocating bounce
>buffer because of conflict address (with uboot reserved) is allocated.
>
>Signed-off-by: Ye Li <ye.li at nxp.com>

Reviewed-by: Peng Fan <peng.fan at nxp.com>


More information about the U-Boot mailing list