summaryrefslogtreecommitdiff
path: root/include/services/errata_abi_svc.h
blob: 12500661b5096a8e9d162c9108884db049ee0b3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
 * Copyright (c) 2023, Arm Limited. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#ifndef ERRATA_ABI_SVC_H
#define ERRATA_ABI_SVC_H

#include <lib/smccc.h>

#define ARM_EM_VERSION			U(0x840000F0)
#define ARM_EM_FEATURES			U(0x840000F1)
#define ARM_EM_CPU_ERRATUM_FEATURES	U(0x840000F2)

/* EM version numbers */
#define EM_VERSION_MAJOR		(0x1)
#define EM_VERSION_MINOR		(0x0)

/* EM CPU_ERRATUM_FEATURES return codes */
#define EM_HIGHER_EL_MITIGATION		(3)
#define EM_NOT_AFFECTED			(2)
#define EM_AFFECTED			(1)
#define EM_SUCCESS			(0)
#define EM_NOT_SUPPORTED		(-1)
#define EM_INVALID_PARAMETERS		(-2)
#define EM_UNKNOWN_ERRATUM		(-3)

#if ERRATA_ABI_SUPPORT
bool is_errata_fid(uint32_t smc_fid);
#else
static inline bool is_errata_fid(uint32_t smc_fid)
{
	return false;
}
#endif /* ERRATA_ABI_SUPPORT */
uintptr_t errata_abi_smc_handler(
	uint32_t smc_fid,
	u_register_t x1,
	u_register_t x2,
	u_register_t x3,
	u_register_t x4,
	void *cookie,
	void *handle,
	u_register_t flags
);
#endif /* ERRATA_ABI_SVC_H */