mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
baremetal: arm multicore attempt
This commit is contained in:
27
README.adoc
27
README.adoc
@@ -10419,7 +10419,13 @@ help architecture
|
||||
|
||||
shows ARM version up to `armv6`, so maybe `armv6` is not implemented?
|
||||
|
||||
=== ARM exception level
|
||||
=== ARM baremetal
|
||||
|
||||
In this section we will focus on learning ARM architecture concepts that can only learnt on baremetal setups.
|
||||
|
||||
Userland information can be found at: https://github.com/cirosantilli/arm-assembly-cheat
|
||||
|
||||
==== ARM exception level
|
||||
|
||||
ARM exception levels are analogous to x86 <<ring0,rings>>.
|
||||
|
||||
@@ -10491,6 +10497,25 @@ output:
|
||||
3
|
||||
....
|
||||
|
||||
==== ARM multicore
|
||||
|
||||
TODO get working: CPU1 not waking up:
|
||||
|
||||
....
|
||||
./run --arch aarch64 --baremetal arch/aarch64/no_bootloader/multicore
|
||||
....
|
||||
|
||||
Source: link:baremetal/arch/aarch64/no_bootloader/multicore.S[]
|
||||
|
||||
CPU 0 of this program enters a spinlock loop: it repeatedly checks if a given memory address is `1`.
|
||||
|
||||
So, we need CPU 1 to come to the rescue to that memory address be `1`, otherwise CPU 0 will be stuck there forever.
|
||||
|
||||
Bibliography:
|
||||
|
||||
* https://stackoverflow.com/questions/20055754/arm-start-wakeup-bringup-the-other-cpu-cores-aps-and-pass-execution-start-addre
|
||||
* https://stackoverflow.com/questions/980999/what-does-multicore-assembly-language-look-like/33651438#33651438
|
||||
|
||||
=== How we got some baremetal stuff to work
|
||||
|
||||
It is nice when thing just work.
|
||||
|
||||
Reference in New Issue
Block a user