From 6d4c1f5f43cd1ca0324b9199af9e4a65966dc301 Mon Sep 17 00:00:00 2001 From: Rizwan Qureshi Date: Fri, 26 Oct 2018 16:54:42 +0530 Subject: 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 Reviewed-on: https://review.coreboot.org/c/28724 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Rudolph --- src/lib/boot_device.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/lib') 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) -- cgit v1.2.3