Daniel Henrique Barboza | 8f2e9d4 | 2021-12-17 17:57:18 +0100 | [diff] [blame] | 1 | /* |
| 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 Armbruster | 9c09280 | 2022-05-06 15:49:09 +0200 | [diff] [blame] | 13 | #ifndef POWER8_PMU_H |
| 14 | #define POWER8_PMU_H |
Daniel Henrique Barboza | 8f2e9d4 | 2021-12-17 17:57:18 +0100 | [diff] [blame] | 15 | |
Richard Henderson | 6e8b990 | 2022-01-04 07:55:34 +0100 | [diff] [blame] | 16 | #if defined(TARGET_PPC64) && !defined(CONFIG_USER_ONLY) |
Leandro Lupori | eeaaefe | 2022-10-25 17:24:24 -0300 | [diff] [blame] | 17 | |
| 18 | #define PMC_COUNTER_NEGATIVE_VAL 0x80000000UL |
| 19 | |
Daniel Henrique Barboza | 33edcde | 2022-03-02 06:51:36 +0100 | [diff] [blame] | 20 | void cpu_ppc_pmu_init(CPUPPCState *env); |
Nicholas Piggin | 6494d2c | 2023-05-30 23:04:47 +1000 | [diff] [blame] | 21 | void pmu_mmcr01_updated(CPUPPCState *env); |
Richard Henderson | 6e8b990 | 2022-01-04 07:55:34 +0100 | [diff] [blame] | 22 | #else |
Daniel Henrique Barboza | 33edcde | 2022-03-02 06:51:36 +0100 | [diff] [blame] | 23 | static inline void cpu_ppc_pmu_init(CPUPPCState *env) { } |
Nicholas Piggin | 6494d2c | 2023-05-30 23:04:47 +1000 | [diff] [blame] | 24 | static inline void pmu_mmcr01_updated(CPUPPCState *env) { } |
Richard Henderson | 6e8b990 | 2022-01-04 07:55:34 +0100 | [diff] [blame] | 25 | #endif |
Daniel Henrique Barboza | 8f2e9d4 | 2021-12-17 17:57:18 +0100 | [diff] [blame] | 26 | |
| 27 | #endif |