diff options
author | Denis Brockus <dbrockus@chromium.org> | 2019-06-05 10:21:01 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-06-11 03:24:06 +0000 |
commit | c89e3557f808c504d8feece4d28a96450089b05f (patch) | |
tree | 2d18eb17e3ff71dc055c780b3d2f49a542160207 /include | |
parent | c9fe943591d489e254f96fcabc745ddd1b778a6b (diff) | |
download | chrome-ec-c89e3557f808c504d8feece4d28a96450089b05f.tar.gz |
minute-ia: ish software panic
Adding functions for software panic to ISH. This includes
panic_set_reason, panic_get_reason and software_panic.
Added extra output when a software panic is detected.
Had to touch nds32/panic.c in order to make panic_sw_reasons
common.
BUG=b:134502392
BRANCH=none
TEST=Verified with crash assert, with CONFIG_DEBUG_ASSERT defined
Change-Id: Iebfe62a7dcd59b4bbed82b450dfd44cc8eaed1da
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1648958
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/software_panic.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/software_panic.h b/include/software_panic.h index 99205f02c3..2702c6dc92 100644 --- a/include/software_panic.h +++ b/include/software_panic.h @@ -1,10 +1,10 @@ -/* Copyright (c) 2015 The Chromium OS Authors. All rights reserved. +/* Copyright 2019 The Chromium OS Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. - * - * Software panic constants. This file must be parsable by the assembler. */ +/* Software panic constants. This file must be parsable by the assembler. */ + #ifndef __CROS_EC_SOFTWARE_PANIC_H #define __CROS_EC_SOFTWARE_PANIC_H @@ -23,4 +23,9 @@ #define PANIC_SW_BAD_RNG (PANIC_SW_BASE + 5) #define PANIC_SW_PMIC_FAULT (PANIC_SW_BASE + 6) +#ifndef __ASSEMBLER__ +extern const char * const panic_sw_reasons[]; +extern int panic_sw_reason_is_valid(uint32_t vec); +#endif + #endif /* __CROS_EC_SOFTWARE_PANIC_H */ |