1 /* 2 * Copyright (c) 2019 Carlo Caione <ccaione@baylibre.com> 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 /** 8 * @file 9 * @brief Cortex-A public exception handling 10 * 11 * ARM-specific kernel exception handling interface. Included by arm64/arch.h. 12 */ 13 14 #ifndef ZEPHYR_INCLUDE_ARCH_ARM64_EXCEPTION_H_ 15 #define ZEPHYR_INCLUDE_ARCH_ARM64_EXCEPTION_H_ 16 17 /* for assembler, only works with constants */ 18 19 #ifdef _ASMLANGUAGE 20 #else 21 #include <zephyr/types.h> 22 23 #ifdef __cplusplus 24 extern "C" { 25 #endif 26 27 struct arch_esf { 28 uint64_t x0; 29 uint64_t x1; 30 uint64_t x2; 31 uint64_t x3; 32 uint64_t x4; 33 uint64_t x5; 34 uint64_t x6; 35 uint64_t x7; 36 uint64_t x8; 37 uint64_t x9; 38 uint64_t x10; 39 uint64_t x11; 40 uint64_t x12; 41 uint64_t x13; 42 uint64_t x14; 43 uint64_t x15; 44 uint64_t x16; 45 uint64_t x17; 46 uint64_t x18; 47 uint64_t lr; 48 uint64_t spsr; 49 uint64_t elr; 50 #ifdef CONFIG_FRAME_POINTER 51 uint64_t fp; 52 #endif 53 #ifdef CONFIG_ARM64_SAFE_EXCEPTION_STACK 54 uint64_t sp; 55 #endif 56 } __aligned(16); 57 58 #ifdef __cplusplus 59 } 60 #endif 61 62 #endif /* _ASMLANGUAGE */ 63 64 #endif /* ZEPHYR_INCLUDE_ARCH_ARM64_EXCEPTION_H_ */ 65