summaryrefslogtreecommitdiff
path: root/src/vendorcode/google/chromeos/verstub.c
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2014-09-12 09:59:46 -0700
committerAaron Durbin <adurbin@google.com>2015-03-24 14:48:22 +0100
commit1bbac3fd248ad7c91511d12c74b61c239ba3aa9f (patch)
treec303d7309e703b9ee869dc255b09ade120690ee9 /src/vendorcode/google/chromeos/verstub.c
parentefddcfbb52cd328ad2eb86d88cd306ac30294109 (diff)
vboot2: Make struct vb2_working_data cpu architecture agnostic
this allows vb2_working_data to be accessed from stages running on different cpu architectures. BUG=none TEST=Built firmware for Blaze with USE=+/-vboot2. Ran faft on Blaze. BRANCH=none Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Original-Change-Id: Ife2844637af8bf9e0d032a50fb516d98b8f80497 Original-Reviewed-on: https://chromium-review.googlesource.com/217835 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Original-Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org> Original-Tested-by: Daisuke Nojiri <dnojiri@chromium.org> (cherry picked from commit 2b36749bc5a761003f00b7a0d17edb1629245b88) Change-Id: Idc10f23ed2927717f5308f0112aa8113a683010e Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/8882 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/vendorcode/google/chromeos/verstub.c')
-rw-r--r--src/vendorcode/google/chromeos/verstub.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/vendorcode/google/chromeos/verstub.c b/src/vendorcode/google/chromeos/verstub.c
index 5df1777bb2..a4ed77f96b 100644
--- a/src/vendorcode/google/chromeos/verstub.c
+++ b/src/vendorcode/google/chromeos/verstub.c
@@ -30,7 +30,7 @@ static struct vb2_working_data *init_vb2_working_data(void)
wd = vboot_get_working_data();
memset(wd, 0, CONFIG_VBOOT_WORK_BUFFER_SIZE);
/* 8-byte alignment for ARMv7 */
- wd->buffer = (uint8_t *)ALIGN_UP((uintptr_t)&wd[1], 8);
+ wd->buffer = ALIGN_UP((uintptr_t)&wd[1], 8);
wd->buffer_size = CONFIG_VBOOT_WORK_BUFFER_SIZE + (uintptr_t)wd
- (uintptr_t)wd->buffer;
@@ -74,12 +74,14 @@ void vboot2_verify_firmware(void)
entry = NULL;
if (vboot_is_slot_selected(wd)) {
/* RW A or B */
- struct vboot_components *fw_info =
- vboot_locate_components(&wd->selected_region);
+ struct vboot_region fw_main;
+ struct vboot_components *fw_info;
+ vb2_get_selected_region(wd, &fw_main);
+ fw_info = vboot_locate_components(&fw_main);
if (fw_info == NULL)
die("failed to locate firmware components\n");
entry = vboot_load_stage(CONFIG_VBOOT_ROMSTAGE_INDEX,
- &wd->selected_region, fw_info);
+ &fw_main, fw_info);
} else if (vboot_is_readonly_path(wd)) {
/* RO */
entry = cbfs_load_stage(CBFS_DEFAULT_MEDIA,