Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
thread.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 Carlo Caione <ccaione@baylibre.com>
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
18
19#ifndef ZEPHYR_INCLUDE_ARCH_ARM64_THREAD_H_
20#define ZEPHYR_INCLUDE_ARCH_ARM64_THREAD_H_
21
22#ifndef _ASMLANGUAGE
23#include <zephyr/types.h>
25
26struct _callee_saved {
27 uint64_t x19;
28 uint64_t x20;
29 uint64_t x21;
30 uint64_t x22;
31 uint64_t x23;
32 uint64_t x24;
33 uint64_t x25;
34 uint64_t x26;
35 uint64_t x27;
36 uint64_t x28;
37 uint64_t x29;
38 uint64_t sp_el0;
39 uint64_t sp_elx;
40 uint64_t lr;
41};
42
43typedef struct _callee_saved _callee_saved_t;
44
45struct z_arm64_fp_context {
46 uint32_t fpsr, fpcr;
47 union {
48 struct {
49 __int128 v_regs[32];
50 } neon;
51#ifdef CONFIG_ARM64_SVE
52 struct {
53 uint8_t z_regs[32 * CONFIG_ARM64_SVE_VL_MAX] __aligned(8);
54 uint8_t p_regs[16 * (CONFIG_ARM64_SVE_VL_MAX / 8)];
55 uint8_t ffr[CONFIG_ARM64_SVE_VL_MAX / 8];
56 enum { SIMD_NONE = 0, SIMD_NEON, SIMD_SVE } simd_mode;
57 } sve;
58#endif
59 };
60};
61
62typedef struct z_arm64_fp_context z_arm64_fp_context;
63
64struct _thread_arch {
65#if defined(CONFIG_USERSPACE) || defined(CONFIG_ARM64_STACK_PROTECTION)
66#if defined(CONFIG_ARM_MMU)
67 struct arm_mmu_ptables *ptables;
68#endif
69#if defined(CONFIG_ARM_MPU)
70 struct dynamic_region_info regions[ARM64_MPU_MAX_DYNAMIC_REGIONS];
71 uint8_t region_num;
72 atomic_t flushing;
73#endif
74#endif
75#ifdef CONFIG_ARM64_SAFE_EXCEPTION_STACK
76 uint64_t stack_limit;
77#endif
78 uint8_t exception_depth;
79 /* Keep large structures at the end to avoid offset issues */
80#ifdef CONFIG_FPU_SHARING
81 struct z_arm64_fp_context saved_fp_context;
82#endif
83};
84
85typedef struct _thread_arch _thread_arch_t;
86
87#endif /* _ASMLANGUAGE */
88
89#endif /* ZEPHYR_INCLUDE_ARCH_ARM64_THREAD_H_ */
#define ARM64_MPU_MAX_DYNAMIC_REGIONS
Definition arm_mpu.h:256
long atomic_t
Definition atomic_types.h:15
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT64_TYPE__ uint64_t
Definition stdint.h:91
__UINT8_TYPE__ uint8_t
Definition stdint.h:88