aboutsummaryrefslogtreecommitdiff
path: root/src/vendorcode/google/chromeos/vboot_common.h
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2015-05-15 15:57:51 -0500
committerAaron Durbin <adurbin@chromium.org>2015-05-26 22:33:35 +0200
commitb6981c0f9c4ce89c4209c14fb326a414096f2ff1 (patch)
tree604e3df8ef60b2a962f19be791bba4398ab868a9 /src/vendorcode/google/chromeos/vboot_common.h
parentb59eaf6ca88267baf28cb318117696df1fb03fee (diff)
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>
Diffstat (limited to 'src/vendorcode/google/chromeos/vboot_common.h')
-rw-r--r--src/vendorcode/google/chromeos/vboot_common.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/vendorcode/google/chromeos/vboot_common.h b/src/vendorcode/google/chromeos/vboot_common.h
index 3704d9717e..4b034667fc 100644
--- a/src/vendorcode/google/chromeos/vboot_common.h
+++ b/src/vendorcode/google/chromeos/vboot_common.h
@@ -20,11 +20,7 @@
#define VBOOT_COMMON_H
#include <stdint.h>
-
-struct vboot_region {
- uintptr_t offset_addr;
- int32_t size;
-};
+#include <region.h>
/* The FW areas consist of multiple components. At the beginning of
* each area is the number of total compoments as well as the size and
@@ -40,9 +36,9 @@ struct vboot_components {
struct vboot_component_entry entries[0];
} __attribute__((packed));
-void vboot_locate_region(const char *name, struct vboot_region *region);
+void vboot_locate_region(const char *name, struct region *region);
-struct vboot_components *vboot_locate_components(struct vboot_region *region);
+struct vboot_components *vboot_locate_components(struct region *region);
/*
* This is a dual purpose routine. If dest is non-NULL the region at
@@ -50,6 +46,6 @@ struct vboot_components *vboot_locate_components(struct vboot_region *region);
* is NULL,the region will be mapped to a memory location. NULL is
* returned on error else the location of the requested region.
*/
-void *vboot_get_region(uintptr_t offset_addr, size_t size, void *dest);
+void *vboot_get_region(size_t offset, size_t size, void *dest);
#endif /* VBOOT_COMMON_H */