errata_abi_svc.h 1.0 KB

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