cortex_a75.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * Copyright (c) 2017-2024, Arm Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef CORTEX_A75_H
  7. #define CORTEX_A75_H
  8. #include <lib/utils_def.h>
  9. /* Cortex-A75 MIDR */
  10. #define CORTEX_A75_MIDR U(0x410fd0a0)
  11. /*******************************************************************************
  12. * CPU Extended Control register specific definitions.
  13. ******************************************************************************/
  14. #define CORTEX_A75_CPUPWRCTLR_EL1 S3_0_C15_C2_7
  15. #define CORTEX_A75_CPUECTLR_EL1 S3_0_C15_C1_4
  16. /*******************************************************************************
  17. * CPU Auxiliary Control register specific definitions.
  18. ******************************************************************************/
  19. #define CORTEX_A75_CPUACTLR_EL1 S3_0_C15_C1_0
  20. #define CORTEX_A75_CPUACTLR_EL1_DISABLE_LOAD_PASS_STORE (ULL(1) << 35)
  21. /* Definitions of register field mask in CORTEX_A75_CPUPWRCTLR_EL1 */
  22. #define CORTEX_A75_CORE_PWRDN_EN_MASK U(0x1)
  23. #define CORTEX_A75_ACTLR_AMEN_BIT (ULL(1) << 4)
  24. /*
  25. * The Cortex-A75 core implements five counters, 0-4. Events 0, 1, 2, are
  26. * fixed and are enabled (Group 0). Events 3 and 4 (Group 1) are
  27. * programmable by programming the appropriate Event count bits in
  28. * CPUAMEVTYPER<n> register and are disabled by default. Platforms may
  29. * enable this with suitable programming.
  30. */
  31. #define CORTEX_A75_AMU_NR_COUNTERS U(5)
  32. #define CORTEX_A75_AMU_GROUP0_MASK U(0x7)
  33. #define CORTEX_A75_AMU_GROUP1_MASK (U(0) << 3)
  34. #ifndef __ASSEMBLER__
  35. #include <stdint.h>
  36. uint64_t cortex_a75_amu_cnt_read(int idx);
  37. void cortex_a75_amu_cnt_write(int idx, uint64_t val);
  38. unsigned int cortex_a75_amu_read_cpuamcntenset_el0(void);
  39. unsigned int cortex_a75_amu_read_cpuamcntenclr_el0(void);
  40. void cortex_a75_amu_write_cpuamcntenset_el0(unsigned int mask);
  41. void cortex_a75_amu_write_cpuamcntenclr_el0(unsigned int mask);
  42. #if ERRATA_A75_764081
  43. long check_erratum_cortex_a75_764081(long cpu_rev);
  44. #endif /* ERRATA_A75_764081 */
  45. #endif /* __ASSEMBLER__ */
  46. #endif /* CORTEX_A75_H */