Dimitris Papastamos | 281a08c | 2017-10-13 12:06:06 +0100 | [diff] [blame] | 1 | /* |
Boyan Karatotev | 985b6a6 | 2025-07-17 09:38:19 +0100 | [diff] [blame^] | 2 | * Copyright (c) 2017-2025, Arm Limited and Contributors. All rights reserved. |
Dimitris Papastamos | 281a08c | 2017-10-13 12:06:06 +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 SPE_H |
| 8 | #define SPE_H |
Dimitris Papastamos | 281a08c | 2017-10-13 12:06:06 +0100 | [diff] [blame] | 9 | |
Antonio Nino Diaz | 40daecc | 2018-10-25 16:52:26 +0100 | [diff] [blame] | 10 | #include <stdbool.h> |
Jayanth Dodderi Chidanand | 123002f | 2024-06-18 15:22:54 +0100 | [diff] [blame] | 11 | #include <context.h> |
Antonio Nino Diaz | 40daecc | 2018-10-25 16:52:26 +0100 | [diff] [blame] | 12 | |
Andre Przywara | 6437a09 | 2022-11-17 16:42:09 +0000 | [diff] [blame] | 13 | #if ENABLE_SPE_FOR_NS |
Boyan Karatotev | 985b6a6 | 2025-07-17 09:38:19 +0100 | [diff] [blame^] | 14 | void spe_enable_ns(cpu_context_t *ctx); |
| 15 | void spe_disable_secure(cpu_context_t *ctx); |
| 16 | void spe_disable_realm(cpu_context_t *ctx); |
Boyan Karatotev | 60d330d | 2023-02-16 15:12:45 +0000 | [diff] [blame] | 17 | void spe_init_el2_unused(void); |
Andre Przywara | 6437a09 | 2022-11-17 16:42:09 +0000 | [diff] [blame] | 18 | #else |
Boyan Karatotev | 985b6a6 | 2025-07-17 09:38:19 +0100 | [diff] [blame^] | 19 | static inline void spe_enable_ns(cpu_context_t *ctx) |
Boyan Karatotev | 60d330d | 2023-02-16 15:12:45 +0000 | [diff] [blame] | 20 | { |
| 21 | } |
Boyan Karatotev | 985b6a6 | 2025-07-17 09:38:19 +0100 | [diff] [blame^] | 22 | static inline void spe_disable_secure(cpu_context_t *ctx) |
| 23 | { |
| 24 | } |
| 25 | static inline void spe_disable_realm(cpu_context_t *ctx) |
Manish Pandey | 651fe50 | 2024-07-18 16:17:45 +0100 | [diff] [blame] | 26 | { |
| 27 | } |
Boyan Karatotev | 60d330d | 2023-02-16 15:12:45 +0000 | [diff] [blame] | 28 | static inline void spe_init_el2_unused(void) |
Andre Przywara | 6437a09 | 2022-11-17 16:42:09 +0000 | [diff] [blame] | 29 | { |
| 30 | } |
Boyan Karatotev | 60d330d | 2023-02-16 15:12:45 +0000 | [diff] [blame] | 31 | #endif /* ENABLE_SPE_FOR_NS */ |
Dimitris Papastamos | 281a08c | 2017-10-13 12:06:06 +0100 | [diff] [blame] | 32 | |
Antonio Nino Diaz | 40daecc | 2018-10-25 16:52:26 +0100 | [diff] [blame] | 33 | #endif /* SPE_H */ |