Lines Matching refs:reg1
26 .macro ptrauth_save_state base, reg1, reg2
27 mrs_s \reg1, SYS_APIAKEYLO_EL1
29 stp \reg1, \reg2, [\base, #PTRAUTH_REG_OFFSET(CPU_APIAKEYLO_EL1)]
30 mrs_s \reg1, SYS_APIBKEYLO_EL1
32 stp \reg1, \reg2, [\base, #PTRAUTH_REG_OFFSET(CPU_APIBKEYLO_EL1)]
33 mrs_s \reg1, SYS_APDAKEYLO_EL1
35 stp \reg1, \reg2, [\base, #PTRAUTH_REG_OFFSET(CPU_APDAKEYLO_EL1)]
36 mrs_s \reg1, SYS_APDBKEYLO_EL1
38 stp \reg1, \reg2, [\base, #PTRAUTH_REG_OFFSET(CPU_APDBKEYLO_EL1)]
39 mrs_s \reg1, SYS_APGAKEYLO_EL1
41 stp \reg1, \reg2, [\base, #PTRAUTH_REG_OFFSET(CPU_APGAKEYLO_EL1)]
44 .macro ptrauth_restore_state base, reg1, reg2
45 ldp \reg1, \reg2, [\base, #PTRAUTH_REG_OFFSET(CPU_APIAKEYLO_EL1)]
46 msr_s SYS_APIAKEYLO_EL1, \reg1
48 ldp \reg1, \reg2, [\base, #PTRAUTH_REG_OFFSET(CPU_APIBKEYLO_EL1)]
49 msr_s SYS_APIBKEYLO_EL1, \reg1
51 ldp \reg1, \reg2, [\base, #PTRAUTH_REG_OFFSET(CPU_APDAKEYLO_EL1)]
52 msr_s SYS_APDAKEYLO_EL1, \reg1
54 ldp \reg1, \reg2, [\base, #PTRAUTH_REG_OFFSET(CPU_APDBKEYLO_EL1)]
55 msr_s SYS_APDBKEYLO_EL1, \reg1
57 ldp \reg1, \reg2, [\base, #PTRAUTH_REG_OFFSET(CPU_APGAKEYLO_EL1)]
58 msr_s SYS_APGAKEYLO_EL1, \reg1
69 .macro ptrauth_switch_to_guest g_ctxt, reg1, reg2, reg3
73 mrs \reg1, hcr_el2
74 and \reg1, \reg1, #(HCR_API | HCR_APK)
75 cbz \reg1, .L__skip_switch\@
76 add \reg1, \g_ctxt, #CPU_APIAKEYLO_EL1
77 ptrauth_restore_state \reg1, \reg2, \reg3
81 .macro ptrauth_switch_to_hyp g_ctxt, h_ctxt, reg1, reg2, reg3
85 mrs \reg1, hcr_el2
86 and \reg1, \reg1, #(HCR_API | HCR_APK)
87 cbz \reg1, .L__skip_switch\@
88 add \reg1, \g_ctxt, #CPU_APIAKEYLO_EL1
89 ptrauth_save_state \reg1, \reg2, \reg3
90 add \reg1, \h_ctxt, #CPU_APIAKEYLO_EL1
91 ptrauth_restore_state \reg1, \reg2, \reg3
97 .macro ptrauth_switch_to_guest g_ctxt, reg1, reg2, reg3
99 .macro ptrauth_switch_to_hyp g_ctxt, h_ctxt, reg1, reg2, reg3