arm64: Fix MPID load instruction for secondary cores

Change to load MPID for secondary cores adding offset macro
BOOT_PARAM_MPID_OFFSET.

Currently the code load MPID for secondary cores from offset 0x0
of the struct arm64_cpu_boot_params, it's working as currently
the macro BOOT_PARAM_MPID_OFFSET has value 0x0, but when the
location of the member "mpid" is changed, it can result in SMP
booting failure and the build assert won't throw out any warning.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
This commit is contained in:
Hou Zhiqiang 2021-04-26 16:32:15 +08:00 committed by Anas Nashif
commit 9681034875

View file

@ -115,7 +115,7 @@ SECTION_SUBSEC_FUNC(TEXT,_reset_section,__start)
/* loop until our turn comes */
1: dmb ld
ldr x2, [x0]
ldr x2, [x0, #BOOT_PARAM_MPID_OFFSET]
cmp x1, x2
bne 1b