aboutsummaryrefslogtreecommitdiff
path: root/target/arm/cpu.h
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2019-08-15 09:46:41 +0100
committerPeter Maydell <peter.maydell@linaro.org>2019-08-16 14:02:48 +0100
commit2bd5f41c00686a1f847a60824d0375f3df2c26bf (patch)
tree47f74aa46b4f64f9f60f38f878bfebf15299d045 /target/arm/cpu.h
parent27608c7c66bd923eb5e5faab80e795408cbe2b51 (diff)
downloadqemu-2bd5f41c00686a1f847a60824d0375f3df2c26bf.zip
qemu-2bd5f41c00686a1f847a60824d0375f3df2c26bf.tar.gz
qemu-2bd5f41c00686a1f847a60824d0375f3df2c26bf.tar.bz2
target/arm: generate a custom MIDR for -cpu max
While most features are now detected by probing the ID_* registers kernels can (and do) use MIDR_EL1 for working out of they have to apply errata. This can trip up warnings in the kernel as it tries to work out if it should apply workarounds to features that don't actually exist in the reported CPU type. Avoid this problem by synthesising our own MIDR value. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20190726113950.7499-1-alex.bennee@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm/cpu.h')
-rw-r--r--target/arm/cpu.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/target/arm/cpu.h b/target/arm/cpu.h
index 94c990c..67f2af0 100644
--- a/target/arm/cpu.h
+++ b/target/arm/cpu.h
@@ -1611,6 +1611,12 @@ FIELD(V7M_FPCCR, ASPEN, 31, 1)
/*
* System register ID fields.
*/
+FIELD(MIDR_EL1, REVISION, 0, 4)
+FIELD(MIDR_EL1, PARTNUM, 4, 12)
+FIELD(MIDR_EL1, ARCHITECTURE, 16, 4)
+FIELD(MIDR_EL1, VARIANT, 20, 4)
+FIELD(MIDR_EL1, IMPLEMENTER, 24, 8)
+
FIELD(ID_ISAR0, SWAP, 0, 4)
FIELD(ID_ISAR0, BITCOUNT, 4, 4)
FIELD(ID_ISAR0, BITFIELD, 8, 4)