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)19static inline void sve_init_el3(void) 20 { 21 } sve_init_el2_unused(void)22static inline void sve_init_el2_unused(void) 23 { 24 } sve_enable_per_world(per_world_context_t * per_world_ctx)25static 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)28static 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