@@ -92,6 +92,10 @@ config ARM_EFI
UEFI firmware. A UEFI stub is provided to allow Xen to
be booted as an EFI application.
+config ARM_SECURE_STATE
+ bool "Xen will run in Arm Secure State"
+ default n
+
config GICV3
bool "GICv3 driver"
depends on !NEW_VGIC
@@ -514,6 +514,21 @@
#endif
+#ifdef CONFIG_ARM_SECURE_STATE
+/*
+ * The Armv8-R AArch64 architecture always executes code in Secure
+ * state with EL2 as the highest Exception.
+ *
+ * Hypervisor timer registers for Secure EL2.
+ */
+#define CNTHPS_TVAL_EL2 S3_4_C14_C5_0
+#define CNTHPS_CTL_EL2 S3_4_C14_C5_1
+#define CNTHPS_CVAL_EL2 S3_4_C14_C5_2
+#define CNTHP_TVAL_EL2 CNTHPS_TVAL_EL2
+#define CNTHP_CTL_EL2 CNTHPS_CTL_EL2
+#define CNTHP_CVAL_EL2 CNTHPS_CVAL_EL2
+#endif
+
/* Access to system registers */
#define WRITE_SYSREG64(v, name) do { \