cpu_errata_info.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * Copyright (c) 2023-2024, Arm Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef ERRATA_CPUSPEC_H
  7. #define ERRATA_CPUSPEC_H
  8. #include <stdint.h>
  9. #include <arch.h>
  10. #include <arch_helpers.h>
  11. #if __aarch64__
  12. #include <cortex_a710.h>
  13. #include <cortex_a78.h>
  14. #include <cortex_a78_ae.h>
  15. #include <cortex_a78c.h>
  16. #include <cortex_x2.h>
  17. #include <cortex_x3.h>
  18. #include <cortex_x4.h>
  19. #include <neoverse_n2.h>
  20. #include <neoverse_v1.h>
  21. #include <neoverse_v2.h>
  22. #endif
  23. /* Max number of platform based errata with no workaround in EL3 */
  24. #define MAX_PLAT_CPU_ERRATA_ENTRIES 2
  25. #define ERRATA_LIST_END (MAX_PLAT_CPU_ERRATA_ENTRIES - 1)
  26. /* Default values for unused memory in the array */
  27. #define UNDEF_ERRATA {UINT_MAX, UCHAR_MAX, UCHAR_MAX}
  28. #define RXPX_RANGE(x, y, z) (((x >= y) && (x <= z)) ? true : false)
  29. /*
  30. * CPU specific values for errata handling
  31. */
  32. struct em_cpu{
  33. unsigned int em_errata_id;
  34. unsigned char em_rxpx_lo; /* lowest revision of errata applicable for the cpu */
  35. unsigned char em_rxpx_hi; /* highest revision of errata applicable for the cpu */
  36. };
  37. struct em_cpu_list{
  38. unsigned long cpu_midr; /* cpu specific part number is bit[15:4] of midr value */
  39. struct em_cpu cpu_errata_list[MAX_PLAT_CPU_ERRATA_ENTRIES];
  40. };
  41. int32_t verify_errata_implemented(uint32_t errata_id, uint32_t forward_flag);
  42. #endif /* ERRATA_CPUSPEC_H */