summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorRizwan Qureshi <rizwan.qureshi@intel.com>2018-10-26 16:54:42 +0530
committerPatrick Georgi <pgeorgi@google.com>2019-01-21 13:25:46 +0000
commit6d4c1f5f43cd1ca0324b9199af9e4a65966dc301 (patch)
tree62894ce63cc0738c4c304cecbf2dc1834f9c629e /src/lib
parentf9f50936446e8e441238ecfe12ce0fc9e04d491a (diff)
downloadcoreboot-6d4c1f5f43cd1ca0324b9199af9e4a65966dc301.tar.xz
lib/boot_device: Add API for write protect a region
Add API that should be implemented by the boot media drivers for write-protecting a subregion. Change-Id: I4c9376e2c2c7a4852f13c65824c6cd64a1c6ac0a Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com> Reviewed-on: https://review.coreboot.org/c/28724 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/boot_device.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/boot_device.c b/src/lib/boot_device.c
index efbbedb23e..429a6d8710 100644
--- a/src/lib/boot_device.c
+++ b/src/lib/boot_device.c
@@ -20,6 +20,13 @@ void __weak boot_device_init(void)
/* Provide weak do-nothing init. */
}
+int __weak boot_device_wp_region(struct region_device *rd,
+ const enum bootdev_prot_type type)
+{
+ /* return a failure, make aware WP is not implemented */
+ return -1;
+}
+
static int boot_device_subregion(const struct region *sub,
struct region_device *subrd,
const struct region_device *parent)