blob: fc76a160228084be7ac13103344fa53b13d7703b [file] [log] [blame]
David Cunadoce88eee2017-10-20 11:30:57 +01001/*
Jayanth Dodderi Chidanandd62c6812023-03-07 10:43:19 +00002 * Copyright (c) 2017-2023, Arm Limited and Contributors. All rights reserved.
David Cunadoce88eee2017-10-20 11:30:57 +01003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
Antonio Nino Diaz033b4bb2018-10-25 16:52:26 +01007#ifndef SVE_H
8#define SVE_H
David Cunadoce88eee2017-10-20 11:30:57 +01009
Max Shvetsovc4502772021-03-22 11:59:37 +000010#include <context.h>
Antonio Nino Diaz033b4bb2018-10-25 16:52:26 +010011
Jayanth Dodderi Chidanandd62c6812023-03-07 10:43:19 +000012#if (ENABLE_SME_FOR_NS || ENABLE_SVE_FOR_NS)
Max Shvetsovc4502772021-03-22 11:59:37 +000013void sve_enable(cpu_context_t *context);
Boyan Karatotev6468d4a2023-02-16 15:12:45 +000014void sve_init_el2_unused(void);
johpow019baade32021-07-08 14:14:00 -050015void sve_disable(cpu_context_t *context);
Jayanth Dodderi Chidanandd62c6812023-03-07 10:43:19 +000016#else
17static inline void sve_enable(cpu_context_t *context)
18{
19}
Boyan Karatotev6468d4a2023-02-16 15:12:45 +000020static inline void sve_init_el2_unused(void)
21{
22}
Jayanth Dodderi Chidanandd62c6812023-03-07 10:43:19 +000023static inline void sve_disable(cpu_context_t *context)
24{
25}
26#endif /* ( ENABLE_SME_FOR_NS | ENABLE_SVE_FOR_NS ) */
David Cunadoce88eee2017-10-20 11:30:57 +010027
Antonio Nino Diaz033b4bb2018-10-25 16:52:26 +010028#endif /* SVE_H */