summaryrefslogtreecommitdiff
path: root/src/vboot
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2016-08-12 12:46:07 -0500
committerMartin Roth <martinroth@google.com>2016-08-19 18:18:37 +0200
commit5bb9e93ea68db0ffe156f2df2d69397f21c57095 (patch)
tree7263432a4e4141b0520206eeeb204f7a7f6ec692 /src/vboot
parentd10f9d57c2be360fcecb0f3dece4886ced781e54 (diff)
downloadcoreboot-5bb9e93ea68db0ffe156f2df2d69397f21c57095.tar.xz
vboot: provide RW region device support
Explicitly provide a RW view of an vboot FMAP region. This is required for platforms which have separate implementations of a RO boot device and a RW boot device. BUG=chrome-os-partner:56151 Change-Id: If8bf2e1c7ca9bff536fc5c578fe0cf92ccbd2ebc Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/16205 Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/vboot')
-rw-r--r--src/vboot/vboot_common.c5
-rw-r--r--src/vboot/vboot_common.h3
2 files changed, 8 insertions, 0 deletions
diff --git a/src/vboot/vboot_common.c b/src/vboot/vboot_common.c
index 319e0dedfc..7e1ca9de55 100644
--- a/src/vboot/vboot_common.c
+++ b/src/vboot/vboot_common.c
@@ -30,6 +30,11 @@ int vboot_named_region_device(const char *name, struct region_device *rdev)
return fmap_locate_area_as_rdev(name, rdev);
}
+int vboot_named_region_device_rw(const char *name, struct region_device *rdev)
+{
+ return fmap_locate_area_as_rdev(name, rdev);
+}
+
/* ========================== VBOOT HANDOFF APIs =========================== */
int vboot_get_handoff_info(void **addr, uint32_t *size)
{
diff --git a/src/vboot/vboot_common.h b/src/vboot/vboot_common.h
index d64b5bb007..59fd44ca30 100644
--- a/src/vboot/vboot_common.h
+++ b/src/vboot/vboot_common.h
@@ -23,6 +23,9 @@
/* Locate vboot area by name. Returns 0 on success and -1 on error. */
int vboot_named_region_device(const char *name, struct region_device *rdev);
+/* Like vboot_named_region_device() but provides a RW region device. */
+int vboot_named_region_device_rw(const char *name, struct region_device *rdev);
+
/*
* Function to check if there is a request to enter recovery mode. Returns
* reason code if request to enter recovery mode is present, otherwise 0.