baremetal: all examples working, all failures accounted for!

SIMD&FP is now enabled in arm from bootloader.
This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-05-25 00:00:01 +00:00
parent 8825222579
commit add6eedb76
21 changed files with 181 additions and 90 deletions

View File

@@ -1,16 +1,17 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-multicore */
.global main
main:
mov r0, #0
#include <lkmc.h>
LKMC_PROLOGUE
mov r0, 0
ldr r1, =spinlock
str r0, [r1]
/* Get CPU ID. */
mrc p15, 0, r1, c0, c0, 5
ands r1, r1, #3
ands r1, r1, 3
beq cpu0_only
cpu1_only:
mov r0, #1
mov r0, 1
ldr r1, =spinlock
str r0, [r1]
dmb sy
@@ -22,17 +23,16 @@ cpu0_only:
#if !LKMC_GEM5
/* PSCI CPU_ON. */
ldr r0, =0x84000003
mov r1, #1
mov r1, 1
ldr r2, =cpu1_only
mov r3, #0
mov r3, 0
hvc 0
#endif
spinlock_start:
ldr r0, spinlock
wfe
cmp r0, #0
cmp r0, 0
beq spinlock_start
mov r0, #0
bx lr
LKMC_EPILOGUE
spinlock:
.skip 4