aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-05-25 12:56:37 +0100
committerPeter Maydell <peter.maydell@linaro.org>2018-05-25 14:28:49 +0100
commit626451be7cfb9789f6710d758d0d0426654d0265 (patch)
treea2997c3c26935257223152727eb3dab59bf716b8
parent45eb58e547848d3f291be05ea7a550203e6d12ce (diff)
downloadqemu-arm-626451be7cfb9789f6710d758d0d0426654d0265.tar.gz
target/arm/kvm-consts.h: Define CP_REG_ARM_SECURE_MASK/SHIFT
Define CP_REG_ARM_SECURE_MASK and CP_REG_ARM_SECURE_SHIFT, which track the Linux kernel header KVM_REG_ARM_COPROC_MASK/SHIFT constants. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--target/arm/kvm-consts.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/target/arm/kvm-consts.h b/target/arm/kvm-consts.h
index aad28258a3..10ac87cfc4 100644
--- a/target/arm/kvm-consts.h
+++ b/target/arm/kvm-consts.h
@@ -150,6 +150,8 @@ MISMATCH_CHECK(QEMU_KVM_ARM_TARGET_CORTEX_A7, KVM_ARM_TARGET_CORTEX_A7);
#define CP_REG_ARM64 0x6000000000000000ULL
#define CP_REG_ARM_COPROC_MASK 0x000000000FFF0000
#define CP_REG_ARM_COPROC_SHIFT 16
+#define CP_REG_ARM_SECURE_MASK 0x0000000010000000
+#define CP_REG_ARM_SECURE_SHIFT 28
#define CP_REG_ARM64_SYSREG (0x0013 << CP_REG_ARM_COPROC_SHIFT)
#define CP_REG_ARM64_SYSREG_OP0_MASK 0x000000000000c000
#define CP_REG_ARM64_SYSREG_OP0_SHIFT 14
@@ -165,6 +167,11 @@ MISMATCH_CHECK(QEMU_KVM_ARM_TARGET_CORTEX_A7, KVM_ARM_TARGET_CORTEX_A7);
/* No kernel define but it's useful to QEMU */
#define CP_REG_ARM64_SYSREG_CP (CP_REG_ARM64_SYSREG >> CP_REG_ARM_COPROC_SHIFT)
+#if defined(TARGET_ARM) && !defined(TARGET_AARCH64)
+MISMATCH_CHECK(CP_REG_ARM_SECURE_MASK, KVM_REG_ARM_SECURE_MASK);
+MISMATCH_CHECK(CP_REG_ARM_SECURE_SHIFT, KVM_REG_ARM_SECURE_SHIFT);
+#endif
+
#ifdef TARGET_AARCH64
MISMATCH_CHECK(CP_REG_ARM64, KVM_REG_ARM64);
MISMATCH_CHECK(CP_REG_ARM_COPROC_MASK, KVM_REG_ARM_COPROC_MASK);