summaryrefslogtreecommitdiff
path: root/include/panic.h
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2012-08-05 22:26:09 +0800
committerGerrit <chrome-bot@google.com>2012-08-08 11:39:48 -0700
commita7d7297577d5450610ddc1a76544fe3300873042 (patch)
treeb49d4b5150dcb543ddc3955a15354c31c9753070 /include/panic.h
parent99a770b14cfd4f1e713623088e0311fc95c2927f (diff)
downloadchrome-ec-a7d7297577d5450610ddc1a76544fe3300873042.tar.gz
stm32f: Use FLASH_KEYR to lock entire flash
Writing wrong key to FLASH_KEYR locks entire flash and effectively performs RW_NOW. Therefore we can use this and remove RW_AT_BOOT to prevent having to reboot for RW to be protected. BUG=chrome-os-partner:12043 TEST=1. fakewp 1 -> wp_gpio_asserted 2. flashwp now -> nothing happens 2. flashwp enable -> wp_gpio_asserted ro_at_boot 3. reboot -> wp_gpio_asserted ro_at_boot ro_now 4. flasherase 0x10000 0x1000 -> success 5. flashwp now -> wp_gpio_asserted ro_at_boot ro_now rw_now 6. flasherase 0x10000 0x1000 -> error 7. reboot -> wp_gpio_asserted ro_at_boot ro_now 8. flasherase 0x10000 0x1000 -> success Change-Id: I22df188e31404c190c5830c6d94c9646224eb9ab Reviewed-on: https://gerrit.chromium.org/gerrit/29255 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Commit-Ready: Vic Yang <victoryang@chromium.org> Tested-by: Vic Yang <victoryang@chromium.org>
Diffstat (limited to 'include/panic.h')
-rw-r--r--include/panic.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/panic.h b/include/panic.h
index f42a399efa..d22a0e11be 100644
--- a/include/panic.h
+++ b/include/panic.h
@@ -85,4 +85,11 @@ void panic(const char *msg);
*/
void report_panic(const char *msg, uint32_t *lregs);
+/**
+ * Enable/disable bus fault handler
+ *
+ * @param ignored Non-zero if ignoring bus fault
+ */
+void ignore_bus_fault(int ignored);
+
#endif