amu_private.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright (c) 2017-2021, Arm Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef AMU_PRIVATE_H
  7. #define AMU_PRIVATE_H
  8. #include <stdint.h>
  9. #include <lib/cassert.h>
  10. #include <lib/extensions/amu.h>
  11. #include <lib/utils_def.h>
  12. #include <platform_def.h>
  13. #define AMU_GROUP0_MAX_COUNTERS U(16)
  14. #define AMU_GROUP1_MAX_COUNTERS U(16)
  15. #define AMU_AMCGCR_CG0NC_MAX U(16)
  16. uint64_t amu_group0_cnt_read_internal(unsigned int idx);
  17. void amu_group0_cnt_write_internal(unsigned int idx, uint64_t val);
  18. uint64_t amu_group1_cnt_read_internal(unsigned int idx);
  19. void amu_group1_cnt_write_internal(unsigned int idx, uint64_t val);
  20. void amu_group1_set_evtype_internal(unsigned int idx, unsigned int val);
  21. #if __aarch64__
  22. uint64_t amu_group0_voffset_read_internal(unsigned int idx);
  23. void amu_group0_voffset_write_internal(unsigned int idx, uint64_t val);
  24. uint64_t amu_group1_voffset_read_internal(unsigned int idx);
  25. void amu_group1_voffset_write_internal(unsigned int idx, uint64_t val);
  26. #endif
  27. #endif /* AMU_PRIVATE_H */