Arthur Heymans 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 18:
Patch Set 18: Code-Review+2
(1 comment)
Did we abandon the idea of passing through to main() now? I'd consider this is okay as is, but I still think passing through to main() would be a bit cleaner.
I thought about doing that. It's a bit cleaner on platforms where the entry is just C code, but on platforms where the entry is written in assembly it's more involving as you have to deal with the ABI, which can change depending on compiler version, flags, ... Also on x86 the ramstage entry would be different than the postcar stage, where making the calling argument the argument of the main() function is not really an option.
It seems to me that the balance is slightly in favour of doing it in the stage entry than in the main(), although I might be biased towards making it easier on x86.