Dimitris Papastamos | 5bdbb47 | 2017-10-13 12:06:06 +0100 | [diff] [blame] | 1 | /* |
Jayanth Dodderi Chidanand | 118b335 | 2024-06-18 15:22:54 +0100 | [diff] [blame] | 2 | * Copyright (c) 2017-2024, Arm Limited and Contributors. All rights reserved. |
Dimitris Papastamos | 5bdbb47 | 2017-10-13 12:06:06 +0100 | [diff] [blame] | 3 | * |
4 | * SPDX-License-Identifier: BSD-3-Clause | ||||
5 | */ | ||||
6 | |||||
Antonio Nino Diaz | 033b4bb | 2018-10-25 16:52:26 +0100 | [diff] [blame] | 7 | #ifndef SPE_H |
8 | #define SPE_H | ||||
Dimitris Papastamos | 5bdbb47 | 2017-10-13 12:06:06 +0100 | [diff] [blame] | 9 | |
Antonio Nino Diaz | 033b4bb | 2018-10-25 16:52:26 +0100 | [diff] [blame] | 10 | #include <stdbool.h> |
Jayanth Dodderi Chidanand | 118b335 | 2024-06-18 15:22:54 +0100 | [diff] [blame] | 11 | #include <context.h> |
Antonio Nino Diaz | 033b4bb | 2018-10-25 16:52:26 +0100 | [diff] [blame] | 12 | |
Andre Przywara | f3e8cfc | 2022-11-17 16:42:09 +0000 | [diff] [blame] | 13 | #if ENABLE_SPE_FOR_NS |
Jayanth Dodderi Chidanand | 118b335 | 2024-06-18 15:22:54 +0100 | [diff] [blame] | 14 | void spe_enable(cpu_context_t *ctx); |
Manish Pandey | e01b422 | 2024-07-18 16:17:45 +0100 | [diff] [blame] | 15 | void spe_disable(cpu_context_t *ctx); |
Boyan Karatotev | 6468d4a | 2023-02-16 15:12:45 +0000 | [diff] [blame] | 16 | void spe_init_el2_unused(void); |
Manish Pandey | 46dff39 | 2024-07-18 16:07:21 +0100 | [diff] [blame] | 17 | void spe_stop(void); |
Andre Przywara | f3e8cfc | 2022-11-17 16:42:09 +0000 | [diff] [blame] | 18 | #else |
Jayanth Dodderi Chidanand | 118b335 | 2024-06-18 15:22:54 +0100 | [diff] [blame] | 19 | static inline void spe_enable(cpu_context_t *ctx) |
Andre Przywara | f3e8cfc | 2022-11-17 16:42:09 +0000 | [diff] [blame] | 20 | { |
21 | } | ||||
Manish Pandey | e01b422 | 2024-07-18 16:17:45 +0100 | [diff] [blame] | 22 | static inline void spe_disable(cpu_context_t *ctx) |
23 | { | ||||
24 | } | ||||
Boyan Karatotev | 6468d4a | 2023-02-16 15:12:45 +0000 | [diff] [blame] | 25 | static inline void spe_init_el2_unused(void) |
26 | { | ||||
27 | } | ||||
Manish Pandey | 46dff39 | 2024-07-18 16:07:21 +0100 | [diff] [blame] | 28 | static inline void spe_stop(void) |
Andre Przywara | f3e8cfc | 2022-11-17 16:42:09 +0000 | [diff] [blame] | 29 | { |
30 | } | ||||
Boyan Karatotev | 6468d4a | 2023-02-16 15:12:45 +0000 | [diff] [blame] | 31 | #endif /* ENABLE_SPE_FOR_NS */ |
Dimitris Papastamos | 5bdbb47 | 2017-10-13 12:06:06 +0100 | [diff] [blame] | 32 | |
Antonio Nino Diaz | 033b4bb | 2018-10-25 16:52:26 +0100 | [diff] [blame] | 33 | #endif /* SPE_H */ |