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 3:
Would it make more sense to instead pass the size of DRAM as an argument?
You can pass on every information you want from romstage (I assume you can compute the total amount of dram more easily here?) to ramstage via cbmem, but for that you need to know where cbmem is in ramstage. So all you'd need to pass from romstage to ramstage(s) is the pointer to cbmem.
Well, it just seems unnecessarily complicated. Pretty much every non-x86 platform calculates cbmem_top() in the same way based on the end of DRAM. If you're passing something anyway, you might as well pass the DRAM size and then implement cbmem_top() with a common one-liner for all of them. If you're passing cbmem_top(), then they all need to add this extra CBMEM section to pass the DRAM size as well. If we're standardizing on something, I believe standardizing on DRAM size would just work better for those architectures.