Dimitris Papastamos | 525c37a | 2017-11-13 09:49:45 +0000 | [diff] [blame] | 1 | /* |
johpow01 | fa59c6f | 2020-10-02 13:41:11 -0500 | [diff] [blame] | 2 | * Copyright (c) 2017-2021, ARM Limited and Contributors. All rights reserved. |
Dimitris Papastamos | 525c37a | 2017-11-13 09:49:45 +0000 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
Antonio Nino Diaz | 033b4bb | 2018-10-25 16:52:26 +0100 | [diff] [blame] | 7 | #ifndef AMU_PRIVATE_H |
| 8 | #define AMU_PRIVATE_H |
Dimitris Papastamos | 525c37a | 2017-11-13 09:49:45 +0000 | [diff] [blame] | 9 | |
| 10 | #include <stdint.h> |
| 11 | |
Chris Kay | f13c6b5 | 2021-05-24 21:00:07 +0100 | [diff] [blame] | 12 | #include <lib/cassert.h> |
| 13 | #include <lib/extensions/amu.h> |
| 14 | #include <lib/utils_def.h> |
| 15 | |
| 16 | #include <platform_def.h> |
| 17 | |
Chris Kay | a40141d | 2021-05-25 12:33:18 +0100 | [diff] [blame] | 18 | #define AMU_GROUP0_MAX_COUNTERS U(16) |
Chris Kay | da81914 | 2021-05-25 15:24:18 +0100 | [diff] [blame] | 19 | #define AMU_GROUP1_MAX_COUNTERS U(16) |
Chris Kay | f13c6b5 | 2021-05-24 21:00:07 +0100 | [diff] [blame] | 20 | |
Chris Kay | 26a7961 | 2021-05-24 20:35:26 +0100 | [diff] [blame] | 21 | #define AMU_AMCGCR_CG0NC_MAX U(16) |
Chris Kay | f13c6b5 | 2021-05-24 21:00:07 +0100 | [diff] [blame] | 22 | |
Alexei Fedorov | 7e6306b | 2020-07-14 08:17:56 +0100 | [diff] [blame] | 23 | uint64_t amu_group0_cnt_read_internal(unsigned int idx); |
| 24 | void amu_group0_cnt_write_internal(unsigned int idx, uint64_t val); |
Dimitris Papastamos | 525c37a | 2017-11-13 09:49:45 +0000 | [diff] [blame] | 25 | |
Alexei Fedorov | 7e6306b | 2020-07-14 08:17:56 +0100 | [diff] [blame] | 26 | uint64_t amu_group1_cnt_read_internal(unsigned int idx); |
| 27 | void amu_group1_cnt_write_internal(unsigned int idx, uint64_t val); |
| 28 | void amu_group1_set_evtype_internal(unsigned int idx, unsigned int val); |
Dimitris Papastamos | 525c37a | 2017-11-13 09:49:45 +0000 | [diff] [blame] | 29 | |
johpow01 | fa59c6f | 2020-10-02 13:41:11 -0500 | [diff] [blame] | 30 | #if __aarch64__ |
| 31 | uint64_t amu_group0_voffset_read_internal(unsigned int idx); |
| 32 | void amu_group0_voffset_write_internal(unsigned int idx, uint64_t val); |
| 33 | |
| 34 | uint64_t amu_group1_voffset_read_internal(unsigned int idx); |
| 35 | void amu_group1_voffset_write_internal(unsigned int idx, uint64_t val); |
| 36 | #endif |
| 37 | |
Antonio Nino Diaz | 033b4bb | 2018-10-25 16:52:26 +0100 | [diff] [blame] | 38 | #endif /* AMU_PRIVATE_H */ |