1
0
Fork 0
mirror of https://gitlab.com/bztsrc/bootboot.git synced 2023-02-13 20:54:32 -05:00

Fixed inline asm with ruined x0

This commit is contained in:
bzt 2019-02-11 20:24:56 +01:00
parent f1804cfccf
commit e112c9f4a2
2 changed files with 4 additions and 4 deletions

View file

@ -1746,8 +1746,8 @@ void bootboot_startcore()
asm volatile ("msr sctlr_el1, %0; isb" : : "r" (reg));
// set stack and call _start() in sys/core
asm volatile ( "mrs x0, mpidr_el1;"
"and x0, x0, #3;"
"sub x0, xzr, x0, lsl #10;" // sp = core_num * -1024
"mov sp, x0; mov x30, %0; ret" : : "r" (entrypoint));
asm volatile ( "mrs x2, mpidr_el1;"
"and x2, x2, #3;"
"sub x2, xzr, x2, lsl #10;" // sp = core_num * -1024
"mov sp, x2; mov x30, %0; ret" : : "r" (entrypoint));
}

Binary file not shown.