From patchwork Tue Jul 16 14:29:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Fancellu X-Patchwork-Id: 13734555 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3445CC3DA49 for ; Tue, 16 Jul 2024 14:30:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=h1J/Mq+0P7rIxt1ZpXhIpPTTvmlYSsNcxBjmaK8IhpY=; b=CIBI8CITILWNmqhJ2EWfbsWYK6 ba1zM43KtLrFqPIDd7hfA+Qb+qynCbsdXniwKnfDSgb+qh1D5kDK0bmWTyD42QtR0waQ8JbFvELpZ O2xy4F+tqDuvoc42RPRfEUoLfwE7qVx1Pntetj9V6IVSSkls28VnCn1qyBJjZqlN7st+dVmrQUylW P1Sn+N3LpbEJXMjXN7kpAaUWRPm0cZXX6otJn7R1ScLvew8i20yksfUgNuRB/qqgwVt3iV1NPFMYe CYhXA887xH4Qd+D+4rR9bGiXSo0g9pxMt5OEzBMyT8wi2jOKCnFGsAejZKGTkYyaHlZARLgv+7XFa zttwti2w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTjC3-0000000AinB-0bqr; Tue, 16 Jul 2024 14:30:15 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTjBF-0000000AiFe-0D12 for linux-arm-kernel@lists.infradead.org; Tue, 16 Jul 2024 14:29:27 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BC9101063; Tue, 16 Jul 2024 07:29:47 -0700 (PDT) Received: from e125770.cambridge.arm.com (e125770.arm.com [10.1.199.43]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C687F3F762; Tue, 16 Jul 2024 07:29:21 -0700 (PDT) From: Luca Fancellu To: andre.przywara@arm.com, mark.rutland@arm.com Cc: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 0/6] Add Armv8-R AArch64 support Date: Tue, 16 Jul 2024 15:29:00 +0100 Message-Id: <20240716142906.1502802-1-luca.fancellu@arm.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240716_072925_161854_E875C660 X-CRM114-Status: UNSURE ( 8.15 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Currently, we cannot boot Linux with boot-wrapper on Armv8-R AArch64: 1. The Armv8-R AArch64 profile does not support the EL3. 2. The Armv8-R AArch64 EL2 only supports a PMSA, which Linux does not support. So it's necessary to drop into EL1 before entering the kernel. 3. There is no EL2 booting code for Armv8-R AArch64 and no configuration for dropping to EL1 in boot-wrapper. These patches enable boot-wrapper booting Linux with Armv8-R AArch64. This is a rework and rebase of a serie already present upstream [1], apart from patch 3 which is addressing a small bug and patch 6 and 7 which are introducing support for PSCI boot through hvc conduit and Xen boot under Armv8-R AArch64. [1] https://patchwork.kernel.org/project/linux-arm-kernel/cover/20210525062509.201464-1-jaxson.han@arm.com/ Changes from v1: - Dropped patch 4 regarding GIC changes, it's not needed anymore. Luca Fancellu (6): aarch64: Rename labels and prepare for lower EL booting aarch64: Prepare for lower EL booting aarch64: Remove TSCXT bit set from SCTLR_EL2_RESET aarch64: Introduce EL2 boot code for Armv8-R AArch64 aarch64: Support PSCI for Armv8-R AArch64 aarch64: Start Xen on Armv8-R at EL2 Makefile.am | 6 ++- arch/aarch64/boot.S | 75 ++++++++++++++++++++++++++++++---- arch/aarch64/include/asm/cpu.h | 15 ++++++- arch/aarch64/init.c | 44 ++++++++++++++++++-- configure.ac | 16 +++++--- 5 files changed, 138 insertions(+), 18 deletions(-)