[RFC PATCH 0/7] Linux on Apple Silicon
Mohamed Mediouni
mohamed.mediouni at caramail.com
Wed Jan 20 08:27:10 EST 2021
This patch series contains the changes for a minimal
Linux on Apple Silicon boot, including SMP.
(sorry for the resubmission, I didn't attach the drivers
to the ones beforehand, and didn't submit it properly)
The changes:
- Support for FIQ interrupts in-kernel
This is required for the timer and IPIs on Apple SoCs.
- WFI hook
Apple processors do not keep register state across WFI.
As such, put a mechanism in cpu_ops to put a custom
sleep function instead.
- use nGnRnE instead of nGnRE on Apple processors
Device-nGnRE writes go to nowhere on Apple processors, as
such use MAIR to change those to Device-nGnRE writes.
- Apple AIC driver
Driver for the Apple AIC interrupt controller.
- Apple CPU start driver
On Apple Macs, RVBAR is locked by the bootloader.
And the hardware doesn't have EL3 to provide PSCI
as an option either. This also implements the workaround
for WFI on the hardware.
What is not present:
- Device tree, will be present in a future version of this
patchset
- More devices.
Thank you,
Mohamed Mediouni (1):
arm64: mm: use nGnRnE instead of nGnRE on Apple processors
Stan Skowronek (6):
arm64: kernel: FIQ support
arm64: kernel: Add a WFI hook.
irqchip/apple-aic: Add support for Apple AIC
arm64/Kconfig: Add Apple Silicon SoC platform
arm64: kernel: Apple CPU start driver
irqchip/apple-aic: add SMP support to the Apple AIC driver.
.../devicetree/bindings/arm/cpus.yaml | 1 +
.../interrupt-controller/apple,aic.yaml | 49 +++
MAINTAINERS | 6 +
arch/arm64/Kconfig.platforms | 7 +
arch/arm64/include/asm/arch_gicv3.h | 2 +-
arch/arm64/include/asm/assembler.h | 8 +-
arch/arm64/include/asm/cpu_ops.h | 2 +
arch/arm64/include/asm/daifflags.h | 4 +-
arch/arm64/include/asm/irq.h | 4 +
arch/arm64/include/asm/irqflags.h | 6 +-
arch/arm64/kernel/Makefile | 1 +
arch/arm64/kernel/apple_cpustart.c | 153 ++++++++
arch/arm64/kernel/cpu_ops.c | 6 +
arch/arm64/kernel/entry.S | 74 +++-
arch/arm64/kernel/irq.c | 14 +
arch/arm64/kernel/process.c | 13 +-
arch/arm64/mm/proc.S | 26 ++
drivers/irqchip/Kconfig | 6 +
drivers/irqchip/Makefile | 1 +
drivers/irqchip/irq-apple-aic.c | 364 ++++++++++++++++++
20 files changed, 728 insertions(+), 19 deletions(-)
create mode 100644 Documentation/devicetree/bindings/interrupt-controller/apple,aic.yaml
create mode 100644 arch/arm64/kernel/apple_cpustart.c
create mode 100644 drivers/irqchip/irq-apple-aic.c
--
2.29.2
More information about the linux-arm-kernel
mailing list