Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
exception.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: Copyright (c) 2025 Infineon Technologies AG,
3 * SPDX-FileCopyrightText: or an affiliate of Infineon Technologies AG. All rights reserved.
4 * SPDX-FileCopyrightText: Copyright (c) 2026 Linumiz
5 *
6 * SPDX-License-Identifier: Apache-2.0
7 */
8
15
16#ifndef ZEPHYR_INCLUDE_ARCH_TRICORE_EXCEPTION_H_
17#define ZEPHYR_INCLUDE_ARCH_TRICORE_EXCEPTION_H_
18
19#ifndef _ASMLANGUAGE
20#include <zephyr/types.h>
21#include <zephyr/toolchain.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
28
29/* TriCore Exception Stack Frame is the lower context*/
30struct arch_esf {
31 uint32_t pcxi;
32 uint32_t a11;
35 uint32_t d0;
36 uint32_t d1;
37 uint32_t d2;
38 uint32_t d3;
43 uint32_t d4;
44 uint32_t d5;
45 uint32_t d6;
46 uint32_t d7;
47};
48
49#define TRICORE_TRAP_MMU 0
50#define TRICORE_TRAP_INTERNAL_PROTECTION_TRAPS 1
51#define TRICORE_TRAP_INSTRUCTION_ERRORS 2
52#define TRICORE_TRAP_CONTEXT_MANAGEMENT 3
53#define TRICORE_TRAP_SYSTEM_BUS_PERIPHERAL_ERRORS 4
54#define TRICORE_TRAP_ASSERTION_TRAPS 5
55#define TRICORE_TRAP_SYSTEM_CALL 6
56#define TRICORE_TRAP_NMI 7
57
58/* Trap identification numbers (TIN) */
59#define TRICORE_TRAP0_VAF 0
60#define TRICORE_TRAP0_VAP 1
61
62#define TRICORE_TRAP1_PRIV 1
63#define TRICORE_TRAP1_MPR 2
64#define TRICORE_TRAP1_MPW 3
65#define TRICORE_TRAP1_MPX 4
66#define TRICORE_TRAP1_MPP 5
67#define TRICORE_TRAP1_MPN 6
68#define TRICORE_TRAP1_GRWP 7
69
70#define TRICORE_TRAP2_IOPC 1
71#define TRICORE_TRAP2_UOPC 2
72#define TRICORE_TRAP2_OPD 3
73#define TRICORE_TRAP2_ALN 4
74#define TRICORE_TRAP2_MEM 5
75#define TRICORE_TRAP2_CSE 6
76
77#define TRICORE_TRAP3_FCD 1
78#define TRICORE_TRAP3_CDO 2
79#define TRICORE_TRAP3_CDU 3
80#define TRICORE_TRAP3_FCU 4
81#define TRICORE_TRAP3_CSU 5
82#define TRICORE_TRAP3_CTYP 6
83#define TRICORE_TRAP3_NEST 7
84
85#define TRICORE_TRAP4_PSE 1
86#define TRICORE_TRAP4_DSE 2
87#define TRICORE_TRAP4_DAE 3
88#define TRICORE_TRAP4_CAE 4
89#define TRICORE_TRAP4_PIE 5
90#define TRICORE_TRAP4_DIE 6
91#define TRICORE_TRAP4_TAE 7
92
93#define TRICORE_TRAP5_OVF 1
94#define TRICORE_TRAP5_SOVF 2
95
97
98#ifdef __cplusplus
99}
100#endif
101#endif
102#endif
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
Exception stack frame.
Definition exception.h:60
unsigned long a4
Definition exception.h:74
unsigned long a3
Definition exception.h:38
unsigned long a6
Definition exception.h:77
unsigned long a7
Definition exception.h:78
unsigned long a5
Definition exception.h:75
unsigned long a2
Definition exception.h:37
Macros to abstract toolchain specific capabilities.