Dimitris Papastamos | 281a08c | 2017-10-13 12:06:06 +0100 | [diff] [blame] | 1 | /* |
Jayanth Dodderi Chidanand | 123002f | 2024-06-18 15:22:54 +0100 | [diff] [blame^] | 2 | * Copyright (c) 2017-2024, 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 |
Jayanth Dodderi Chidanand | 123002f | 2024-06-18 15:22:54 +0100 | [diff] [blame^] | 14 | void spe_enable(cpu_context_t *ctx); |
Boyan Karatotev | 60d330d | 2023-02-16 15:12:45 +0000 | [diff] [blame] | 15 | void spe_init_el2_unused(void); |
Dimitris Papastamos | 281a08c | 2017-10-13 12:06:06 +0100 | [diff] [blame] | 16 | void spe_disable(void); |
Andre Przywara | 6437a09 | 2022-11-17 16:42:09 +0000 | [diff] [blame] | 17 | #else |
Jayanth Dodderi Chidanand | 123002f | 2024-06-18 15:22:54 +0100 | [diff] [blame^] | 18 | static inline void spe_enable(cpu_context_t *ctx) |
Boyan Karatotev | 60d330d | 2023-02-16 15:12:45 +0000 | [diff] [blame] | 19 | { |
20 | } | ||||
21 | static inline void spe_init_el2_unused(void) | ||||
Andre Przywara | 6437a09 | 2022-11-17 16:42:09 +0000 | [diff] [blame] | 22 | { |
23 | } | ||||
Andre Przywara | d7f3ed3 | 2023-03-22 13:25:00 +0000 | [diff] [blame] | 24 | static inline void spe_disable(void) |
Andre Przywara | 6437a09 | 2022-11-17 16:42:09 +0000 | [diff] [blame] | 25 | { |
26 | } | ||||
Boyan Karatotev | 60d330d | 2023-02-16 15:12:45 +0000 | [diff] [blame] | 27 | #endif /* ENABLE_SPE_FOR_NS */ |
Dimitris Papastamos | 281a08c | 2017-10-13 12:06:06 +0100 | [diff] [blame] | 28 | |
Antonio Nino Diaz | 40daecc | 2018-10-25 16:52:26 +0100 | [diff] [blame] | 29 | #endif /* SPE_H */ |