Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36145 )
Change subject: arch/arm: Pass cbmem_top to ramstage via calling argument ......................................................................
Patch Set 4:
If you always know the _dram at compile time then the size of dram is simply cbmem_top() - _dram, assuming you need it for computing resources?
No, because CBMEM is never placed above 4GB. So if the system DRAM goes above 0xffffffff, CBMEM is clipped there and you can't easily figure out the end of DRAM from it anymore. That's why I'm saying it's trivial to calculate cbmem_top from DRAM size, but not the other way round.
The _dram symbol is not a symbol available on all targets so it looses universality. Note that passing multiple arguments is likely too messy.
It should be on all architectures this is affecting? For x86 it probably needs to be handled separately anyway because it seems their cbmem_top calculation is not that simple.