diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2014-09-12 09:59:46 -0700 |
---|---|---|
committer | Aaron Durbin <adurbin@google.com> | 2015-03-24 14:48:22 +0100 |
commit | 1bbac3fd248ad7c91511d12c74b61c239ba3aa9f (patch) | |
tree | c303d7309e703b9ee869dc255b09ade120690ee9 /src/vendorcode/google/chromeos/verstage.c | |
parent | efddcfbb52cd328ad2eb86d88cd306ac30294109 (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/verstage.c')
-rw-r--r-- | src/vendorcode/google/chromeos/verstage.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/vendorcode/google/chromeos/verstage.c b/src/vendorcode/google/chromeos/verstage.c index 4970124b04..1b42bb6830 100644 --- a/src/vendorcode/google/chromeos/verstage.c +++ b/src/vendorcode/google/chromeos/verstage.c @@ -173,12 +173,13 @@ void verstage_main(void) #endif /* CONFIG_RETURN_FROM_VERSTAGE */ { struct vb2_context ctx; + struct vboot_region fw_main; struct vb2_working_data *wd = vboot_get_working_data(); int rv; /* Set up context and work buffer */ memset(&ctx, 0, sizeof(ctx)); - ctx.workbuf = wd->buffer; + ctx.workbuf = (uint8_t *)(uintptr_t)wd->buffer; ctx.workbuf_size = wd->buffer_size; /* Read nvdata from a non-volatile storage */ @@ -225,11 +226,11 @@ void verstage_main(void) } printk(BIOS_INFO, "Phase 4\n"); - rv = locate_firmware(&ctx, &wd->selected_region); + rv = locate_firmware(&ctx, &fw_main); if (rv) die("Failed to read FMAP to locate firmware"); - rv = hash_body(&ctx, &wd->selected_region); + rv = hash_body(&ctx, &fw_main); save_if_needed(&ctx); if (rv) { printk(BIOS_INFO, "Reboot requested (%x)\n", rv); @@ -246,4 +247,5 @@ void verstage_main(void) } printk(BIOS_INFO, "Slot %c is selected\n", is_slot_a(&ctx) ? 'A' : 'B'); + vb2_set_selected_region(wd, &fw_main); } |