xref: /rk3399_ARM-atf/include/lib/extensions/sve.h (revision 2e0354f58834219c65b1d44447b8510f3983a5ba)
1 /*
2  * Copyright (c) 2017-2025, Arm Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef SVE_H
8 #define SVE_H
9 
10 #include <context.h>
11 
12 #if (ENABLE_SME_FOR_NS || ENABLE_SVE_FOR_NS)
13 
14 void sve_init_el3(void);
15 void sve_init_el2_unused(void);
16 void sve_enable_per_world(per_world_context_t *per_world_ctx);
17 void sve_disable_per_world(per_world_context_t *per_world_ctx);
18 #else
sve_init_el3(void)19 static inline void sve_init_el3(void)
20 {
21 }
sve_init_el2_unused(void)22 static inline void sve_init_el2_unused(void)
23 {
24 }
sve_enable_per_world(per_world_context_t * per_world_ctx)25 static inline void sve_enable_per_world(per_world_context_t *per_world_ctx)
26 {
27 }
sve_disable_per_world(per_world_context_t * per_world_ctx)28 static inline void sve_disable_per_world(per_world_context_t *per_world_ctx)
29 {
30 }
31 #endif /* ( ENABLE_SME_FOR_NS | ENABLE_SVE_FOR_NS ) */
32 
33 #if CTX_INCLUDE_SVE_REGS
34 void sve_context_save(simd_regs_t *regs);
35 void sve_context_restore(simd_regs_t *regs);
36 #endif
37 
38 #endif /* SVE_H */
39