1 /* 2 * Copyright (c) 2023, Arm Limited. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef ERRATA_ABI_SVC_H 8 #define ERRATA_ABI_SVC_H 9 10 #include <lib/smccc.h> 11 12 #define ARM_EM_VERSION U(0x840000F0) 13 #define ARM_EM_FEATURES U(0x840000F1) 14 #define ARM_EM_CPU_ERRATUM_FEATURES U(0x840000F2) 15 16 /* EM version numbers */ 17 #define EM_VERSION_MAJOR (0x1) 18 #define EM_VERSION_MINOR (0x0) 19 20 /* EM CPU_ERRATUM_FEATURES return codes */ 21 #define EM_HIGHER_EL_MITIGATION (3) 22 #define EM_NOT_AFFECTED (2) 23 #define EM_AFFECTED (1) 24 #define EM_SUCCESS (0) 25 #define EM_NOT_SUPPORTED (-1) 26 #define EM_INVALID_PARAMETERS (-2) 27 #define EM_UNKNOWN_ERRATUM (-3) 28 29 #if ERRATA_ABI_SUPPORT 30 bool is_errata_fid(uint32_t smc_fid); 31 #else is_errata_fid(uint32_t smc_fid)32static inline bool is_errata_fid(uint32_t smc_fid) 33 { 34 return false; 35 } 36 #endif /* ERRATA_ABI_SUPPORT */ 37 uintptr_t errata_abi_smc_handler( 38 uint32_t smc_fid, 39 u_register_t x1, 40 u_register_t x2, 41 u_register_t x3, 42 u_register_t x4, 43 void *cookie, 44 void *handle, 45 u_register_t flags 46 ); 47 #endif /* ERRATA_ABI_SVC_H */ 48 49