[PATCH] [RFC] lmb: Optionally limit available memory to 4 GiB on limited systems

Marek Vasut marek.vasut at mailbox.org
Wed Jun 3 13:10:26 CEST 2026


On 6/3/26 12:37 PM, Ilias Apalodimas wrote:

Hello Ilias,

>>> diff --git a/lib/Kconfig b/lib/Kconfig
>>> index 77ebc79e1db..29911068a69 100644
>>> --- a/lib/Kconfig
>>> +++ b/lib/Kconfig
>>> @@ -1295,6 +1295,14 @@ config SPL_LMB_ARCH_MEM_MAP
>>>          memory map. Enable this config in such scenarios which allow
>>>          architectures and boards to define their own memory map.
>>>
>>> +config LMB_LIMIT_DMA_BELOW_4G
> 
> This seems the right idea for now, but is it really 4G or ram_top?
I think the LMB configuration should in fact be board (or SoC) specific, 
because RPi has problems already at 1 GiB, other hardware might have 
problems at 4 GiB, etc. But this config option is the generic "make it 
work somehow" flip switch.


More information about the U-Boot mailing list