2022-01-14 12:05:01 -05:00
|
|
|
/*
|
2023-07-19 04:28:03 -04:00
|
|
|
* SPDX-FileCopyrightText: 2020-2023 Espressif Systems (Shanghai) CO LTD
|
2022-01-14 12:05:01 -05:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
2020-10-08 01:18:16 -04:00
|
|
|
#pragma once
|
|
|
|
|
2023-08-31 00:19:49 -04:00
|
|
|
#include "soc/soc_caps.h"
|
|
|
|
|
|
|
|
/* Need a way to signal which core caused the INT WDT like we do with EXCAUSE on xtensa.
|
|
|
|
Choosing a large number that is unlikely to conflict with any actual riscv mcauses
|
|
|
|
bit 12 and above are always zero on the CPU used by P4
|
2023-05-04 11:31:31 -04:00
|
|
|
*/
|
|
|
|
#define PANIC_RSN_INTWDT_CPU0 ETS_INT_WDT_INUM
|
2023-07-19 04:28:03 -04:00
|
|
|
#if SOC_CPU_CORES_NUM > 1
|
2023-08-31 00:19:49 -04:00
|
|
|
#define PANIC_RSN_INTWDT_CPU1_FLAG (1 << 12)
|
|
|
|
#define PANIC_RSN_INTWDT_CPU1 (PANIC_RSN_INTWDT_CPU1_FLAG | ETS_INT_WDT_INUM)
|
2023-07-19 04:28:03 -04:00
|
|
|
#endif
|
2023-08-31 00:19:49 -04:00
|
|
|
|
2023-07-19 04:28:03 -04:00
|
|
|
#define PANIC_RSN_CACHEERR 3
|
2023-11-27 20:57:44 -05:00
|
|
|
|
2024-07-11 03:23:29 -04:00
|
|
|
#define MCAUSE_ILLIGAL_INSTRUCTION_ACCESS 1
|
|
|
|
#define MCAUSE_ILLEGAL_INSTRUCTION 2
|
|
|
|
#define MCAUSE_LOAD_ACCESS_FAULT 5
|