blob: 4801a2206c0da45ef40618f9ce3d1f32c8d23e84 [file] [log] [blame]
Dimitris Papastamos5bdbb472017-10-13 12:06:06 +01001/*
Jayanth Dodderi Chidanand118b3352024-06-18 15:22:54 +01002 * Copyright (c) 2017-2024, Arm Limited and Contributors. All rights reserved.
Dimitris Papastamos5bdbb472017-10-13 12:06:06 +01003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
Antonio Nino Diaz033b4bb2018-10-25 16:52:26 +01007#ifndef SPE_H
8#define SPE_H
Dimitris Papastamos5bdbb472017-10-13 12:06:06 +01009
Antonio Nino Diaz033b4bb2018-10-25 16:52:26 +010010#include <stdbool.h>
Jayanth Dodderi Chidanand118b3352024-06-18 15:22:54 +010011#include <context.h>
Antonio Nino Diaz033b4bb2018-10-25 16:52:26 +010012
Andre Przywaraf3e8cfc2022-11-17 16:42:09 +000013#if ENABLE_SPE_FOR_NS
Jayanth Dodderi Chidanand118b3352024-06-18 15:22:54 +010014void spe_enable(cpu_context_t *ctx);
Manish Pandeye01b4222024-07-18 16:17:45 +010015void spe_disable(cpu_context_t *ctx);
Boyan Karatotev6468d4a2023-02-16 15:12:45 +000016void spe_init_el2_unused(void);
Manish Pandey46dff392024-07-18 16:07:21 +010017void spe_stop(void);
Andre Przywaraf3e8cfc2022-11-17 16:42:09 +000018#else
Jayanth Dodderi Chidanand118b3352024-06-18 15:22:54 +010019static inline void spe_enable(cpu_context_t *ctx)
Andre Przywaraf3e8cfc2022-11-17 16:42:09 +000020{
21}
Manish Pandeye01b4222024-07-18 16:17:45 +010022static inline void spe_disable(cpu_context_t *ctx)
23{
24}
Boyan Karatotev6468d4a2023-02-16 15:12:45 +000025static inline void spe_init_el2_unused(void)
26{
27}
Manish Pandey46dff392024-07-18 16:07:21 +010028static inline void spe_stop(void)
Andre Przywaraf3e8cfc2022-11-17 16:42:09 +000029{
30}
Boyan Karatotev6468d4a2023-02-16 15:12:45 +000031#endif /* ENABLE_SPE_FOR_NS */
Dimitris Papastamos5bdbb472017-10-13 12:06:06 +010032
Antonio Nino Diaz033b4bb2018-10-25 16:52:26 +010033#endif /* SPE_H */