cbfs/vboot: remove firmware component support
The Chrome OS verified boot path supported multiple CBFS instances in the boot media as well as stand-alone assets sitting in each vboot RW slot. Remove the support for the stand-alone assets and always use CBFS accesses as the way to retrieve data. This is implemented by adding a cbfs_locator object which is queried for locating the current CBFS. Additionally, it is also signalled prior to when a program is about to be loaded by coreboot for the subsequent stage/payload. This provides the same opportunity as previous for vboot to hook in and perform its logic. BUG=chromium:445938 BRANCH=None TEST=Built and ran on glados. CQ-DEPEND=CL:307121,CL:31691,CL:31690 Change-Id: I6a3a15feb6edd355d6ec252c36b6f7885b383099 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/12689 Tested-by: build bot (Jenkins) Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
@@ -81,4 +81,18 @@ struct cbfs_props {
|
||||
/* Return < 0 on error otherwise props are filled out accordingly. */
|
||||
int cbfs_boot_region_properties(struct cbfs_props *props);
|
||||
|
||||
/* Allow external logic to take action prior to locating a program
|
||||
* (stage or payload). */
|
||||
void cbfs_prepare_program_locate(void);
|
||||
|
||||
/* Object used to identify location of current cbfs to use for cbfs_boot_*
|
||||
* operations. It's used by cbfs_boot_region_properties() and
|
||||
* cbfs_prepare_program_locate(). */
|
||||
struct cbfs_locator {
|
||||
const char *name;
|
||||
void (*prepare)(void);
|
||||
/* Returns 0 on successful fill of cbfs properties. */
|
||||
int (*locate)(struct cbfs_props *props);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -106,10 +106,7 @@ static inline void prog_set_entry(struct prog *prog, void *e, void *arg)
|
||||
}
|
||||
|
||||
/* Locate the identified program to run. Return 0 on success. < 0 on error. */
|
||||
static inline int prog_locate(struct prog *prog)
|
||||
{
|
||||
return asset_locate(&prog->asset);
|
||||
}
|
||||
int prog_locate(struct prog *prog);
|
||||
|
||||
/* Run the program described by prog. */
|
||||
void prog_run(struct prog *prog);
|
||||
|
Reference in New Issue
Block a user