blob: eb7ff0e898cc0b5527c60802f94e5ff34abba8ed [file] [log] [blame]
Dimitris Papastamos525c37a2017-11-13 09:49:45 +00001/*
johpow01fa59c6f2020-10-02 13:41:11 -05002 * Copyright (c) 2017-2021, ARM Limited and Contributors. All rights reserved.
Dimitris Papastamos525c37a2017-11-13 09:49:45 +00003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
Antonio Nino Diaz033b4bb2018-10-25 16:52:26 +01007#ifndef AMU_PRIVATE_H
8#define AMU_PRIVATE_H
Dimitris Papastamos525c37a2017-11-13 09:49:45 +00009
10#include <stdint.h>
11
Chris Kayf13c6b52021-05-24 21:00:07 +010012#include <lib/cassert.h>
13#include <lib/extensions/amu.h>
14#include <lib/utils_def.h>
15
16#include <platform_def.h>
17
Chris Kaya40141d2021-05-25 12:33:18 +010018#define AMU_GROUP0_MAX_COUNTERS U(16)
Chris Kayda819142021-05-25 15:24:18 +010019#define AMU_GROUP1_MAX_COUNTERS U(16)
Chris Kayf13c6b52021-05-24 21:00:07 +010020
Chris Kay26a79612021-05-24 20:35:26 +010021#define AMU_AMCGCR_CG0NC_MAX U(16)
Chris Kayf13c6b52021-05-24 21:00:07 +010022
Alexei Fedorov7e6306b2020-07-14 08:17:56 +010023uint64_t amu_group0_cnt_read_internal(unsigned int idx);
24void amu_group0_cnt_write_internal(unsigned int idx, uint64_t val);
Dimitris Papastamos525c37a2017-11-13 09:49:45 +000025
Alexei Fedorov7e6306b2020-07-14 08:17:56 +010026uint64_t amu_group1_cnt_read_internal(unsigned int idx);
27void amu_group1_cnt_write_internal(unsigned int idx, uint64_t val);
28void amu_group1_set_evtype_internal(unsigned int idx, unsigned int val);
Dimitris Papastamos525c37a2017-11-13 09:49:45 +000029
johpow01fa59c6f2020-10-02 13:41:11 -050030#if __aarch64__
31uint64_t amu_group0_voffset_read_internal(unsigned int idx);
32void amu_group0_voffset_write_internal(unsigned int idx, uint64_t val);
33
34uint64_t amu_group1_voffset_read_internal(unsigned int idx);
35void amu_group1_voffset_write_internal(unsigned int idx, uint64_t val);
36#endif
37
Antonio Nino Diaz033b4bb2018-10-25 16:52:26 +010038#endif /* AMU_PRIVATE_H */