vboot: use only offsets for tracking firmware components
Because of the fmap API returning pointers to represent
regions within the boot device a vboot_region structure
was used to track the case where offsets could be pointers
on x86 but not on !x86. Normalize this tracking to use
offsets only as it provides consistency in the code.
Change-Id: I63c08b31ace3bd0e66ebc17e308f87eb5f857c86
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/10221
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
diff --git a/src/vendorcode/google/chromeos/vboot2/vboot_handoff.c b/src/vendorcode/google/chromeos/vboot2/vboot_handoff.c
index a1b51a1..38f77a6 100644
--- a/src/vendorcode/google/chromeos/vboot2/vboot_handoff.c
+++ b/src/vendorcode/google/chromeos/vboot2/vboot_handoff.c
@@ -127,7 +127,7 @@
int i;
struct vboot_handoff *vh;
struct vb2_shared_data *sd;
- struct vboot_region fw_main;
+ struct region fw_main;
struct vboot_components *fw_info;
struct vb2_working_data *wd = vboot_get_working_data();
@@ -159,7 +159,7 @@
/* these offset & size are used to load a rw boot loader */
for (i = 0; i < fw_info->num_components; i++) {
vh->components[i].address =
- fw_main.offset_addr + fw_info->entries[i].offset;
+ region_offset(&fw_main) + fw_info->entries[i].offset;
vh->components[i].size = fw_info->entries[i].size;
}
}