Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36273 )
Change subject: lib/cbmem_top: Add a common cbmem_top implementation ......................................................................
Patch Set 9:
(1 comment)
https://review.coreboot.org/c/coreboot/+/36273/9/src/lib/Kconfig File src/lib/Kconfig:
https://review.coreboot.org/c/coreboot/+/36273/9/src/lib/Kconfig@27 PS9, Line 27: config RAMSTAGE_CBMEM_TOP_ARG
nit: Does this need a new Kconfig or can we just make the default cbmem_top() implementation __wea […]
On the Nvidia platforms the earlier stages run on a different co-processor using a different architecture (arm32 instead of arm64). That's why they need a custom entry point. You can't directly pass a parameter because one processor can't write the registers of the other. You could instead store the value somewhere in memory and have the custom entry point pick it up to pass through to ramstage main()... however, since (I assume?) you don't have one of these boards to test, it's probably better to just not touch it.
I think switching most platforms over to this is a good idea, but I'd still leave an escape hatch for platforms that have a special issue or are just too old and difficult to untangle right now.