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