From 6d720f38e06d14cc8a89635f66dc124dcd5ac150 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Tue, 8 Dec 2015 17:00:23 -0600 Subject: 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 Reviewed-on: https://review.coreboot.org/12689 Tested-by: build bot (Jenkins) Tested-by: Raptor Engineering Automated Test Stand Reviewed-by: Patrick Georgi Reviewed-by: Stefan Reinauer --- src/drivers/intel/fsp1_1/car.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/drivers/intel/fsp1_1') diff --git a/src/drivers/intel/fsp1_1/car.c b/src/drivers/intel/fsp1_1/car.c index 9d71faa733..23312e14cc 100644 --- a/src/drivers/intel/fsp1_1/car.c +++ b/src/drivers/intel/fsp1_1/car.c @@ -14,11 +14,11 @@ */ #include -#include #include #include #include #include +#include #include #include @@ -79,15 +79,17 @@ asmlinkage void *romstage_after_verstage(void) /* Need to locate the current FSP_INFO_HEADER. The cache-as-ram * is still enabled. We can directly access work buffer here. */ FSP_INFO_HEADER *fih; - struct asset fsp = ASSET_INIT(ASSET_REFCODE, "fsp.bin"); + struct prog fsp = PROG_INIT(ASSET_REFCODE, "fsp.bin"); console_init(); - if (asset_locate(&fsp)) { + if (prog_locate(&fsp)) { fih = NULL; - printk(BIOS_ERR, "Unable to locate %s\n", asset_name(&fsp)); + printk(BIOS_ERR, "Unable to locate %s\n", prog_name(&fsp)); } else - fih = find_fsp((uintptr_t)asset_mmap(&fsp)); + /* This leaks a mapping which this code assumes is benign as + * the flash is memory mapped CPU's address space. */ + fih = find_fsp((uintptr_t)rdev_mmap_full(prog_rdev(&fsp))); set_fih_car(fih); -- cgit v1.2.3