mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
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:
@@ -2,6 +2,11 @@
|
||||
|
||||
.global lkmc_start
|
||||
lkmc_start:
|
||||
/* Make all CPUs except CPU0 sleep by default. */
|
||||
mrc p15, 0, r0, c0, c0, 5
|
||||
ands r0, r0, 3
|
||||
bne lkmc_cpu_not_0
|
||||
|
||||
/* Prepare the stack for main, mandatory for C code. */
|
||||
ldr sp, =stack_top
|
||||
|
||||
@@ -28,3 +33,8 @@ lkmc_start:
|
||||
|
||||
/* If main returns, exit. */
|
||||
bl exit
|
||||
|
||||
/* Default action for CPUs besides the first one: sleep forever. */
|
||||
LKMC_WEAK(lkmc_cpu_not_0)
|
||||
wfe
|
||||
b lkmc_cpu_not_0
|
||||
|
||||
Reference in New Issue
Block a user