We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3100761 commit fb0e4b1Copy full SHA for fb0e4b1
sys/arm64/arm64/exception.S
@@ -181,7 +181,17 @@
181
* registers so must always do this.
182
*/
183
#endif
184
+.if \el == 1
185
+ /*
186
+ * In the kernel, x18 is always used as the per-CPU data pointer and is
187
+ * reset to the value in tpidr_el1 further below. At this point when
188
+ * returning to EL1, x18 contains the saved stack pointer, so be careful
189
+ * not to clobber it.
190
+ */
191
+ ldr CAP(19), [PTRN(sp), #(TF_X + 19 * CAP_WIDTH)]
192
+.else
193
ldp CAP(18), CAP(19), [PTRN(sp), #(TF_X + 18 * CAP_WIDTH)]
194
+.endif
195
ldp CAP(20), CAP(21), [PTRN(sp), #(TF_X + 20 * CAP_WIDTH)]
196
ldp CAP(22), CAP(23), [PTRN(sp), #(TF_X + 22 * CAP_WIDTH)]
197
ldp CAP(24), CAP(25), [PTRN(sp), #(TF_X + 24 * CAP_WIDTH)]
0 commit comments