PpttParser.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /** @file
  2. Header file for PPTT parser
  3. Copyright (c) 2019, ARM Limited. All rights reserved.
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. @par Reference(s):
  6. - ARM Architecture Reference Manual ARMv8 (D.a)
  7. **/
  8. #ifndef PPTT_PARSER_H_
  9. #define PPTT_PARSER_H_
  10. #if defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64)
  11. /// Cache parameters allowed by the architecture with
  12. /// ARMv8.3-CCIDX (Cache extended number of sets)
  13. /// Derived from CCSIDR_EL1 when ID_AA64MMFR2_EL1.CCIDX==0001
  14. #define PPTT_ARM_CCIDX_CACHE_NUMBER_OF_SETS_MAX (1 << 24)
  15. #define PPTT_ARM_CCIDX_CACHE_ASSOCIATIVITY_MAX (1 << 21)
  16. /// Cache parameters allowed by the architecture without
  17. /// ARMv8.3-CCIDX (Cache extended number of sets)
  18. /// Derived from CCSIDR_EL1 when ID_AA64MMFR2_EL1.CCIDX==0000
  19. #define PPTT_ARM_CACHE_NUMBER_OF_SETS_MAX (1 << 15)
  20. #define PPTT_ARM_CACHE_ASSOCIATIVITY_MAX (1 << 10)
  21. /// Common cache parameters
  22. /// Derived from CCSIDR_EL1
  23. /// The LineSize is represented by bits 2:0
  24. /// (Log2(Number of bytes in cache line)) - 4 is used to represent
  25. /// the LineSize bits.
  26. #define PPTT_ARM_CACHE_LINE_SIZE_MAX (1 << 11)
  27. #define PPTT_ARM_CACHE_LINE_SIZE_MIN (1 << 4)
  28. #endif // if defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64)
  29. #endif // PPTT_PARSER_H_