target/arm: Add array for supported PMU events, generate PMCEID[01]_EL0
commit57a4a11b2b281bb548b419ca81bfafb214e4c77a
authorAaron Lindsay <aaron@os.amperecomputing.com>
Mon, 21 Jan 2019 10:23:14 +0000 (21 10:23 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 21 Jan 2019 10:38:56 +0000 (21 10:38 +0000)
treeb5e07b8cc53a4b987034c9b646225b58f00b6904
parentcad8673744d0914587cd7380e70df11e8c4a0f50
target/arm: Add array for supported PMU events, generate PMCEID[01]_EL0

This commit doesn't add any supported events, but provides the framework
for adding them. We store the pm_event structs in a simple array, and
provide the mapping from the event numbers to array indexes in the
supported_event_map array. Because the value of PMCEID[01] depends upon
which events are supported at runtime, generate it dynamically.

Signed-off-by: Aaron Lindsay <alindsay@codeaurora.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20181211151945.29137-10-aaron@os.amperecomputing.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/cpu.c
target/arm/cpu.h
target/arm/cpu64.c
target/arm/helper.c