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 <joey.gouly@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will@kernel.org> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Link: https://lore.kernel.org/r/20240822151113.1479789-14-joey.gouly@arm.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent facaa13 commit b66db4f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

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)