summaryrefslogtreecommitdiff
path: root/include/flash.h
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-07-17 15:24:26 -0700
committerRandall Spangler <rspangler@chromium.org>2012-07-18 13:49:11 -0700
commit3f492b471b215f32f10bdaea37e8b4b7ca6109f3 (patch)
tree128e484f545990c82d144aab02e403d32ca6ef0f /include/flash.h
parentaabe50f0d55fc615531b73c1c3261108507c5b7b (diff)
downloadchrome-ec-3f492b471b215f32f10bdaea37e8b4b7ca6109f3.tar.gz
Continue simplifying flash write protect
Now that read-only code is protected iff the persistent state is locked, we don't need to track per-block in the persistent state. BUG=chrome-os-partner:11150 TEST=if it builds and boots, it's fine Change-Id: I80e6a85c0c72136b7ed8964ce02c8abdbaafe637 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/27719
Diffstat (limited to 'include/flash.h')
-rw-r--r--include/flash.h29
1 files changed, 8 insertions, 21 deletions
diff --git a/include/flash.h b/include/flash.h
index bd89448c57..ec9407d44e 100644
--- a/include/flash.h
+++ b/include/flash.h
@@ -151,30 +151,17 @@ int flash_protect_until_reboot(void);
* persistently-protected blocks. */
int flash_lock_protect(int lock);
-/* Flags for flash_get_protect() and flash_get_protect_array(). */
-/* Protected until reboot. This will be set for persistently-protected blocks
- * as soon as the flash module protects them, and for non-persistent protection
- * after flash_protect_until_reboot() is called on a block. */
-#define FLASH_PROTECT_UNTIL_REBOOT 0x01
-
-/* Return a copy of the current write protect state. This is an array of
- * per-protect-block flags. The data is valid until the next call to a flash
- * function. */
-const uint8_t *flash_get_protect_array(void);
-
-/* Return the lowest amount of protection for any flash block in the specified
- * range. That is, if any byte in the range is not protected until reboot,
- * FLASH_PROTECT_UNTIL_REBOOT will not be set. */
-int flash_get_protect(int offset, int size);
-
/* Flags for flash_get_protect_lock() */
-/* Flash protection lock has been set. Note that if the write protect pin was
+/*
+ * Flash protection lock has been set. Note that if the write protect pin was
* deasserted at boot time, this simply indicates the state of the lock
- * setting, and not whether blocks are actually protected. */
+ * setting, and not whether blocks are actually protected.
+ */
#define FLASH_PROTECT_LOCK_SET 0x01
-/* Flash protection lock has actually been applied. All blocks with
- FLASH_PROTECT_PERSISTENT have been protected, and flash protection cannot be
- unlocked. */
+/*
+ * Flash protection lock has actually been applied. Read-only firmware is
+ * protected, and flash protection cannot be unlocked.
+ */
#define FLASH_PROTECT_LOCK_APPLIED 0x02
/* Write protect pin is currently asserted */
#define FLASH_PROTECT_PIN_ASSERTED 0x04