xen/arm: Check for PMU platform support
authorMichal Orzel <michal.orzel@arm.com>
Tue, 12 Oct 2021 08:13:22 +0000 (10:13 +0200)
committerStefano Stabellini <stefano.stabellini@xilinx.com>
Tue, 12 Oct 2021 22:25:52 +0000 (15:25 -0700)
commitf9294486926c865a3ef11cacd7cb6b26cce6f4a4
tree8611cdd291d9ca9e95c06244ae01e3dcf5b57c17
parent3b38b1d96408cf4ee9eb78801e277f5a048e07b0
xen/arm: Check for PMU platform support

ID_AA64DFR0_EL1/ID_DFR0_EL1 registers provide
information about PMU support. Replace structure
dbg64/dbg32 with a union and fill in all the
register fields according to document:
ARM Architecture Registers(DDI 0595, 2021-06).

Add macros boot_dbg_feature64/boot_dbg_feature32
to check for a debug feature. Add macro
cpu_has_pmu to check for PMU support.
Any value higher than 0 and less than 15 means
that PMU is supported (we do not care about its
version for now).

Signed-off-by: Michal Orzel <michal.orzel@arm.com>
[stefano: add in-code comment]
Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
xen/include/asm-arm/cpufeature.h