Page:
HW:SMP spin up
Pages
"When will Asahi Linux be done?"
Apple Platform Security Crash Course
Apple Silicon Subsystems
Broken Software
Codenames
Devices
Differences with other platforms
Display Controllers
Distro:Boot process guide
Distro:Differences from Arch Linux ARM
FAQ
FW:ADT
Feature Support
Glossary
HW: Clocks
HW: SPRR and GXF
HW:ACE3
HW:AGX
HW:AIC
HW:ANE
HW:AOP
HW:APCIe
HW:ARM System Registers Dumps
HW:ARM System Registers
HW:ASC
HW:AVD
HW:Apple Instructions
HW:CPU debug registers
HW:Debug USB
HW:GPIO
HW:MacBook Pro keyboard backlight (FPWM0)
HW:Memory map
HW:SEP
HW:SMC
HW:SMP spin up
HW:USB PD
HW:WDT
Home
Installing Gentoo with LiveCD
Introduction to Apple Silicon
Kernel config notes for distros
Low level serial debug
M1 Series Feature Support
M1 vs. PC Boot
M2 Series Feature Support
M3 Series Feature Support
Open OS Ecosystem on Apple Silicon Macs
Partitioning cheatsheet
Project:References
RE:Kernelcache
Reference Asahi kernel config
SW:AGX driver notes
SW:Alternative Distros
SW:Boot
SW:DT bindings
SW:Getting started
SW:Hypervisor
SW:Keyboard Layouts
SW:MachO Boot Protocol
SW:NVRAM
SW:Speakers Test Cases
SW:Speakers
SW:Storage
SW:Ubuntu Asahi Gambas
SW:Ubuntu Asahi Godot
SW:Ubuntu Asahi Mesa
SW:Ubuntu Asahi Qemu
Software known to have issues with 16k page size
Tethered Boot Setup (For Developers)
Tethered boot setup on macOS
Trivia
U Boot
Undoing early speaker support hacks
Yaks in need of shaving
m1n1:Developer Guide
m1n1:User Guide
macOS Sonoma Boot Failures
perf on M1 systems
0
HW:SMP spin up
Nick Chan edited this page 2024-09-13 12:38:36 +08:00
Table of Contents
SMP spin-up
From the ADT:
/arm-io/pmgr[reg]
power manager registers- CPU start block is at a device-dependent offset to this register
- 0x30000 for A7-A8(X)
- 0xd4000 for A9(X)-A11
- 0x54000 for M1 series
- 0x34000 for M2 and M3
- 0x28000 for M2 Pro/Max
- 0x88000 for M3 Pro/Max
- For multi-die systems, each die has its own power manager registers.
The power manager registers for each die is at offset
die * 0x2000000000
from the registers of die 0.
- CPU start block is at a device-dependent offset to this register
/cpus/cpu<n>[cpu-impl-reg]
CPU implementation registers/cpus/cpu<n>[reg]
CPU startup information- Bits [0:7] holds the core id
- Bits [8:10] holds the cluster id
- Bits [11:14] holds the die id
A11 does not handle clusters properly, so both P and E CPUs are considered cluster 0. ECPUs are 0-3 while PCPUs are 4-5.
For old firmwares, /cpus/cpu<n>[cpu-impl-reg]
may not exist, in this case
/arm-io/reg[2*n+2]
can be used to find the location to write the start address.
CPU start registers in PMGR:
offset + 0x4: System-wide CPU core startup/active bitmask
offset + 0x8: Cluster 0 (e) CPU core startup
offset + 0xc: Cluster 1 (p) CPU core startup
Startup sequence
- Write start address to RVBAR at
cpu-impl-reg + 0x00
- This is locked for cpu0 by iBoot, other CPUs are free to change
- Set (1 << cpu) in
pmgr[offset + 0x4]
- This seems to be some kind of system-wide "core alive" signal. It is not required for the core to spin up, but without it AIC interrupts won't work, and probably other things.
- Set (1 << core) in
pmgr[(offset + 0x8) + 4*cluster]
(that's core from 0-3, cluster 0-1)- This starts up the core itself.
Core starts up at RVBAR. Chicken bits / etc must be applied as usual.
Feature Support:
Project related:
Platform documentation:
For users:
For developers:
- Yaks in need of shaving (HELP WANTED!)
- Tethered Boot Setup (For Developers)
- m1n1:User Guide Boot loader
- Hypervisor
- U-Boot
- Devicetree bindings
- Open OS ecosystem on Apple Silicon Macs
Wiki for the Asahi Linux project: https://asahilinux.org/