Zephyr API Documentation  3.7.0
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 arch_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 {
74};
75
76extern uint32_t z_arm_coredump_fault_sp;
77
78extern void z_arm_exc_exit(bool fatal);
79
80#ifdef __cplusplus
81}
82#endif
83
84#endif /* _ASMLANGUAGE */
85
86#endif /* ZEPHYR_INCLUDE_ARCH_ARM_CORTEX_A_R_EXCEPTION_H_ */
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
Definition: exception.h:64
uint32_t xpsr
Definition: exception.h:72
sys_define_gpr_with_alias(a1, r0)
sys_define_gpr_with_alias(ip, r12)
sys_define_gpr_with_alias(a2, r1)
sys_define_gpr_with_alias(lr, r14)
sys_define_gpr_with_alias(pc, r15)
sys_define_gpr_with_alias(a3, r2)
sys_define_gpr_with_alias(a4, r3)
Exception Stack Frame.
Definition: exception.h:57
struct arch_esf::__basic_sf basic
unsigned long a4
Definition: exception.h:68
unsigned long a3
Definition: exception.h:38
uint32_t r2
Definition: exception.h:20
uint32_t pc
Definition: exception.h:21
uint32_t r3
Definition: exception.h:21
unsigned long a1
Definition: exception.h:36
uint32_t r1
Definition: exception.h:19
struct __fpu_sf fpu
Definition: exception.h:62
uint32_t r15
Definition: exception.h:33
uint32_t r12
Definition: exception.h:30
uint64_t lr
Definition: exception.h:47
unsigned long a2
Definition: exception.h:37
uint32_t r14
Definition: exception.h:32
static void fatal(uint32_t testnum, const void *expected, size_t expectedlen, const void *computed, size_t computedlen)
Definition: test_utils.h:50