blob: b58e18c023ad1381eb55abb19d406b6e9ac91cab [file] [log] [blame]
Dimitris Papastamos281a08c2017-10-13 12:06:06 +01001/*
Boyan Karatotev985b6a62025-07-17 09:38:19 +01002 * Copyright (c) 2017-2025, Arm Limited and Contributors. All rights reserved.
Dimitris Papastamos281a08c2017-10-13 12:06:06 +01003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
Antonio Nino Diaz40daecc2018-10-25 16:52:26 +01007#ifndef SPE_H
8#define SPE_H
Dimitris Papastamos281a08c2017-10-13 12:06:06 +01009
Antonio Nino Diaz40daecc2018-10-25 16:52:26 +010010#include <stdbool.h>
Jayanth Dodderi Chidanand123002f2024-06-18 15:22:54 +010011#include <context.h>
Antonio Nino Diaz40daecc2018-10-25 16:52:26 +010012
Andre Przywara6437a092022-11-17 16:42:09 +000013#if ENABLE_SPE_FOR_NS
Boyan Karatotev985b6a62025-07-17 09:38:19 +010014void spe_enable_ns(cpu_context_t *ctx);
15void spe_disable_secure(cpu_context_t *ctx);
16void spe_disable_realm(cpu_context_t *ctx);
Boyan Karatotev60d330d2023-02-16 15:12:45 +000017void spe_init_el2_unused(void);
Andre Przywara6437a092022-11-17 16:42:09 +000018#else
Boyan Karatotev985b6a62025-07-17 09:38:19 +010019static inline void spe_enable_ns(cpu_context_t *ctx)
Boyan Karatotev60d330d2023-02-16 15:12:45 +000020{
21}
Boyan Karatotev985b6a62025-07-17 09:38:19 +010022static inline void spe_disable_secure(cpu_context_t *ctx)
23{
24}
25static inline void spe_disable_realm(cpu_context_t *ctx)
Manish Pandey651fe502024-07-18 16:17:45 +010026{
27}
Boyan Karatotev60d330d2023-02-16 15:12:45 +000028static inline void spe_init_el2_unused(void)
Andre Przywara6437a092022-11-17 16:42:09 +000029{
30}
Boyan Karatotev60d330d2023-02-16 15:12:45 +000031#endif /* ENABLE_SPE_FOR_NS */
Dimitris Papastamos281a08c2017-10-13 12:06:06 +010032
Antonio Nino Diaz40daecc2018-10-25 16:52:26 +010033#endif /* SPE_H */