Skip to content

Commit 9e9bb6e

Browse files
jgoulyctmarinas
authored andcommitted
arm64: enable Permission Indirection Extension (PIE)
Now that the necessary changes have been made, set the Permission Indirection registers and enable the Permission Indirection Extension. Signed-off-by: Joey Gouly <[email protected]> Cc: Will Deacon <[email protected]> Reviewed-by: Catalin Marinas <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent eeda243 commit 9e9bb6e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

arch/arm64/mm/proc.S

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,21 @@ SYM_FUNC_START(__cpu_setup)
454454
#endif /* CONFIG_ARM64_HW_AFDBM */
455455
msr mair_el1, mair
456456
msr tcr_el1, tcr
457+
458+
mrs_s x1, SYS_ID_AA64MMFR3_EL1
459+
ubfx x1, x1, #ID_AA64MMFR3_EL1_S1PIE_SHIFT, #4
460+
cbz x1, .Lskip_indirection
461+
462+
mov_q x0, PIE_E0
463+
msr REG_PIRE0_EL1, x0
464+
mov_q x0, PIE_E1
465+
msr REG_PIR_EL1, x0
466+
467+
mov x0, TCR2_EL1x_PIE
468+
msr REG_TCR2_EL1, x0
469+
470+
.Lskip_indirection:
471+
457472
/*
458473
* Prepare SCTLR
459474
*/

0 commit comments

Comments
 (0)