Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31329 )
Change subject: vboot: copy data structures to CBMEM for downstream use ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/#/c/31329/1/src/security/vboot/common.c File src/security/vboot/common.c:
https://review.coreboot.org/#/c/31329/1/src/security/vboot/common.c@48 PS1, Line 48: #if ENV_POSTCAR || ENV_RAMSTAGE
The reason I used preprocessor conditionals -- […]
The region where _vboot2_work resides is torn down on certain platforms. It doesn't just continue to exist. You have to be more careful with the C conditionals.
cbmem_possibly_online() is your friend for postcar and ramstage as well as odd conditionals for verstage being ran after romstage (separate stage vs linked matters here as well).
I believe nearly all this similar logic was already handled in here or vboot_logic since it needs to deal with most of those cases.