@@ -143,7 +143,7 @@ macro_rules! initial_pagetable {
143143/// This function doesn't follow the standard aarch64 calling convention. It must only be called
144144/// from assembly code, early in the boot process.
145145///
146- /// Expects the MAIR value in x8, the TCR value in x9, the SCTLR value in x10 and the root pagetable
146+ /// Expects the MAIR value in x8, the SCTLR value in x9, the TCR value in x10 and the root pagetable
147147/// address in x11.
148148///
149149/// Clobbers x8-x9.
@@ -157,8 +157,8 @@ pub unsafe extern "C" fn __enable_mmu_el1() {
157157 "msr ttbr0_el1, x11" ,
158158 // Copy the supported PA range into TCR_EL1.IPS.
159159 "mrs x8, id_aa64mmfr0_el1" ,
160- "bfi x9 , x8, #32, #4" ,
161- "msr tcr_el1, x9 " ,
160+ "bfi x10 , x8, #32, #4" ,
161+ "msr tcr_el1, x10 " ,
162162 // Ensure everything before this point has completed, then invalidate any
163163 // potentially stale local TLB entries before they start being used.
164164 "isb" ,
@@ -168,7 +168,7 @@ pub unsafe extern "C" fn __enable_mmu_el1() {
168168 "isb" ,
169169 // Configure SCTLR_EL1 to enable MMU and cache and don't proceed until this has
170170 // completed.
171- "msr sctlr_el1, x10 " ,
171+ "msr sctlr_el1, x9 " ,
172172 "isb" ,
173173 "ret"
174174 ) ;
@@ -181,7 +181,7 @@ pub unsafe extern "C" fn __enable_mmu_el1() {
181181/// This function doesn't follow the standard aarch64 calling convention. It must only be called
182182/// from assembly code, early in the boot process.
183183///
184- /// Expects the MAIR value in x8, the TCR value in x9, the SCTLR value in x10 and the root pagetable
184+ /// Expects the MAIR value in x8, the SCTLR value in x9, the TCR value in x10 and the root pagetable
185185/// address in x11.
186186///
187187/// Clobbers x8-x9.
@@ -195,8 +195,8 @@ pub unsafe extern "C" fn __enable_mmu_el2() {
195195 "msr ttbr0_el2, x11" ,
196196 // Copy the supported PA range into TCR_EL2.IPS.
197197 "mrs x8, id_aa64mmfr0_el1" ,
198- "bfi x9 , x8, #32, #4" ,
199- "msr tcr_el2, x9 " ,
198+ "bfi x10 , x8, #32, #4" ,
199+ "msr tcr_el2, x10 " ,
200200 // Ensure everything before this point has completed, then invalidate any
201201 // potentially stale local TLB entries before they start being used.
202202 "isb" ,
@@ -206,7 +206,7 @@ pub unsafe extern "C" fn __enable_mmu_el2() {
206206 "isb" ,
207207 // Configure SCTLR_EL2 to enable MMU and cache and don't proceed until this has
208208 // completed.
209- "msr sctlr_el2, x10 " ,
209+ "msr sctlr_el2, x9 " ,
210210 "isb" ,
211211 "ret"
212212 ) ;
@@ -219,7 +219,7 @@ pub unsafe extern "C" fn __enable_mmu_el2() {
219219/// This function doesn't follow the standard aarch64 calling convention. It must only be called
220220/// from assembly code, early in the boot process.
221221///
222- /// Expects the MAIR value in x8, the TCR value in x9, the SCTLR value in x10 and the root pagetable
222+ /// Expects the MAIR value in x8, the SCTLR value in x9, the TCR value in x10 and the root pagetable
223223/// address in x11.
224224///
225225/// Clobbers x8-x9.
@@ -233,8 +233,8 @@ pub unsafe extern "C" fn __enable_mmu_el3() {
233233 "msr ttbr0_el3, x11" ,
234234 // Copy the supported PA range into TCR_EL3.IPS.
235235 "mrs x8, id_aa64mmfr0_el1" ,
236- "bfi x9 , x8, #32, #4" ,
237- "msr tcr_el3, x9 " ,
236+ "bfi x10 , x8, #32, #4" ,
237+ "msr tcr_el3, x10 " ,
238238 // Ensure everything before this point has completed, then invalidate any
239239 // potentially stale local TLB entries before they start being used.
240240 "isb" ,
@@ -244,7 +244,7 @@ pub unsafe extern "C" fn __enable_mmu_el3() {
244244 "isb" ,
245245 // Configure SCTLR_EL3 to enable MMU and cache and don't proceed until this has
246246 // completed.
247- "msr sctlr_el3, x10 " ,
247+ "msr sctlr_el3, x9 " ,
248248 "isb" ,
249249 "ret"
250250 ) ;
@@ -270,8 +270,8 @@ macro_rules! enable_mmu {
270270 ".global enable_mmu" ,
271271 "enable_mmu:" ,
272272 "mov_i x8, {MAIR_VALUE}" ,
273- "mov_i x10, {SCTLR_VALUE}" ,
274- "mov_i x9 , {TCR_VALUE}" ,
273+ "mov_i x9 {SCTLR_VALUE}" ,
274+ "mov_i x10 , {TCR_VALUE}" ,
275275 "adrp x11, {pagetable}" ,
276276
277277 "b {enable_mmu_el1}" ,
@@ -309,8 +309,8 @@ macro_rules! enable_mmu {
309309 ".global enable_mmu" ,
310310 "enable_mmu:" ,
311311 "mov_i x8, {MAIR_VALUE}" ,
312- "mov_i x10 , {SCTLR_VALUE}" ,
313- "mov_i x9 , {TCR_VALUE}" ,
312+ "mov_i x9 , {SCTLR_VALUE}" ,
313+ "mov_i x10 , {TCR_VALUE}" ,
314314 "adrp x11, {pagetable}" ,
315315
316316 "b {enable_mmu_el2}" ,
@@ -348,8 +348,8 @@ macro_rules! enable_mmu {
348348 ".global enable_mmu" ,
349349 "enable_mmu:" ,
350350 "mov_i x8, {MAIR_VALUE}" ,
351- "mov_i x10 , {SCTLR_VALUE}" ,
352- "mov_i x9 , {TCR_VALUE}" ,
351+ "mov_i x9 , {SCTLR_VALUE}" ,
352+ "mov_i x10 , {TCR_VALUE}" ,
353353 "adrp x11, {pagetable}" ,
354354
355355 "b {enable_mmu_el3}" ,
@@ -387,23 +387,23 @@ macro_rules! enable_mmu {
387387 ".global enable_mmu" ,
388388 "enable_mmu:" ,
389389 "mov_i x8, {MAIR_VALUE}" ,
390- "mov_i x10 , {SCTLR_VALUE}" ,
390+ "mov_i x9 , {SCTLR_VALUE}" ,
391391 "adrp x11, {pagetable}" ,
392392
393393 "mrs x12, CurrentEL" ,
394394 "ubfx x12, x12, #2, #2" ,
395395
396396 "cmp x12, #3" ,
397397 "b.ne 0f" ,
398- "mov_i x9 , {TCR_EL3_VALUE}" ,
398+ "mov_i x10 , {TCR_EL3_VALUE}" ,
399399 "b {enable_mmu_el3}" ,
400400 "0:" ,
401401 "cmp x12, #2" ,
402402 "b.ne 1f" ,
403- "mov_i x9 , {TCR_EL2_VALUE}" ,
403+ "mov_i x10 , {TCR_EL2_VALUE}" ,
404404 "b {enable_mmu_el2}" ,
405405 "1:" ,
406- "mov_i x9 , {TCR_EL1_VALUE}" ,
406+ "mov_i x10 , {TCR_EL1_VALUE}" ,
407407 "b {enable_mmu_el1}" ,
408408
409409 ".purgem mov_i" ,
0 commit comments