Aaron Durbin 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.
Why? What is broken? Because vboot selection starts when trying to look up fsp. […]
Effectively the following:
diff --git a/src/lib/prog_loaders.c b/src/lib/prog_loaders.c index 183a22bff0..015660e620 100644 --- a/src/lib/prog_loaders.c +++ b/src/lib/prog_loaders.c @@ -135,6 +135,9 @@ void run_ramstage(void) !CONFIG(NO_STAGE_CACHE)) run_ramstage_from_resume(&ramstage);
+ if (ENV_ROMSTAGE && CONFIG(VBOOT_STARTS_IN_ROMSTAGE)) + vboot_run_logic(); + if (prog_locate(&ramstage)) goto fail;
Now, we can remove the prepare() API from CBFS and add all the necessary code paths like above to trigger the vboot logic such that subsequent lookups will honor vboot. The proper places are effectively at the end of the subsequent stage that corresponds to VBOOT_STARTS_IN_* (ROMSTAGE or BOOTLOCK which would be in run_romstage() and run_ramstage()).