summaryrefslogtreecommitdiff
path: root/src/commonlib/include
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2015-12-08 17:00:23 -0600
committerAaron Durbin <adurbin@chromium.org>2015-12-10 04:43:58 +0100
commit6d720f38e06d14cc8a89635f66dc124dcd5ac150 (patch)
tree874aecaf8f35d8db1740dabc7735e3e44cb9ca5e /src/commonlib/include
parentbf3dbaf86d033becc231a48612d474fac9add1ee (diff)
cbfs/vboot: remove firmware component support
The Chrome OS verified boot path supported multiple CBFS instances in the boot media as well as stand-alone assets sitting in each vboot RW slot. Remove the support for the stand-alone assets and always use CBFS accesses as the way to retrieve data. This is implemented by adding a cbfs_locator object which is queried for locating the current CBFS. Additionally, it is also signalled prior to when a program is about to be loaded by coreboot for the subsequent stage/payload. This provides the same opportunity as previous for vboot to hook in and perform its logic. BUG=chromium:445938 BRANCH=None TEST=Built and ran on glados. CQ-DEPEND=CL:307121,CL:31691,CL:31690 Change-Id: I6a3a15feb6edd355d6ec252c36b6f7885b383099 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/12689 Tested-by: build bot (Jenkins) Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/commonlib/include')
-rw-r--r--src/commonlib/include/commonlib/region.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/commonlib/include/commonlib/region.h b/src/commonlib/include/commonlib/region.h
index 683be31cbe..cc4ee289d2 100644
--- a/src/commonlib/include/commonlib/region.h
+++ b/src/commonlib/include/commonlib/region.h
@@ -99,14 +99,20 @@ static inline size_t region_sz(const struct region *r)
return r->size;
}
+static inline const struct region *region_device_region(
+ const struct region_device *rdev)
+{
+ return &rdev->region;
+}
+
static inline size_t region_device_sz(const struct region_device *rdev)
{
- return region_sz(&rdev->region);
+ return region_sz(region_device_region(rdev));
}
static inline size_t region_device_offset(const struct region_device *rdev)
{
- return region_offset(&rdev->region);
+ return region_offset(region_device_region(rdev));
}
/* Memory map entire region device. Same semantics as rdev_mmap() above. */