From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A20CC433E0 for ; Wed, 20 Jan 2021 13:30:30 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 170AB23381 for ; Wed, 20 Jan 2021 13:30:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 170AB23381 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=caramail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=K+TbkAPr+J37Oq3CzpkMLGPsfUv3XxEFXFoG1NPrFlY=; b=zzhOe2/w88IrzKYHG8dPfD3noP SB6VqM2JoC7zdG8D3f4Vx0yZ152U3JC+XNVFmkh44vd5I4iIOcdCnpqB98RUiTACEasFsfWJYQzUt WgY3S0IFNQI1pR8D59EmTaUM46jsddMs5k+p4m09sTwiwt5A/KegdDg/YMB3RFxpPObHdJH0k5arp 7I0iji7zfAZzyHQpknSz+B6PTThgQjEMkLxjEu7unng+9CKFr92JK4gMtNpNBCi5jY0cc5Om01+C7 uIwpPuxxtrGP9ds+ZdjuWA45XFIJYCZA4a9mlAbmAewLpTLlwscMq+4WzXryytlUnqopVd/sv1HEs Tm27mJqg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2DX2-0004pb-Aj; Wed, 20 Jan 2021 13:28:20 +0000 Received: from mout.gmx.net ([212.227.15.15]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2DWU-0004do-Cg for linux-arm-kernel@lists.infradead.org; Wed, 20 Jan 2021 13:27:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1611149252; bh=ceTVrImy+Es10mPon21IC3Omv19YxsX/9oHQxEtGgFw=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=ixtkLUUeHLmQIAXp6mGO0HjHgkytEyVpJGEB/kplwJKKUvvLin0BpXyK56E3WbOuT qqPd1LR6mNzCrNK61WoXqzctZYiTORqYgoASVK8D19lgphf4kdZHzqXh9miSv9dxK5 Uaj53BHkQUtm8pYcfMADk6vB1MySe9wi5jccNQDU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([83.204.192.78]) by mail.gmx.net (mrgmx004 [212.227.17.184]) with ESMTPSA (Nemesis) id 1Mkpf3-1lk1fQ3rWp-00mHdY; Wed, 20 Jan 2021 14:27:32 +0100 From: Mohamed Mediouni To: linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH 0/7] Linux on Apple Silicon Date: Wed, 20 Jan 2021 14:27:10 +0100 Message-Id: <20210120132717.395873-1-mohamed.mediouni@caramail.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-Provags-ID: V03:K1:ys84d4BTU81Rm/QnLAC3amRyKhngCQyMKiWrDIO4eMhMsCepTGq 1U2R+HirE1JDuWUUEVJ6uUHSSsktaqkcochRD41a5EX9hZTBQBOIbkQC4RUGUK9wXAl5YxL 5MQ8kr2PHi5qh0ZIpQFyAG8Yl3KuvYikrnBdIeceG2YK2VtXFbWzwseHxDyMLCX8k24ZEEO Jg2MSioFhBL8iAb9EwFEQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:US5sarO3DCo=:zLrEk3etvw+JNExFNcnqCC 7ONWQR2mHQkbdrJ84Xsh0Yj7n83LBNMy2hKgSoyAsGq0wE89eJbVguDp4six2xJiYj0Z6MrvE ZtNCZDI3/bwy9MUT8/kypQLikr9LOQyudl7ziG+ROz1GMe7lOXr3YlP1Fd510xpNP6J4D1pas miMJaKI9y8dLUwGmSkUfAFYEEqLb/glvUZEVXJOCA0eiyIYGKmjwDNqsdWCIpkly9Dlg2cASv IdkYZka7jwQvqIF+0Mt9GqofcuWpwuES9h7O0iCByInsVboKk/Foc+mYCoajXwLLa4MG8vvMv ULWm+E5U7mA2igOvRJhg9LzOPb2lU++AxPObe6BRiW8iuCtpLIQVFhn3XbH1jqmG99r0O8d+6 oglCpVRDPSYCwTKbbYMCa5JiTmml4YMpZMkwKtSAp0/0Ewn+5lSmTRp1SlC8oSsVM/XLNixYb M8UjWY/geMhRGAyaWJIB9S7dzyMfVES3ffXu0ilziH7uNatF7BeLl2W7glzimY2qBPuFYMZK/ 0bBgrEy8jPNIX787HR+/v8g8DGuzAw14OhobzmV4fy4l7JYyQIbsxS7CdD86cCxw+QxfqsyGu oToPLB7DfF9n3wPmQ12hx4K0+TooEUGnF3FII/nho//h9cpoMethyfCb3Pq/OLovGUocgL14k Svj43rlSsYgYtXQATkqwgwdLxvc0mbXRzMZZud55+7KR/n/dVrBwC3xjCDHPXsW2zeEu/Z6wD jAUgyWkrrebYo6R06AvOZ2DbMARJ7tYO34CEU8XRyc6/IiOUaMNswoENTkZG0tj1x7C+HeNnr oIYgttZoF5lGCoZpi/APVLaS/QqZoeHefuxIE+rpgkBVgFeVZlack02hH2r4MSfNMCLtey1OM CUxaLPBKrn+6n/K1Kt6VPEeWxpk3s0FOBY324BsBU= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210120_082746_879170_96A03A8E X-CRM114-Status: GOOD ( 15.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Catalin Marinas , Hector Martin , linux-kernel@vger.kernel.org, Marc Zyngier , Mohamed Mediouni , Will Deacon Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel