[kvm-unit-tests PATCH v2 2/2] arm64: Define name for these bits used in SCTLR_EL1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Currently some fields in SCTLR_EL1 don't define a name and directly used
in the SCTLR_EL1_RES1, that's not good now since these fields have been
functional and have a name.

Delete the SCTLR_EL1_RES1 since these bits are not RES1 if the related
feature has been implemented, it's wired to define these bits as RES1.
So simply delete the SCTLR_EL1_RES1 and unwind its definition to
INIT_SCTLR_MMU_OFF.

According to the ARM DDI 0487J.a, define the name related to these
fields.

Suggested-by: Alexandru Elisei <alexandru.elisei@xxxxxxx>
Signed-off-by: Shaoqin Huang <shahuang@xxxxxxxxxx>
---
 lib/arm64/asm/sysreg.h | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/lib/arm64/asm/sysreg.h b/lib/arm64/asm/sysreg.h
index 09ef5f5..6cae8b8 100644
--- a/lib/arm64/asm/sysreg.h
+++ b/lib/arm64/asm/sysreg.h
@@ -80,18 +80,26 @@ asm(
 #define ICC_GRPEN1_EL1			sys_reg(3, 0, 12, 12, 7)
 
 /* System Control Register (SCTLR_EL1) bits */
+#define SCTLR_EL1_LSMAOE	_BITULL(29)
+#define SCTLR_EL1_NTLSMD	_BITULL(28)
 #define SCTLR_EL1_EE		_BITULL(25)
+#define SCTLR_EL1_SPAN		_BITULL(23)
+#define SCTLR_EL1_EIS		_BITULL(22)
+#define SCTLR_EL1_TSCXT		_BITULL(20)
 #define SCTLR_EL1_WXN		_BITULL(19)
 #define SCTLR_EL1_I		_BITULL(12)
+#define SCTLR_EL1_EOS		_BITULL(11)
+#define SCTLR_EL1_SED		_BITULL(8)
+#define SCTLR_EL1_ITD		_BITULL(7)
 #define SCTLR_EL1_SA0		_BITULL(4)
 #define SCTLR_EL1_SA		_BITULL(3)
 #define SCTLR_EL1_C		_BITULL(2)
 #define SCTLR_EL1_A		_BITULL(1)
 #define SCTLR_EL1_M		_BITULL(0)
 
-#define SCTLR_EL1_RES1	(_BITULL(7) | _BITULL(8) | _BITULL(11) | _BITULL(20) | \
-			 _BITULL(22) | _BITULL(23) | _BITULL(28) | _BITULL(29))
 #define INIT_SCTLR_EL1_MMU_OFF	\
-			SCTLR_EL1_RES1
+			(SCTLR_EL1_ITD | SCTLR_EL1_SED | SCTLR_EL1_EOS | \
+			 SCTLR_EL1_TSCXT | SCTLR_EL1_EIS | SCTLR_EL1_SPAN | \
+			 SCTLR_EL1_NTLSMD | SCTLR_EL1_LSMAOE)
 
 #endif /* _ASMARM64_SYSREG_H_ */
-- 
2.39.1




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux