blob: 775e640053670d5b5d18aef2f6256c1cd0c354a1 [file] [log] [blame]
Daniel Henrique Barboza8f2e9d42021-12-17 17:57:18 +01001/*
2 * PMU emulation helpers for TCG IBM POWER chips
3 *
4 * Copyright IBM Corp. 2021
5 *
6 * Authors:
7 * Daniel Henrique Barboza <danielhb413@gmail.com>
8 *
9 * This work is licensed under the terms of the GNU GPL, version 2 or later.
10 * See the COPYING file in the top-level directory.
11 */
12
Markus Armbruster9c092802022-05-06 15:49:09 +020013#ifndef POWER8_PMU_H
14#define POWER8_PMU_H
Daniel Henrique Barboza8f2e9d42021-12-17 17:57:18 +010015
Richard Henderson6e8b9902022-01-04 07:55:34 +010016#if defined(TARGET_PPC64) && !defined(CONFIG_USER_ONLY)
Leandro Luporieeaaefe2022-10-25 17:24:24 -030017
18#define PMC_COUNTER_NEGATIVE_VAL 0x80000000UL
19
Daniel Henrique Barboza33edcde2022-03-02 06:51:36 +010020void cpu_ppc_pmu_init(CPUPPCState *env);
Nicholas Piggin6494d2c2023-05-30 23:04:47 +100021void pmu_mmcr01_updated(CPUPPCState *env);
Richard Henderson6e8b9902022-01-04 07:55:34 +010022#else
Daniel Henrique Barboza33edcde2022-03-02 06:51:36 +010023static inline void cpu_ppc_pmu_init(CPUPPCState *env) { }
Nicholas Piggin6494d2c2023-05-30 23:04:47 +100024static inline void pmu_mmcr01_updated(CPUPPCState *env) { }
Richard Henderson6e8b9902022-01-04 07:55:34 +010025#endif
Daniel Henrique Barboza8f2e9d42021-12-17 17:57:18 +010026
27#endif