David Cunado | 1a85337 | 2017-10-20 11:30:57 +0100 | [diff] [blame] | 1 | /* |
Madhukar Pappireddy | 6d5319a | 2024-06-17 15:22:36 -0500 | [diff] [blame^] | 2 | * Copyright (c) 2017-2024, Arm Limited and Contributors. All rights reserved. |
David Cunado | 1a85337 | 2017-10-20 11:30:57 +0100 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
Antonio Nino Diaz | 40daecc | 2018-10-25 16:52:26 +0100 | [diff] [blame] | 7 | #ifndef SVE_H |
| 8 | #define SVE_H |
David Cunado | 1a85337 | 2017-10-20 11:30:57 +0100 | [diff] [blame] | 9 | |
Max Shvetsov | 0c5e7d1 | 2021-03-22 11:59:37 +0000 | [diff] [blame] | 10 | #include <context.h> |
David Cunado | 1a85337 | 2017-10-20 11:30:57 +0100 | [diff] [blame] | 11 | |
Jayanth Dodderi Chidanand | 2b0bc4e | 2023-03-07 10:43:19 +0000 | [diff] [blame] | 12 | #if (ENABLE_SME_FOR_NS || ENABLE_SVE_FOR_NS) |
Madhukar Pappireddy | 6d5319a | 2024-06-17 15:22:36 -0500 | [diff] [blame^] | 13 | |
Boyan Karatotev | 60d330d | 2023-02-16 15:12:45 +0000 | [diff] [blame] | 14 | void sve_init_el2_unused(void); |
Elizabeth Ho | 461c0a5 | 2023-07-18 14:10:25 +0100 | [diff] [blame] | 15 | void sve_enable_per_world(per_world_context_t *per_world_ctx); |
| 16 | void sve_disable_per_world(per_world_context_t *per_world_ctx); |
Jayanth Dodderi Chidanand | 2b0bc4e | 2023-03-07 10:43:19 +0000 | [diff] [blame] | 17 | #else |
Boyan Karatotev | 60d330d | 2023-02-16 15:12:45 +0000 | [diff] [blame] | 18 | static inline void sve_init_el2_unused(void) |
| 19 | { |
| 20 | } |
Elizabeth Ho | 461c0a5 | 2023-07-18 14:10:25 +0100 | [diff] [blame] | 21 | static inline void sve_enable_per_world(per_world_context_t *per_world_ctx) |
| 22 | { |
| 23 | } |
| 24 | static inline void sve_disable_per_world(per_world_context_t *per_world_ctx) |
Jayanth Dodderi Chidanand | 2b0bc4e | 2023-03-07 10:43:19 +0000 | [diff] [blame] | 25 | { |
| 26 | } |
| 27 | #endif /* ( ENABLE_SME_FOR_NS | ENABLE_SVE_FOR_NS ) */ |
Antonio Nino Diaz | 40daecc | 2018-10-25 16:52:26 +0100 | [diff] [blame] | 28 | |
Madhukar Pappireddy | 6d5319a | 2024-06-17 15:22:36 -0500 | [diff] [blame^] | 29 | #if CTX_INCLUDE_SVE_REGS |
| 30 | void sve_context_save(simd_regs_t *regs); |
| 31 | void sve_context_restore(simd_regs_t *regs); |
| 32 | #endif |
| 33 | |
Antonio Nino Diaz | 40daecc | 2018-10-25 16:52:26 +0100 | [diff] [blame] | 34 | #endif /* SVE_H */ |