From b5a20b29b7a2709b120e3c8258c2f16d9c38b590 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Tue, 6 Oct 2015 17:29:03 -0500 Subject: vboot: restructure vboot work buffer handling For the purpose of isolating the work buffer logic the surface area of the API was slimmed down. The vb2_working_data structure is no longer exposed, and the function signatures are updated accordingly. BUG=chrome-os-partner:44827 BRANCH=None TEST=Built and booted glados. Change-Id: If64184a79e9571ee8ef9822cfce1eda20fceee00 Signed-off-by: Aaron Durbin Reviewed-on: http://review.coreboot.org/11818 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/vendorcode/google/chromeos/vboot2/vboot_loader.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/vendorcode/google/chromeos/vboot2/vboot_loader.c') diff --git a/src/vendorcode/google/chromeos/vboot2/vboot_loader.c b/src/vendorcode/google/chromeos/vboot2/vboot_loader.c index 8517a30999..bb7bc4c828 100644 --- a/src/vendorcode/google/chromeos/vboot2/vboot_loader.c +++ b/src/vendorcode/google/chromeos/vboot2/vboot_loader.c @@ -65,7 +65,6 @@ static int verstage_should_load(void) static int vboot_active(struct asset *asset) { - struct vb2_working_data *wd; int run_verification; run_verification = verification_should_run(); @@ -104,12 +103,7 @@ static int vboot_active(struct asset *asset) if (ENV_ROMSTAGE) vboot_fill_handoff(); - wd = vboot_get_working_data(); - - if (vboot_is_slot_selected(wd)) - return 1; - - return 0; + return vboot_is_slot_selected(); } static int vboot_locate_by_components(const struct region_device *fw_main, @@ -189,7 +183,6 @@ static int vboot_asset_locate(const struct region_device *fw_main, * means we are taking vboot paths. */ static int vboot_locate(struct asset *asset) { - struct vb2_working_data *wd; struct region_device fw_main; /* Code size optimization. We'd never actually get called under the @@ -198,8 +191,7 @@ static int vboot_locate(struct asset *asset) if (verstage_should_load() && !IS_ENABLED(CONFIG_RETURN_FROM_VERSTAGE)) return 0; - wd = vboot_get_working_data(); - if (vb2_get_selected_region(wd, &fw_main)) + if (vb2_get_selected_region(&fw_main)) die("failed to reference selected region\n"); return vboot_asset_locate(&fw_main, asset); -- cgit v1.2.3