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 15:
(2 comments)
https://review.coreboot.org/c/coreboot/+/36145/15/src/arch/arm/stages.c File src/arch/arm/stages.c:
https://review.coreboot.org/c/coreboot/+/36145/15/src/arch/arm/stages.c@36 PS15, Line 36: _cbmem_top_ptr = (uintptr_t)stage_arg;
Wouldn't it be cleaner to pass the argument through to main() and handle it in there? Then you don […]
Not really sure I understand the second part of what you said, maybe that would be clearer if you upload a patch. In general I'm just trying to move as much of this out of the architectures and into common code as possible. For boards not passing the argument from romstage, stage_arg would just be undefined here and passed through undefined to main(), which would then have to know not to use it (based on Kconfig, probably).
https://review.coreboot.org/c/coreboot/+/36145/15/src/soc/rockchip/common/cb... File src/soc/rockchip/common/cbmem.c:
https://review.coreboot.org/c/coreboot/+/36145/15/src/soc/rockchip/common/cb... PS15, Line 28: #if !CONFIG(RAMSTAGE_CBMEM_TOP_ARG)
This patch comes before the aarch64 one, so some guarding was needed.
Oh, I see. Can we take this back out in the arm64 one, then?