Skip to content

Commit 6dcd2ac

Browse files
author
Marc Zyngier
committed
arm64: Add PAR_EL1 field description
As KVM is about to grow a full emulation for the AT instructions, add the layout of the PAR_EL1 register in its non-D128 configuration. Note that the constants are a bit ugly, as the register has two layouts, based on the state of the F bit. Signed-off-by: Marc Zyngier <maz@kernel.org>
1 parent 4abc783 commit 6dcd2ac

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

arch/arm64/include/asm/sysreg.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,25 @@
325325
#define SYS_PAR_EL1 sys_reg(3, 0, 7, 4, 0)
326326

327327
#define SYS_PAR_EL1_F BIT(0)
328+
/* When PAR_EL1.F == 1 */
328329
#define SYS_PAR_EL1_FST GENMASK(6, 1)
330+
#define SYS_PAR_EL1_PTW BIT(8)
331+
#define SYS_PAR_EL1_S BIT(9)
332+
#define SYS_PAR_EL1_AssuredOnly BIT(12)
333+
#define SYS_PAR_EL1_TopLevel BIT(13)
334+
#define SYS_PAR_EL1_Overlay BIT(14)
335+
#define SYS_PAR_EL1_DirtyBit BIT(15)
336+
#define SYS_PAR_EL1_F1_IMPDEF GENMASK_ULL(63, 48)
337+
#define SYS_PAR_EL1_F1_RES0 (BIT(7) | BIT(10) | GENMASK_ULL(47, 16))
338+
#define SYS_PAR_EL1_RES1 BIT(11)
339+
/* When PAR_EL1.F == 0 */
340+
#define SYS_PAR_EL1_SH GENMASK_ULL(8, 7)
341+
#define SYS_PAR_EL1_NS BIT(9)
342+
#define SYS_PAR_EL1_F0_IMPDEF BIT(10)
343+
#define SYS_PAR_EL1_NSE BIT(11)
344+
#define SYS_PAR_EL1_PA GENMASK_ULL(51, 12)
345+
#define SYS_PAR_EL1_ATTR GENMASK_ULL(63, 56)
346+
#define SYS_PAR_EL1_F0_RES0 (GENMASK_ULL(6, 1) | GENMASK_ULL(55, 52))
329347

330348
/*** Statistical Profiling Extension ***/
331349
#define PMSEVFR_EL1_RES0_IMP \

0 commit comments

Comments
 (0)