[PATCH] common: memtop: Update the MEM_RGN_COUNT macro to 64

Quentin Schulz quentin.schulz at cherry.de
Mon Jul 14 14:49:43 CEST 2025


Hi Venkatesh Yadav Abbarapu,

On 7/4/25 10:42 AM, Venkatesh Yadav Abbarapu wrote:
> Crashes are occurring due to the number of reserved memory regions

I assume these crashes are triggered by

assert_noisy(total < MEM_RGN_COUNT);

in fdt_add_reserved_regions?

Or maybe we're missing some checks in some other places? Or are those 
crashes in the Linux kernel (or whatever OS after U-Boot) because we're 
not adding all reserved memory nodes and the kernel tries to use some 
that should be reserved?

I'm also wondering if we couldn't dynamically allocate rgn array instead 
of hardcoding the size of it (considering we store its size in count 
member I believe?).

Looks ok to me otherwise, just that it unnecessarily increases the 
binary size for systems with fewer than 16 reserved memory areas (which 
I assume is most systems).

Cheers,
Quentin


More information about the U-Boot mailing list