baremetal aarch64: create C version of multicore.S as well

Attempted to do the same for arm, but it failed.
This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-08-21 00:00:00 +00:00
parent 6f88fa17bc
commit f28191a735
21 changed files with 336 additions and 89 deletions

View File

@@ -2,6 +2,11 @@
.global lkmc_start
lkmc_start:
/* Make all CPUs except CPU0 sleep by default. */
mrs x0, mpidr_el1
ands x0, x0, 3
bne lkmc_cpu_not_0
/* Load the vector table. */
ldr x0, =lkmc_vector_table
msr vbar_el1, x0
@@ -41,3 +46,8 @@ LKMC_WEAK(lkmc_vector_trap_handler)
bl abort
lkmc_vector_trap_handler_error_message:
.asciz "error: unexpected interrupt"
/* Default action for CPUs besides the first one: sleep forever. */
LKMC_WEAK(lkmc_cpu_not_0)
wfe
b lkmc_cpu_not_0