summaryrefslogtreecommitdiff
path: root/core/cortex-m/panic.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-05-17 13:19:46 -0700
committerChromeBot <chrome-bot@google.com>2013-05-17 17:02:36 -0700
commitc2933c122a10c8a1e0850672ed878b39c9c67be1 (patch)
treea6152a472101c4cab194febc83ed1e5d68ca9d83 /core/cortex-m/panic.c
parent7d207c98e2a99accbd1ab1353d0a802f9a8be3de (diff)
downloadchrome-ec-c2933c122a10c8a1e0850672ed878b39c9c67be1.tar.gz
Bus fault handler doesn't need to be naked
When it was a naked call, if it doesn't jump somewhere, it just falls through to whatever code happens to be next. Which happened to re-enable bus faults - meaning that only the first fault was being ignored. That's a problem for flash protection on STM32, where writes to potentially-locked key registers come in pairs. BUG=chrome-os-partner:19564 BRANCH=spring TEST=manual, on pit: 1. Hack in a igbusfault console command to call ignore_bus_fault() 2. igbusfault 1 3. ww 0x40023c0c 0xdeadbeef -> no fault 4. ww 0x40023c0c 0xdeadbeef -> still no fault 5. igbusfault 0 6. ww 0x40023c0c 0xdeadbeef -> exception and reboot Change-Id: I5cf74b06a76ebf0176a2905924be87b3d1c825ce Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/55572 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'core/cortex-m/panic.c')
-rw-r--r--core/cortex-m/panic.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/core/cortex-m/panic.c b/core/cortex-m/panic.c
index 122b609ec0..df3b08db57 100644
--- a/core/cortex-m/panic.c
+++ b/core/cortex-m/panic.c
@@ -431,7 +431,6 @@ void exception_panic(void)
);
}
-void bus_fault_handler(void) __attribute__((naked));
void bus_fault_handler(void)
{
if (!bus_fault_ignored)