summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2013-12-04 17:15:12 -0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2013-12-05 22:30:58 +0000
commit1762de9d19d2671cc56e5a479055379a346030d3 (patch)
tree21f6ec886e9abcf9638c8a88767b8299d7eddfe7 /util
parentb45f3b9f348c550a7389973d916b8b7cb6b25a88 (diff)
downloadchrome-ec-1762de9d19d2671cc56e5a479055379a346030d3.tar.gz
extract common core code
Move the non-core dependent code out of core/$(CORE) directory to common/ directory. Put all panic printing code in common/panic_output.c Put timer management code in common/timer.c Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=chrome-os-partner:23574 TEST=./util/make_all.sh use "crash divzero" and "panicinfo" on Link. Change-Id: Ia4e1ebc74cd53da55fe24f69e96f39f512b9336d Reviewed-on: https://chromium-review.googlesource.com/178871 Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Jeremy Thorpe <jeremyt@chromium.org> Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'util')
-rw-r--r--util/ectool.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/util/ectool.c b/util/ectool.c
index 8bb079c818..db3f0262af 100644
--- a/util/ectool.c
+++ b/util/ectool.c
@@ -1875,7 +1875,7 @@ int cmd_panic_info(int argc, char *argv[])
{
int rv;
struct panic_data *pdata = (struct panic_data *)ec_inbuf;
- const uint32_t *lregs = pdata->regs;
+ const uint32_t *lregs = pdata->cm.regs;
const uint32_t *sregs = NULL;
enum {
ORIG_UNKNOWN = 0,
@@ -1905,6 +1905,11 @@ int cmd_panic_info(int argc, char *argv[])
"Following data may be incorrect!\n",
pdata->struct_version);
+ if (pdata->arch != PANIC_ARCH_CORTEX_M)
+ fprintf(stderr, "Unknown architecture (%d). "
+ "CPU specific data will be incorrect!\n",
+ pdata->arch);
+
printf("Saved panic data:%s\n",
(pdata->flags & PANIC_DATA_FLAG_OLD_HOSTCMD ? "" : " (NEW)"));
@@ -1919,7 +1924,7 @@ int cmd_panic_info(int argc, char *argv[])
* version 1.
*/
if (pdata->flags & PANIC_DATA_FLAG_FRAME_VALID)
- sregs = pdata->frame - (pdata->struct_version == 1 ? 1 : 0);
+ sregs = pdata->cm.frame - (pdata->struct_version == 1 ? 1 : 0);
printf("=== %s EXCEPTION: %02x ====== xPSR: %08x ===\n",
panic_origins[origin],