@ -30,7 +30,7 @@
/ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* The following function strictly follows the AArch64
* PCS to use x9-x17 ( temporary caller-saved registers )
* PCS to use x9-x16 ( temporary caller-saved registers )
* to save EL2 system register context. It assumes that
* ' x0 ' is pointing to a ' el2_sys_regs ' structure where
* the register context will be saved.
@ -43,7 +43,6 @@
* ICH_LR < n > _EL2
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* /
func el2_sysregs_context_save
mrs x9 , actlr_el2
mrs x10 , afsr0_el2
@ -54,185 +53,153 @@ func el2_sysregs_context_save
stp x11 , x12 , [ x0 , # CTX_AFSR1_EL2 ]
mrs x13 , cnthctl_el2
mrs x14 , cnthp_ctl _el2
mrs x14 , cntvoff _el2
stp x13 , x14 , [ x0 , # CTX_CNTHCTL_EL2 ]
mrs x15 , cnthp_cval_el2
mrs x16 , cnthp_tval_el2
stp x15 , x16 , [ x0 , # CTX_CNTHP_CVAL_EL2 ]
mrs x17 , cntvoff_el2
mrs x9 , cptr_el2
stp x17 , x9 , [ x0 , # CTX_CNTVOFF_EL2 ]
mrs x15 , cptr_el2
str x15 , [ x0 , # CTX_CPTR_EL2 ]
mrs x11 , elr_el2
# if CTX_INCLUDE_AARCH32_REGS
mrs x10 , dbgvcr32_el2
stp x10 , x11 , [ x0 , # CTX_DBGVCR32_EL2 ]
# else
str x11 , [ x0 , # CTX_ELR_EL2 ]
mrs x16 , dbgvcr32_el2
str x16 , [ x0 , # CTX_DBGVCR32_EL2 ]
# endif
mrs x14 , es r_el2
mrs x15 , fa r_el2
stp x14 , x15 , [ x0 , # CTX_ES R_EL2 ]
mrs x9 , el r_el2
mrs x10 , es r_el2
stp x9 , x10 , [ x0 , # CTX_EL R_EL2 ]
mrs x16 , hac r_el2
mrs x17 , hcr_el2
stp x16 , x17 , [ x0 , # CTX_HAC R_EL2 ]
mrs x11 , fa r_el2
mrs x12 , ha cr_el2
stp x11 , x12 , [ x0 , # CTX_FA R_EL2 ]
mrs x9 , hpfa r_el2
mrs x10 , hst r_el2
stp x9 , x10 , [ x0 , # CTX_HPFA R_EL2 ]
mrs x13 , hc r_el2
mrs x14 , hpfa r_el2
stp x13 , x14 , [ x0 , # CTX_HC R_EL2 ]
mrs x11 , ICC_SRE_EL 2
mrs x12 , ICH_H CR_EL2
stp x11 , x12 , [ x0 , # CTX_ICC_SRE _EL2 ]
mrs x15 , hstr_el 2
mrs x16 , ICC_S RE _EL2
stp x15 , x16 , [ x0 , # CTX_HSTR _EL2 ]
mrs x13 , ICH_VMCR_EL2
mrs x14 , mair_el2
stp x13 , x14 , [ x0 , # CTX_ICH_VMCR_EL2 ]
mrs x9 , ICH_HCR_EL2
mrs x10 , ICH_VMCR_EL2
stp x9 , x10 , [ x0 , # CTX_ICH_HCR_EL2 ]
mrs x11 , mair_el2
mrs x12 , mdcr_el2
stp x11 , x12 , [ x0 , # CTX_MAIR_EL2 ]
mrs x15 , mdcr_el2
# if ENABLE_SPE_FOR_LOWER_ELS
mrs x16 , PMSCR_EL2
stp x15 , x16 , [ x0 , # CTX_MDCR_EL2 ]
# else
str x15 , [ x0 , # CTX_MDCR_EL2 ]
mrs x13 , PMSCR_EL2
str x13 , [ x0 , # CTX_PMSCR_EL2 ]
# endif
mrs x14 , sctlr_el2
str x14 , [ x0 , # CTX_SCTLR_EL2 ]
mrs x17 , sctlr_el2
mrs x9 , spsr _el2
stp x17 , x9 , [ x0 , # CTX_SCTL R_EL2 ]
mrs x15 , sps r_el2
mrs x16 , sp_el2
stp x15 , x16 , [ x0 , # CTX_SPS R_EL2 ]
mrs x10 , sp _el2
mrs x11 , tc r_el2
stp x10 , x11 , [ x0 , # CTX_SP _EL2 ]
mrs x9 , tcr _el2
mrs x10 , tpid r_el2
stp x9 , x10 , [ x0 , # CTX_TCR _EL2 ]
mrs x12 , tpidr _el2
mrs x13 , ttbr0 _el2
stp x12 , x13 , [ x0 , # CTX_TPIDR _EL2 ]
mrs x11 , ttbr0 _el2
mrs x12 , vbar _el2
stp x11 , x12 , [ x0 , # CTX_TTBR0 _EL2 ]
mrs x14 , vba r_el2
mrs x15 , vm pidr_el2
stp x14 , x15 , [ x0 , # CTX_VBA R_EL2 ]
mrs x13 , vmpid r_el2
mrs x14 , vpidr_el2
stp x13 , x14 , [ x0 , # CTX_VMPID R_EL2 ]
mrs x16 , vpidr_el2
mrs x17 , vtcr_el2
stp x16 , x17 , [ x0 , # CTX_VPIDR_EL2 ]
mrs x9 , vttbr_el2
str x9 , [ x0 , # CTX_VTTBR_EL2 ]
mrs x15 , vtcr_el2
mrs x16 , vttbr_el2
stp x15 , x16 , [ x0 , # CTX_VTCR_EL2 ]
# if CTX_INCLUDE_MTE_REGS
mrs x10 , TFSR_EL2
str x10 , [ x0 , # CTX_TFSR_EL2 ]
mrs x9 , TFSR_EL2
str x9 , [ x0 , # CTX_TFSR_EL2 ]
# endif
# if ENABLE_MPAM_FOR_LOWER_ELS
mrs x9 , MPAM2_EL2
mrs x10 , MPAMHCR_EL2
stp x9 , x10 , [ x0 , # CTX_MPAM2_EL2 ]
mrs x10 , MPAM2_EL2
str x10 , [ x0 , # CTX_MPAM2_EL2 ]
mrs x11 , MPAMVPM0 _EL2
mrs x12 , MPAMVPM1 _EL2
stp x11 , x12 , [ x0 , # CTX_MPAMVPM0 _EL2 ]
mrs x11 , MPAMHCR _EL2
mrs x12 , MPAMVPM0 _EL2
stp x11 , x12 , [ x0 , # CTX_MPAMHCR _EL2 ]
mrs x13 , MPAMVPM2 _EL2
mrs x14 , MPAMVPM3 _EL2
stp x13 , x14 , [ x0 , # CTX_MPAMVPM2 _EL2 ]
mrs x13 , MPAMVPM1 _EL2
mrs x14 , MPAMVPM2 _EL2
stp x13 , x14 , [ x0 , # CTX_MPAMVPM1 _EL2 ]
mrs x15 , MPAMVPM4 _EL2
mrs x16 , MPAMVPM5 _EL2
stp x15 , x16 , [ x0 , # CTX_MPAMVPM4 _EL2 ]
mrs x15 , MPAMVPM3 _EL2
mrs x16 , MPAMVPM4 _EL2
stp x15 , x16 , [ x0 , # CTX_MPAMVPM3 _EL2 ]
mrs x17 , MPAMVPM6 _EL2
mrs x9 , MPAMVPM7 _EL2
stp x17 , x9 , [ x0 , # CTX_MPAMVPM6 _EL2 ]
mrs x9 , MPAMVPM5 _EL2
mrs x10 , MPAMVPM6 _EL2
stp x9 , x10 , [ x0 , # CTX_MPAMVPM5 _EL2 ]
mrs x10 , MPAMVPMV_EL2
str x10 , [ x0 , # CTX_MPAMVPMV_EL2 ]
mrs x11 , MPAMVPM7_EL2
mrs x12 , MPAMVPMV_EL2
stp x11 , x12 , [ x0 , # CTX_MPAMVPM7_EL2 ]
# endif
# if ARM_ARCH_AT_LEAST ( 8 , 6 )
mrs x11 , HAFGRTR_EL2
mrs x12 , HDFGRTR_EL2
stp x11 , x12 , [ x0 , # CTX_HAFGRTR_EL2 ]
mrs x13 , HAFGRTR_EL2
mrs x14 , HDFGRTR_EL2
stp x13 , x14 , [ x0 , # CTX_HAFGRTR_EL2 ]
mrs x13 , HDFGWTR_EL2
mrs x14 , HFGITR_EL2
stp x13 , x14 , [ x0 , # CTX_HDFGWTR_EL2 ]
mrs x15 , HDFGWTR_EL2
mrs x16 , HFGITR_EL2
stp x15 , x16 , [ x0 , # CTX_HDFGWTR_EL2 ]
mrs x15 , HFGRTR_EL2
mrs x16 , HFGWTR_EL2
stp x15 , x16 , [ x0 , # CTX_HFGRTR_EL2 ]
mrs x9 , HFGRTR_EL2
mrs x10 , HFGWTR_EL2
stp x9 , x10 , [ x0 , # CTX_HFGRTR_EL2 ]
mrs x17 , CNTPOFF_EL2
str x17 , [ x0 , # CTX_CNTPOFF_EL2 ]
mrs x11 , CNTPOFF_EL2
str x11 , [ x0 , # CTX_CNTPOFF_EL2 ]
# endif
# if ARM_ARCH_AT_LEAST ( 8 , 4 )
mrs x9 , cnthps_ctl_el2
mrs x10 , cnthps_cval_el2
stp x9 , x10 , [ x0 , # CTX_CNTHPS_CTL_EL2 ]
mrs x11 , cnthps_tval_el2
mrs x12 , cnthvs_ctl_el2
stp x11 , x12 , [ x0 , # CTX_CNTHPS_TVAL_EL2 ]
mrs x13 , cnthvs_cval_el2
mrs x14 , cnthvs_tval_el2
stp x13 , x14 , [ x0 , # CTX_CNTHVS_CVAL_EL2 ]
mrs x15 , cnthv_ctl_el2
mrs x16 , cnthv_cval_el2
stp x15 , x16 , [ x0 , # CTX_CNTHV_CTL_EL2 ]
mrs x17 , cnthv_tval_el2
mrs x9 , contextidr_el2
stp x17 , x9 , [ x0 , # CTX_CNTHV_TVAL_EL2 ]
mrs x12 , contextidr_el2
str x12 , [ x0 , # CTX_CONTEXTIDR_EL2 ]
# if CTX_INCLUDE_AARCH32_REGS
mrs x10 , sder32_el2
str x10 , [ x0 , # CTX_SDER32_EL2 ]
mrs x13 , sder32_el2
str x13 , [ x0 , # CTX_SDER32_EL2 ]
# endif
mrs x11 , ttbr1_el2
str x11 , [ x0 , # CTX_TTBR1_EL2 ]
mrs x12 , vdisr_el2
str x12 , [ x0 , # CTX_VDISR_EL2 ]
mrs x14 , ttbr1_el2
mrs x15 , vdisr_el2
stp x14 , x15 , [ x0 , # CTX_TTBR1_EL2 ]
# if CTX_INCLUDE_NEVE_REGS
mrs x13 , vncr_el2
str x13 , [ x0 , # CTX_VNCR_EL2 ]
mrs x16 , vncr_el2
str x16 , [ x0 , # CTX_VNCR_EL2 ]
# endif
mrs x14 , vsesr_el2
str x14 , [ x0 , # CTX_VSESR_EL2 ]
mrs x15 , vstcr_el2
str x15 , [ x0 , # CTX_VSTCR_EL2 ]
mrs x9 , vsesr_el2
mrs x10 , vstcr_el2
stp x9 , x10 , [ x0 , # CTX_VSESR_EL2 ]
mrs x16 , vsttbr_el2
str x16 , [ x0 , # CTX_VSTTBR_EL2 ]
mrs x17 , TRFCR_EL2
str x17 , [ x0 , # CTX_TRFCR_EL2 ]
mrs x11 , vsttbr_el2
mrs x12 , TRFCR_EL2
stp x11 , x12 , [ x0 , # CTX_VSTTBR_EL2 ]
# endif
# if ARM_ARCH_AT_LEAST ( 8 , 5 )
mrs x9 , scxtnum_el2
str x9 , [ x0 , # CTX_SCXTNUM_EL2 ]
mrs x13 , scxtnum_el2
str x13 , [ x0 , # CTX_SCXTNUM_EL2 ]
# endif
ret
endfunc el2_sysregs_context_save
/ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* The following function strictly follows the AArch64
* PCS to use x9-x17 ( temporary caller-saved registers )
* PCS to use x9-x16 ( temporary caller-saved registers )
* to restore EL2 system register context. It assumes
* that ' x0 ' is pointing to a ' el2_sys_regs ' structure
* from where the register context will be restored
@ -246,7 +213,6 @@ endfunc el2_sysregs_context_save
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* /
func el2_sysregs_context_restore
ldp x9 , x10 , [ x0 , # CTX_ACTLR_EL2 ]
msr actlr_el2 , x9
msr afsr0_el2 , x10
@ -257,74 +223,66 @@ func el2_sysregs_context_restore
ldp x13 , x14 , [ x0 , # CTX_CNTHCTL_EL2 ]
msr cnthctl_el2 , x13
msr cnthp_ctl_el2 , x14
ldp x15 , x16 , [ x0 , # CTX_CNTHP_CVAL_EL2 ]
msr cnthp_cval_el2 , x15
msr cnthp_tval_el2 , x16
msr cntvoff_el2 , x14
ldp x17 , x9 , [ x0 , # CTX_CNTVOFF_EL2 ]
msr cntvoff_el2 , x17
msr cptr_el2 , x9
ldr x15 , [ x0 , # CTX_CPTR_EL2 ]
msr cptr_el2 , x15
# if CTX_INCLUDE_AARCH32_REGS
ldp x10 , x11 , [ x0 , # CTX_DBGVCR32_EL2 ]
msr dbgvcr32_el2 , x10
# else
ldr x11 , [ x0 , # CTX_ELR_EL2 ]
ldr x16 , [ x0 , # CTX_DBGVCR32_EL2 ]
msr dbgvcr32_el2 , x16
# endif
msr elr_el2 , x11
ldp x14 , x15 , [ x0 , # CTX_ESR_EL2 ]
msr esr_el2 , x14
msr far_el2 , x15
ldp x9 , x10 , [ x0 , # CTX_ELR_EL2 ]
msr elr_el2 , x9
msr esr_el2 , x10
ldp x11 , x12 , [ x0 , # CTX_FAR_EL2 ]
msr far_el2 , x11
msr hacr_el2 , x12
ldp x16 , x17 , [ x0 , # CTX_HACR_EL2 ]
msr hacr_el2 , x16
msr hcr_el2 , x17
ldp x13 , x14 , [ x0 , # CTX_HCR_EL2 ]
msr hcr_el2 , x13
msr hpfar_el2 , x14
ldp x9 , x10 , [ x0 , # CTX_HPFA R_EL2 ]
msr hpfar_el2 , x9
msr hstr_el2 , x10
ldp x15 , x16 , [ x0 , # CTX_HST R_EL2 ]
msr hstr_el2 , x15
msr ICC_SRE_EL2 , x16
ldp x11 , x12 , [ x0 , # CTX_ICC_SRE _EL2 ]
msr ICC_SRE_EL2 , x11
msr ICH_HCR_EL2 , x12
ldp x9 , x10 , [ x0 , # CTX_ICH_HCR _EL2 ]
msr ICH_HCR_EL2 , x9
msr ICH_VMCR_EL2 , x10
ldp x13 , x14 , [ x0 , # CTX_ICH_VMC R_EL2 ]
msr ICH_VMCR_EL2 , x13
msr mair_el2 , x14
ldp x11 , x12 , [ x0 , # CTX_MAI R_EL2 ]
msr mair_el2 , x11
msr mdcr_el2 , x12
# if ENABLE_SPE_FOR_LOWER_ELS
ldp x15 , x16 , [ x0 , # CTX_MDCR_EL2 ]
msr PMSCR_EL2 , x16
# else
ldr x15 , [ x0 , # CTX_MDCR_EL2 ]
ldr x13 , [ x0 , # CTX_PMSCR_EL2 ]
msr PMSCR_EL2 , x13
# endif
msr mdcr_el2 , x15
ldr x14 , [ x0 , # CTX_SCTLR_EL2 ]
msr sctlr_el2 , x14
ldp x17 , x9 , [ x0 , # CTX_SCTL R_EL2 ]
msr sctlr_el2 , x17
msr spsr _el2 , x9
ldp x15 , x16 , [ x0 , # CTX_SPS R_EL2 ]
msr spsr_el2 , x15
msr sp_el2 , x16
ldp x10 , x11 , [ x0 , # CTX_SP _EL2 ]
msr sp_el2 , x10
msr tcr_el2 , x11
ldp x9 , x10 , [ x0 , # CTX_TCR _EL2 ]
msr tcr_el2 , x9
msr tpidr_el2 , x10
ldp x12 , x13 , [ x0 , # CTX_TPIDR _EL2 ]
msr tpidr_el2 , x12
msr ttbr0_el2 , x13
ldp x11 , x12 , [ x0 , # CTX_TTBR0 _EL2 ]
msr ttbr0_el2 , x11
msr vbar_el2 , x12
ldp x13 , x14 , [ x0 , # CTX_VBA R_EL2 ]
msr vba r_el2 , x13
msr vm pidr_el2 , x14
ldp x13 , x14 , [ x0 , # CTX_VMPID R_EL2 ]
msr vmpid r_el2 , x13
msr vpidr_el2 , x14
ldp x15 , x16 , [ x0 , # CTX_VPIDR_EL2 ]
msr vpidr_el2 , x15
msr vtcr_el2 , x16
ldr x17 , [ x0 , # CTX_VTTBR_EL2 ]
msr vttbr_el2 , x17
ldp x15 , x16 , [ x0 , # CTX_VTCR_EL2 ]
msr vtcr_el2 , x15
msr vttbr_el2 , x16
# if CTX_INCLUDE_MTE_REGS
ldr x9 , [ x0 , # CTX_TFSR_EL2 ]
@ -332,100 +290,76 @@ func el2_sysregs_context_restore
# endif
# if ENABLE_MPAM_FOR_LOWER_ELS
ldp x10 , x11 , [ x0 , # CTX_MPAM2_EL2 ]
ldr x10 , [ x0 , # CTX_MPAM2_EL2 ]
msr MPAM2_EL2 , x10
msr MPAMHCR_EL2 , x11
ldp x12 , x13 , [ x0 , # CTX_MPAMVPM0_EL2 ]
ldp x11 , x12 , [ x0 , # CTX_MPAMHCR_EL2 ]
msr MPAMHCR_EL2 , x11
msr MPAMVPM0_EL2 , x12
msr MPAMVPM1_EL2 , x13
ldp x14 , x15 , [ x0 , # CTX_MPAMVPM2_EL2 ]
ldp x13 , x14 , [ x0 , # CTX_MPAMVPM1_EL2 ]
msr MPAMVPM1_EL2 , x13
msr MPAMVPM2_EL2 , x14
msr MPAMVPM3_EL2 , x15
ldp x16 , x17 , [ x0 , # CTX_MPAMVPM4_EL2 ]
ldp x15 , x16 , [ x0 , # CTX_MPAMVPM3_EL2 ]
msr MPAMVPM3_EL2 , x15
msr MPAMVPM4_EL2 , x16
msr MPAMVPM5_EL2 , x17
ldp x9 , x10 , [ x0 , # CTX_MPAMVPM6 _EL2 ]
msr MPAMVPM6 _EL2 , x9
msr MPAMVPM7 _EL2 , x10
ldp x9 , x10 , [ x0 , # CTX_MPAMVPM5 _EL2 ]
msr MPAMVPM5 _EL2 , x9
msr MPAMVPM6 _EL2 , x10
ldr x11 , [ x0 , # CTX_MPAMVPMV_EL2 ]
msr MPAMVPMV_EL2 , x11
ldp x11 , x12 , [ x0 , # CTX_MPAMVPM7_EL2 ]
msr MPAMVPM7_EL2 , x11
msr MPAMVPMV_EL2 , x12
# endif
# if ARM_ARCH_AT_LEAST ( 8 , 6 )
ldp x12 , x13 , [ x0 , # CTX_HAFGRTR_EL2 ]
msr HAFGRTR_EL2 , x12
msr HDFGRTR_EL2 , x13
ldp x13 , x14 , [ x0 , # CTX_HAFGRTR_EL2 ]
msr HAFGRTR_EL2 , x13
msr HDFGRTR_EL2 , x14
ldp x14 , x15 , [ x0 , # CTX_HDFGWTR_EL2 ]
msr HDFGWTR_EL2 , x14
msr HFGITR_EL2 , x15
ldp x15 , x16 , [ x0 , # CTX_HDFGWTR_EL2 ]
msr HDFGWTR_EL2 , x15
msr HFGITR_EL2 , x16
ldp x16 , x17 , [ x0 , # CTX_HFGRTR_EL2 ]
msr HFGRTR_EL2 , x16
msr HFGWTR_EL2 , x17
ldp x9 , x10 , [ x0 , # CTX_HFGRTR_EL2 ]
msr HFGRTR_EL2 , x9
msr HFGWTR_EL2 , x10
ldr x9 , [ x0 , # CTX_CNTPOFF_EL2 ]
msr CNTPOFF_EL2 , x9
ldr x11 , [ x0 , # CTX_CNTPOFF_EL2 ]
msr CNTPOFF_EL2 , x11
# endif
# if ARM_ARCH_AT_LEAST ( 8 , 4 )
ldp x10 , x11 , [ x0 , # CTX_CNTHPS_CTL_EL2 ]
msr cnthps_ctl_el2 , x10
msr cnthps_cval_el2 , x11
ldp x12 , x13 , [ x0 , # CTX_CNTHPS_TVAL_EL2 ]
msr cnthps_tval_el2 , x12
msr cnthvs_ctl_el2 , x13
ldp x14 , x15 , [ x0 , # CTX_CNTHVS_CVAL_EL2 ]
msr cnthvs_cval_el2 , x14
msr cnthvs_tval_el2 , x15
ldp x16 , x17 , [ x0 , # CTX_CNTHV_CTL_EL2 ]
msr cnthv_ctl_el2 , x16
msr cnthv_cval_el2 , x17
ldp x9 , x10 , [ x0 , # CTX_CNTHV_TVAL_EL2 ]
msr cnthv_tval_el2 , x9
msr contextidr_el2 , x10
ldr x12 , [ x0 , # CTX_CONTEXTIDR_EL2 ]
msr contextidr_el2 , x12
# if CTX_INCLUDE_AARCH32_REGS
ldr x11 , [ x0 , # CTX_SDER32_EL2 ]
msr sder32_el2 , x11
ldr x13 , [ x0 , # CTX_SDER32_EL2 ]
msr sder32_el2 , x13
# endif
ldr x12 , [ x0 , # CTX_TTBR1_EL2 ]
msr ttbr1_el2 , x12
ldr x13 , [ x0 , # CTX_VDISR_EL2 ]
msr vdisr_el2 , x13
ldp x14 , x15 , [ x0 , # CTX_TTBR1_EL2 ]
msr ttbr1_el2 , x14
msr vdisr_el2 , x15
# if CTX_INCLUDE_NEVE_REGS
ldr x14 , [ x0 , # CTX_VNCR_EL2 ]
msr vncr_el2 , x14
ldr x16 , [ x0 , # CTX_VNCR_EL2 ]
msr vncr_el2 , x16
# endif
ldr x15 , [ x0 , # CTX_VSESR_EL2 ]
msr vsesr_el2 , x15
ldr x16 , [ x0 , # CTX_VSTCR_EL2 ]
msr vstcr_el2 , x16
ldr x17 , [ x0 , # CTX_VSTTBR_EL2 ]
msr vsttbr_el2 , x17
ldp x9 , x10 , [ x0 , # CTX_VSESR_EL2 ]
msr vsesr_el2 , x9
msr vstcr_el2 , x10
ldr x9 , [ x0 , # CTX_TRFCR_EL2 ]
msr TRFCR_EL2 , x9
ldp x11 , x12 , [ x0 , # CTX_VSTTBR_EL2 ]
msr vsttbr_el2 , x11
msr TRFCR_EL2 , x12
# endif
# if ARM_ARCH_AT_LEAST ( 8 , 5 )
ldr x10 , [ x0 , # CTX_SCXTNUM_EL2 ]
msr scxtnum_el2 , x10
ldr x13 , [ x0 , # CTX_SCXTNUM_EL2 ]
msr scxtnum_el2 , x13
# endif
ret