Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32541 )
Change subject: soc/mediatek: Register coreboot table for ATF ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/coreboot/+/32541/4/src/soc/mediatek/common/bl3... File src/soc/mediatek/common/bl31_plat_params.c:
https://review.coreboot.org/c/coreboot/+/32541/4/src/soc/mediatek/common/bl3... PS4, Line 33: if (!cbtable_param.value) {
Why is this check useful? Can’t it be removed and the assignment always happen?
This is following rk3399 implementation.
@jwerner may confirm, but I believe the underlying expectation is - ATF may call soc_get_bl31_plat_params multiple times (although it seems not doing that today) - We want to prevent unnecessary cbmem_find calls - We want to only insert bl31_plat_param into bl31_params one time - If the function is called multiple times, we want CBTABLE is still injected in the last invocation.
If there's some promise that ATF &coreboot only ever only call soc_get_bl31_plat_params one time, then yes we may revise this as always-happen.