diff options
author | Shawn Nematbakhsh <shawnn@chromium.org> | 2015-02-13 15:29:33 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-02-18 04:53:51 +0000 |
commit | d00847782480e492401ba3bc5a8a8e6f026b08ba (patch) | |
tree | 01c42b77ba518cf57e7512affcb833f0df61056f /core/cortex-m/uldivmod.S | |
parent | 9cb03971f6852fa03df3290e44a8451e01774755 (diff) | |
download | chrome-ec-d00847782480e492401ba3bc5a8a8e6f026b08ba.tar.gz |
cortex-m*: Save panicinfo on non-exception panics
Make non-exception "software" panics such as stack overflow and assert
failure save a panic log. Log the panic type in r4, and misc. panic data
in r5 so that panic reasons can be distinguished.
BUG=chrome-os-partner:36744
TEST=Manual on samus_pd. Run 'crash divzero' then 'panicinfo' after
reboot. Verify that panic info is printed with "r4 :dead6660". Trigger
stack overflow, verify that panic info is printed with "r4 :dead6661".
BRANCH=Samus
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Change-Id: I5f7a8eb0a5c2ac5799d29bb241deb24fabf38f68
Reviewed-on: https://chromium-review.googlesource.com/249912
Tested-by: Alec Berg <alecaberg@chromium.org>
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'core/cortex-m/uldivmod.S')
-rw-r--r-- | core/cortex-m/uldivmod.S | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/cortex-m/uldivmod.S b/core/cortex-m/uldivmod.S index a14bdb203f..256023e9cc 100644 --- a/core/cortex-m/uldivmod.S +++ b/core/cortex-m/uldivmod.S @@ -16,6 +16,7 @@ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include "software_panic.h" .syntax unified @@ -174,4 +175,5 @@ L_dont_sub4: pop {r4, r5, r6, r7, pc} __aeabi_ldiv0: - bl panic_reboot + ldr SOFTWARE_PANIC_REASON_REG, =PANIC_SW_DIV_ZERO + bl exception_panic |