mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-04 22:11:41 +00:00
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>
24 lines
743 B
C
24 lines
743 B
C
/* Copyright (c) 2015 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.
|
|
*/
|
|
|
|
#ifndef __CROS_EC_SOFTWARE_PANIC_H
|
|
#define __CROS_EC_SOFTWARE_PANIC_H
|
|
|
|
/* Holds software panic reason PANIC_SW_* */
|
|
#define SOFTWARE_PANIC_REASON_REG r4
|
|
#define SOFTWARE_PANIC_INFO_REG r5
|
|
|
|
#define PANIC_SW_BASE 0xDEAD6660
|
|
|
|
/* Software panic reasons */
|
|
#define PANIC_SW_DIV_ZERO (PANIC_SW_BASE + 0)
|
|
#define PANIC_SW_STACK_OVERFLOW (PANIC_SW_BASE + 1)
|
|
#define PANIC_SW_ASSERT (PANIC_SW_BASE + 3)
|
|
#define PANIC_SW_WATCHDOG (PANIC_SW_BASE + 4)
|
|
|
|
#endif /* __CROS_EC_SOFTWARE_PANIC_H */
|