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)
This commit is contained in:
Aaron Durbin 2016-08-12 12:46:07 -05:00 committed by Martin Roth
parent d10f9d57c2
commit 5bb9e93ea6
2 changed files with 8 additions and 0 deletions

View File

@ -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)
{

View File

@ -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.