Attention is currently required from: Julius Werner. Raul Rangel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/59550 )
Change subject: rules.h, thread.h, lib/cbfs: Add ENV_STAGE_SUPPORTS_COOP ......................................................................
Patch Set 1:
(2 comments)
File src/include/rules.h:
https://review.coreboot.org/c/coreboot/+/59550/comment/a5ba2858_9369d4bd PS1, Line 306: ENV_X86
Why check this explicitly? It currently only works on x86 but that's already modeled by the Kconfig, […]
My goal is to remove `(ENV_RAMSTAGE || ENV_ROMSTAGE)` eventually. I need to do some analysis on why the threading code isn't getting garbage collected when nothing calls it. But once I get rid of the stage requirement this means we can use threading in verstage, so I need the ENV_X86 guard to account for PSP verstage.
https://review.coreboot.org/c/coreboot/+/59550/comment/101ea79a_512fb94a PS1, Line 306: ENV_ROMSTAGE
I just realized there may be a bit of an issue with preloading in romstage in combination with VBOOT […]
When cbfs_preload executes it stores a copy of the rdev. This should in theory be the "RO" rdev. Once _cbfs_alloc gets called it will get the "RW" rdev. Is there metadata in the rdevs we can compare? We could then just throw out the preload if it didn't match.