mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-06 02:24:14 +08:00
arm64/sysreg: Define bits for previously RES1 fields in SCTLR_EL1
In older revisions of the architecture SCTLR_EL1 contained several RES1 fields but in DDI0487H.a these now all have assigned functions. In preparation for automatically generating sysreg.h provide explicit definitions for all these bits and use them in the INIT_SCTLR_EL1_ macros where _RES1 was previously used. There should be no functional change. Signed-off-by: Mark Brown <broonie@kernel.org> Reviewed-by: Mark Rutland <mark.rutland@arm.com> Link: https://lore.kernel.org/r/20220503170233.507788-6-broonie@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
This commit is contained in:
parent
e4e6a9d559
commit
56eb621b8a
@ -633,19 +633,24 @@
|
||||
|
||||
#define SCTLR_ELx_ENIA_SHIFT 31
|
||||
|
||||
#define SCTLR_ELx_ITFSB (BIT(37))
|
||||
#define SCTLR_ELx_ENIA (BIT(SCTLR_ELx_ENIA_SHIFT))
|
||||
#define SCTLR_ELx_ENIB (BIT(30))
|
||||
#define SCTLR_ELx_ENDA (BIT(27))
|
||||
#define SCTLR_ELx_EE (BIT(25))
|
||||
#define SCTLR_ELx_IESB (BIT(21))
|
||||
#define SCTLR_ELx_WXN (BIT(19))
|
||||
#define SCTLR_ELx_ENDB (BIT(13))
|
||||
#define SCTLR_ELx_I (BIT(12))
|
||||
#define SCTLR_ELx_SA (BIT(3))
|
||||
#define SCTLR_ELx_C (BIT(2))
|
||||
#define SCTLR_ELx_A (BIT(1))
|
||||
#define SCTLR_ELx_M (BIT(0))
|
||||
#define SCTLR_ELx_ITFSB (BIT(37))
|
||||
#define SCTLR_ELx_ENIA (BIT(SCTLR_ELx_ENIA_SHIFT))
|
||||
#define SCTLR_ELx_ENIB (BIT(30))
|
||||
#define SCTLR_ELx_LSMAOE (BIT(29))
|
||||
#define SCTLR_ELx_nTLSMD (BIT(28))
|
||||
#define SCTLR_ELx_ENDA (BIT(27))
|
||||
#define SCTLR_ELx_EE (BIT(25))
|
||||
#define SCTLR_ELx_EIS (BIT(22))
|
||||
#define SCTLR_ELx_IESB (BIT(21))
|
||||
#define SCTLR_ELx_TSCXT (BIT(20))
|
||||
#define SCTLR_ELx_WXN (BIT(19))
|
||||
#define SCTLR_ELx_ENDB (BIT(13))
|
||||
#define SCTLR_ELx_I (BIT(12))
|
||||
#define SCTLR_ELx_EOS (BIT(11))
|
||||
#define SCTLR_ELx_SA (BIT(3))
|
||||
#define SCTLR_ELx_C (BIT(2))
|
||||
#define SCTLR_ELx_A (BIT(1))
|
||||
#define SCTLR_ELx_M (BIT(0))
|
||||
|
||||
/* SCTLR_EL2 specific flags. */
|
||||
#define SCTLR_EL2_RES1 ((BIT(4)) | (BIT(5)) | (BIT(11)) | (BIT(16)) | \
|
||||
@ -686,22 +691,24 @@
|
||||
|
||||
#define SCTLR_EL1_BT1 (BIT(36))
|
||||
#define SCTLR_EL1_BT0 (BIT(35))
|
||||
#define SCTLR_EL1_LSMAOE (BIT(29))
|
||||
#define SCTLR_EL1_nTLSMD (BIT(28))
|
||||
#define SCTLR_EL1_UCI (BIT(26))
|
||||
#define SCTLR_EL1_E0E (BIT(24))
|
||||
#define SCTLR_EL1_SPAN (BIT(23))
|
||||
#define SCTLR_EL1_EIS (BIT(22))
|
||||
#define SCTLR_EL1_TSCXT (BIT(20))
|
||||
#define SCTLR_EL1_nTWE (BIT(18))
|
||||
#define SCTLR_EL1_nTWI (BIT(16))
|
||||
#define SCTLR_EL1_UCT (BIT(15))
|
||||
#define SCTLR_EL1_DZE (BIT(14))
|
||||
#define SCTLR_EL1_EOS (BIT(11))
|
||||
#define SCTLR_EL1_UMA (BIT(9))
|
||||
#define SCTLR_EL1_SED (BIT(8))
|
||||
#define SCTLR_EL1_ITD (BIT(7))
|
||||
#define SCTLR_EL1_CP15BEN (BIT(5))
|
||||
#define SCTLR_EL1_SA0 (BIT(4))
|
||||
|
||||
#define SCTLR_EL1_RES1 ((BIT(11)) | (BIT(20)) | (BIT(22)) | (BIT(28)) | \
|
||||
(BIT(29)))
|
||||
|
||||
#ifdef CONFIG_CPU_BIG_ENDIAN
|
||||
#define ENDIAN_SET_EL1 (SCTLR_EL1_E0E | SCTLR_ELx_EE)
|
||||
#else
|
||||
@ -709,13 +716,17 @@
|
||||
#endif
|
||||
|
||||
#define INIT_SCTLR_EL1_MMU_OFF \
|
||||
(ENDIAN_SET_EL1 | SCTLR_EL1_RES1)
|
||||
(ENDIAN_SET_EL1 | SCTLR_EL1_LSMAOE | SCTLR_EL1_nTLSMD | \
|
||||
SCTLR_EL1_EIS | SCTLR_EL1_TSCXT | SCTLR_EL1_EOS)
|
||||
|
||||
#define INIT_SCTLR_EL1_MMU_ON \
|
||||
(SCTLR_ELx_M | SCTLR_ELx_C | SCTLR_ELx_SA | SCTLR_EL1_SA0 | \
|
||||
SCTLR_EL1_SED | SCTLR_ELx_I | SCTLR_EL1_DZE | SCTLR_EL1_UCT | \
|
||||
SCTLR_EL1_nTWE | SCTLR_ELx_IESB | SCTLR_EL1_SPAN | SCTLR_ELx_ITFSB | \
|
||||
ENDIAN_SET_EL1 | SCTLR_EL1_UCI | SCTLR_EL1_EPAN | SCTLR_EL1_RES1)
|
||||
(SCTLR_ELx_M | SCTLR_ELx_C | SCTLR_ELx_SA | \
|
||||
SCTLR_EL1_SA0 | SCTLR_EL1_SED | SCTLR_ELx_I | \
|
||||
SCTLR_EL1_DZE | SCTLR_EL1_UCT | SCTLR_EL1_nTWE | \
|
||||
SCTLR_ELx_IESB | SCTLR_EL1_SPAN | SCTLR_ELx_ITFSB | \
|
||||
ENDIAN_SET_EL1 | SCTLR_EL1_UCI | SCTLR_EL1_EPAN | \
|
||||
SCTLR_EL1_LSMAOE | SCTLR_EL1_nTLSMD | SCTLR_EL1_EIS | \
|
||||
SCTLR_EL1_TSCXT | SCTLR_EL1_EOS)
|
||||
|
||||
/* MAIR_ELx memory attributes (used by Linux) */
|
||||
#define MAIR_ATTR_DEVICE_nGnRnE UL(0x00)
|
||||
|
Loading…
Reference in New Issue
Block a user