Wim Vervoorn has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36543 )
Change subject: drivers/intel/fsp1_1: Do not use prog_locate if VBOOT_STARTS_IN_ROMSTAGE ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/36543/3//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/36543/3//COMMIT_MSG@11 PS3, Line 11: called too early.
Effectively the following: […]
You nailed it. The issue is in the stage where vboot becomes active. Now the prog_locate handles all requests during this stage as equal while, in fact, it should only do this for the "next" stage. The issue shows when vboot_prepare() is called by the prog_locate.
In the transition stage this is done too early in some cases.
I have circumvented the issue by using the boot_locate call (as in this case locating the fsp is the only item that happens too early). This works for the case I implemented with but indeed is not the generic solution you may want to have.
What you are proposing is more generic but has a bigger impact on the overall code of coreboot. I will give it a try and remove the .prepare item in vboot locate while adding a call to vboot_prepare() or verstage_main() where appropriate.
Removing the prepare member in the cbfs driver is not a good idea as this is also used by our verified boot solution.