summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-05-17 13:19:46 -0700
committerKatie Roberts-Hoffman <katierh@chromium.org>2013-05-22 16:22:11 -0700
commit1858742759a124e8fde78c6b56c7ff141d67eea3 (patch)
tree98713e6faebf32c282980c69de972ea883c301e3
parent7ad32623a753b36e370488f4a9c37106efa0dc06 (diff)
downloadchrome-ec-1858742759a124e8fde78c6b56c7ff141d67eea3.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> (cherry picked from commit c2933c122a10c8a1e0850672ed878b39c9c67be1) Reviewed-on: https://gerrit.chromium.org/gerrit/56322 Commit-Queue: Katie Roberts-Hoffman <katierh@chromium.org> Reviewed-by: Katie Roberts-Hoffman <katierh@chromium.org> Tested-by: Katie Roberts-Hoffman <katierh@chromium.org>
-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)