2017-01-21 03:52:29 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2014 Wind River Systems, Inc.
|
|
|
|
* Copyright (c) 2016 Cadence Design Systems, Inc.
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* @brief Xtensa public exception handling
|
|
|
|
*
|
2017-04-09 23:57:54 +08:00
|
|
|
* Xtensa-specific kernel exception handling interface. Included by
|
2017-01-21 03:52:29 +08:00
|
|
|
* arch/xtensa/arch.h.
|
|
|
|
*/
|
|
|
|
|
2018-09-15 01:43:44 +08:00
|
|
|
#ifndef ZEPHYR_INCLUDE_ARCH_XTENSA_EXC_H_
|
|
|
|
#define ZEPHYR_INCLUDE_ARCH_XTENSA_EXC_H_
|
2017-01-21 03:52:29 +08:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2019-06-03 10:29:02 +08:00
|
|
|
#ifndef _ASMLANGUAGE
|
2017-01-21 03:52:29 +08:00
|
|
|
/**
|
2017-04-09 23:57:54 +08:00
|
|
|
* @brief Exception Stack Frame
|
2017-01-21 03:52:29 +08:00
|
|
|
*
|
|
|
|
* A pointer to an "exception stack frame" (ESF) is passed as an argument
|
|
|
|
* to exception handlers registered via nanoCpuExcConnect().
|
|
|
|
*/
|
|
|
|
struct __esf {
|
2019-06-03 10:29:02 +08:00
|
|
|
/* FIXME - not finished yet */
|
2017-01-21 03:52:29 +08:00
|
|
|
sys_define_gpr_with_alias(a1, sp);
|
2017-04-21 23:55:34 +08:00
|
|
|
u32_t pc;
|
2017-01-21 03:52:29 +08:00
|
|
|
};
|
|
|
|
|
2019-08-22 00:52:49 +08:00
|
|
|
/* Xtensa uses a variable length stack frame depending on how many
|
|
|
|
* register windows are in use. This isn't a struct type, it just
|
|
|
|
* matches the register/stack-unit width.
|
|
|
|
*/
|
|
|
|
typedef int z_arch_esf_t;
|
|
|
|
|
|
|
|
void z_xtensa_dump_stack(const z_arch_esf_t *stack);
|
|
|
|
char *z_xtensa_exccause(unsigned int cause_code);
|
|
|
|
|
2017-01-21 03:52:29 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2018-09-15 01:43:44 +08:00
|
|
|
#endif /* ZEPHYR_INCLUDE_ARCH_XTENSA_EXC_H_ */
|