Skip to content

Commit c36ad19

Browse files
jgoulyctmarinas
authored andcommitted
arm64/sysreg: add PIR*_ELx registers
Add definitions of PIR_EL1, PIR_EL12, PIRE0_EL1, PIRE0_EL12, and PIR_EL2 registers. Signed-off-by: Joey Gouly <[email protected]> Cc: Will Deacon <[email protected]> Cc: Mark Brown <[email protected]> Reviewed-by: Mark Brown <[email protected]> Acked-by: Catalin Marinas <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent 25bc6f3 commit c36ad19

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

arch/arm64/include/asm/sysreg.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,25 @@
758758
#define ICH_VTR_TDS_SHIFT 19
759759
#define ICH_VTR_TDS_MASK (1 << ICH_VTR_TDS_SHIFT)
760760

761+
/*
762+
* Permission Indirection Extension (PIE) permission encodings.
763+
* Encodings with the _O suffix, have overlays applied (Permission Overlay Extension).
764+
*/
765+
#define PIE_NONE_O 0x0
766+
#define PIE_R_O 0x1
767+
#define PIE_X_O 0x2
768+
#define PIE_RX_O 0x3
769+
#define PIE_RW_O 0x5
770+
#define PIE_RWnX_O 0x6
771+
#define PIE_RWX_O 0x7
772+
#define PIE_R 0x8
773+
#define PIE_GCS 0x9
774+
#define PIE_RX 0xa
775+
#define PIE_RW 0xc
776+
#define PIE_RWX 0xe
777+
778+
#define PIRx_ELx_PERM(idx, perm) ((perm) << ((idx) * 4))
779+
761780
#define ARM64_FEATURE_FIELD_BITS 4
762781

763782
/* Defined for compatibility only, do not add new users. */

arch/arm64/tools/sysreg

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2277,6 +2277,45 @@ Field 1 PIE
22772277
Field 0 PnCH
22782278
EndSysreg
22792279

2280+
SysregFields PIRx_ELx
2281+
Field 63:60 Perm15
2282+
Field 59:56 Perm14
2283+
Field 55:52 Perm13
2284+
Field 51:48 Perm12
2285+
Field 47:44 Perm11
2286+
Field 43:40 Perm10
2287+
Field 39:36 Perm9
2288+
Field 35:32 Perm8
2289+
Field 31:28 Perm7
2290+
Field 27:24 Perm6
2291+
Field 23:20 Perm5
2292+
Field 19:16 Perm4
2293+
Field 15:12 Perm3
2294+
Field 11:8 Perm2
2295+
Field 7:4 Perm1
2296+
Field 3:0 Perm0
2297+
EndSysregFields
2298+
2299+
Sysreg PIRE0_EL1 3 0 10 2 2
2300+
Fields PIRx_ELx
2301+
EndSysreg
2302+
2303+
Sysreg PIRE0_EL12 3 5 10 2 2
2304+
Fields PIRx_ELx
2305+
EndSysreg
2306+
2307+
Sysreg PIR_EL1 3 0 10 2 3
2308+
Fields PIRx_ELx
2309+
EndSysreg
2310+
2311+
Sysreg PIR_EL12 3 5 10 2 3
2312+
Fields PIRx_ELx
2313+
EndSysreg
2314+
2315+
Sysreg PIR_EL2 3 4 10 2 3
2316+
Fields PIRx_ELx
2317+
EndSysreg
2318+
22802319
Sysreg LORSA_EL1 3 0 10 4 0
22812320
Res0 63:52
22822321
Field 51:16 SA

0 commit comments

Comments
 (0)