From 7aef73eff644e774ba74b9ed7677cbdccf3829f1 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Tue, 28 Aug 2012 17:04:40 -0700 Subject: Declare VbExProtectFlash() in vboot_api.h so we can implement it. We have to define the function we need here, so that we can implement it in U-Boot, then we can come back here and try to use it. Grr. BUG=chrome-os-partner:11215 BRANCH=link TEST=none This just defines the function prototype. No change to test. Original-Change-Id: I38a19baa54c59c9744d20f743eb53260f2d19852 Signed-off-by: Bill Richardson Reviewed-on: https://gerrit.chromium.org/gerrit/31658 Reviewed-by: Randall Spangler (cherry picked from commit e0c55a3238f41ce30d6d592725670766355bed67) Change-Id: Ieee7c9ce5375a3511b06fa36a94492d026fc620c Reviewed-on: https://gerrit.chromium.org/gerrit/34676 Tested-by: Bill Richardson Reviewed-by: Randall Spangler Tested-by: Randall Spangler --- firmware/include/vboot_api.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/firmware/include/vboot_api.h b/firmware/include/vboot_api.h index 3d9b6921..12da9550 100644 --- a/firmware/include/vboot_api.h +++ b/firmware/include/vboot_api.h @@ -655,6 +655,14 @@ VbError_t VbExEcUpdateRW(const uint8_t *image, int image_size); * Subsequent calls to VbExEcUpdateRW() this boot will fail. */ VbError_t VbExEcProtectRW(void); +/* Args to VbExProtectFlash() */ +enum VbProtectFlash_t { VBPROTECT_RW_A, VBPROTECT_RW_B, VBPROTECT_RW_DEVKEY }; + +/* Lock a section of the BIOS flash address space to prevent updates until the + * host is rebooted. Subsequent attempts to erase or modify the specified BIOS + * image will fail. If this function is called more than once each call should + * be cumulative. */ +VbError_t VbExProtectFlash(enum VbProtectFlash_t region); /*****************************************************************************/ /* Misc */ -- cgit v1.2.1