Index: sys/arch/aarch64/aarch64/locore.S =================================================================== RCS file: /cvsroot/src/sys/arch/aarch64/aarch64/locore.S,v retrieving revision 1.42 diff -u -p -w -b -r1.42 locore.S --- sys/arch/aarch64/aarch64/locore.S 19 Oct 2019 18:04:26 -0000 1.42 +++ sys/arch/aarch64/aarch64/locore.S 20 Oct 2019 12:13:56 -0000 @@ -379,9 +377,8 @@ ENTRY_NP(cpu_mpstart) /* set stack pointer for boot */ mov x1, #BOOT_AP_STACKSIZE mul x1, x1, x27 - ADDR x0, bootstk_cpus - sub sp, x0, x1 /* sp = bootstk_cpus-(BOOT_AP_STACKSIZE*cpuindex) */ - + ADDR x0, bootstk + add sp, x0, x1 /* sp = bootstk + (BOOT_AP_STACKSIZE * cpuindex) */ bl 1f 1: CPU_DPRINTREG("PC = ", lr) @@ -450,6 +446,8 @@ mp_vstart: * atomic_or_uint(&aarch64_cpu_mbox[cpuindex], 1) * to tell my activity to primary processor. */ + ADDR x0, _C_LABEL(aarch64_cpu_mbox) + add x28, x0, x27, lsl #2 /* x28 = &aarch64_cpu_mbox[cpuindex] */ mov x0, x28 mov x1, #1 bl _C_LABEL(atomic_or_uint) /* hatched! */ @@ -459,8 +457,8 @@ mp_vstart: /* wait for the mailbox start bit to become true */ 1: dmb sy - ldr x20, [x28] - tst x20, #2 + ldr w20, [x28] + tst w20, #2 bne 9f wfe b 1b @@ -1038,7 +1036,6 @@ bootstk: #ifdef MULTIPROCESSOR .space BOOT_AP_STACKSIZE * (MAXCPUS - 1) -bootstk_cpus: #endif .section ".init_pagetable", "aw", %nobits