Hector Martin
a16731e8b3
hv_exc: Avoid delivering spurious HV-triggered IPIs to the guest
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-21 17:13:03 +09:00
Hector Martin
977cbdf4f8
hv_exc: New time accounting around Python callbacks
...
This does an explicit hypervisor rendezvous. It's not great because it
introduces spurious guest IPIs, but xnu doesn't seem to care...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-21 13:17:00 +09:00
Hector Martin
edb32c48a2
smp: Allow switching back to wfe for the smp spinloop
...
This is what Linux expects, so we'd better do it in kboot.
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-19 02:17:04 +09:00
Hector Martin
b1bc4023dc
smp: Use wfi and put idle CPUs in deep sleep
...
This allows a single active P-Core to boost to 3.2GHz.
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-17 00:15:52 +09:00
Hector Martin
90b10ef9f7
smp: Add smp_id() and use TPIDR_EL[12] to keep the SMP ID
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 23:19:37 +09:00
Hector Martin
571a19c9a3
smp: Align secondary_stacks & export to header
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-09-15 22:00:29 +09:00
Hector Martin
95542a4619
kboot: Handle missing CPUs properly
...
This is necessary to boot Linux in UP mode if we're in EL1 and the HV
does not support SMP yet.
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-05-04 01:52:58 +09:00
Hector Martin
fcdf2aede9
smp: Print success message on CPU#0
...
SMP secondary prints only go to UART, so we need something on the main
CPU for other iodev consoles.
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-04-17 16:45:19 +09:00
Hector Martin
234a511e35
kboot: add spin-table and SMP support
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-02-05 02:58:08 +09:00
Hector Martin
e35ef6eb8c
smp: fix IRQs on secondary CPUs
...
Seems one of the registers is some kind of system-level CPU spinup flag,
without which the CPU runs but the rest of the system thinks it's still
dead.
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-02-05 02:58:08 +09:00
Hector Martin
c3c6e4e8f9
smp: add scaffolding and proxy funcs for cross-CPU calls
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-01-29 00:36:46 +09:00
Hector Martin
eae3d06e85
smp: fix totally broken stack setup
...
This worked by accident before...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-01-28 23:48:35 +09:00
Hector Martin
cffc423024
smp: use ADT data instead of hardcoded info
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-01-28 23:48:35 +09:00
Hector Martin
3733ea153f
smp: fix broken spin-table routine
...
Only read target_cpu once, then keep a pointer our spin table.
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-01-28 23:48:35 +09:00
Hector Martin
d762391a68
Add code to spin up secondary CPUs
...
Signed-off-by: Hector Martin <marcan@marcan.st>
2021-01-28 16:06:12 +09:00