Skip to content

Commit b66db4f

Browse files
jgoulywilldeacon
authored andcommitted
arm64: add POIndex defines
The 3-bit POIndex is stored in the PTE at bits 60..62. Signed-off-by: Joey Gouly <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Will Deacon <[email protected]> Acked-by: Catalin Marinas <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent facaa13 commit b66db4f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

arch/arm64/include/asm/pgtable-hwdef.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,16 @@
199199
#define PTE_PI_IDX_2 53 /* PXN */
200200
#define PTE_PI_IDX_3 54 /* UXN */
201201

202+
/*
203+
* POIndex[2:0] encoding (Permission Overlay Extension)
204+
*/
205+
#define PTE_PO_IDX_0 (_AT(pteval_t, 1) << 60)
206+
#define PTE_PO_IDX_1 (_AT(pteval_t, 1) << 61)
207+
#define PTE_PO_IDX_2 (_AT(pteval_t, 1) << 62)
208+
209+
#define PTE_PO_IDX_MASK GENMASK_ULL(62, 60)
210+
211+
202212
/*
203213
* Memory Attribute override for Stage-2 (MemAttr[3:0])
204214
*/

0 commit comments

Comments
 (0)