Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
exception.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2013-2014 Wind River Systems, Inc.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
12#ifndef ZEPHYR_INCLUDE_ARCH_ARM_CORTEX_A_R_EXCEPTION_H_
13#define ZEPHYR_INCLUDE_ARCH_ARM_CORTEX_A_R_EXCEPTION_H_
14
15#ifdef _ASMLANGUAGE
16GTEXT(z_arm_exc_exit);
17#else
18#include <zephyr/types.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING)
25
26/* Registers s16-s31 (d8-d15, q4-q7) must be preserved across subroutine calls.
27 *
28 * Registers s0-s15 (d0-d7, q0-q3) do not have to be preserved (and can be used
29 * for passing arguments or returning results in standard procedure-call variants).
30 *
31 * Registers d16-d31 (q8-q15), do not have to be preserved.
32 */
33struct __fpu_sf {
34 uint32_t s[16]; /* s0~s15 (d0-d7) */
35#ifdef CONFIG_VFP_FEATURE_REGS_S64_D32
36 uint64_t d[16]; /* d16~d31 */
37#endif
38 uint32_t fpscr;
39 uint32_t undefined;
40};
41#endif
42
43/* Additional register state that is not stacked by hardware on exception
44 * entry.
45 *
46 * These fields are ONLY valid in the ESF copy passed into z_arm_fatal_error().
47 * When information for a member is unavailable, the field is set to zero.
48 */
49#if defined(CONFIG_EXTRA_EXCEPTION_INFO)
50struct __extra_esf_info {
51 _callee_saved_t *callee;
52 uint32_t msp;
53 uint32_t exc_return;
54};
55#endif /* CONFIG_EXTRA_EXCEPTION_INFO */
56
57struct __esf {
58#if defined(CONFIG_EXTRA_EXCEPTION_INFO)
59 struct __extra_esf_info extra_info;
60#endif
61#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING)
62 struct __fpu_sf fpu;
63#endif
64 struct __basic_sf {
72 uint32_t xpsr;
73 } basic;
74};
75
76extern uint32_t z_arm_coredump_fault_sp;
77
78typedef struct __esf z_arch_esf_t;
79
80extern void z_arm_exc_exit(bool fatal);
81
82#ifdef __cplusplus
83}
84#endif
85
86#endif /* _ASMLANGUAGE */
87
88#endif /* ZEPHYR_INCLUDE_ARCH_ARM_CORTEX_A_R_EXCEPTION_H_ */
#define sys_define_gpr_with_alias(name1, name2)
Definition: arch.h:23
irp nz macro MOVR cc s mov cc s endm endr irp aw macro LDR aa s
Definition: asm-macro-32-bit-gnu.h:17
irp nz macro MOVR cc d
Definition: asm-macro-32-bit-gnu.h:11
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
__UINT64_TYPE__ uint64_t
Definition: stdint.h:91
static void fatal(uint32_t testnum, const void *expected, size_t expectedlen, const void *computed, size_t computedlen)
Definition: test_utils.h:50