blob: 893f9f2cbd4038eb0f24450bce1f7fee54c76121 [file] [log] [blame]
johpow019baade32021-07-08 14:14:00 -05001/*
2 * Copyright (c) 2021, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef SME_H
8#define SME_H
9
10#include <stdbool.h>
11
12#include <context.h>
13
14/*
15 * Maximum value of LEN field in SMCR_ELx. This is different than the maximum
16 * supported value which is platform dependent. In the first version of SME the
17 * LEN field is limited to 4 bits but will be expanded in future iterations.
18 * To support different versions, the code that discovers the supported vector
19 * lengths will write the max value into SMCR_ELx then read it back to see how
20 * many bits are implemented.
21 */
22#define SME_SMCR_LEN_MAX U(0x1FF)
23
24void sme_enable(cpu_context_t *context);
25void sme_disable(cpu_context_t *context);
26
27#endif /* SME_H */