From patchwork Thu Oct 17 09:55:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Fancellu X-Patchwork-Id: 13839806 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 6A0B2D21274 for ; Thu, 17 Oct 2024 10:18:59 +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=lQaVQEiFdDcstGhTtifL4VidZ9KqH2bEXo3U6e6BiPQ=; b=p1AkwTcF85ag7gVI6mBZEeHfya EIBX/GBQp0d6sZyujSrPlEfL1QNpEMNdL8Ea/3fAnYFk6nWSScDCishLGNPLhyNT5hpZ6urqwriCj ajEIAWUlkVqsUWqtKtDQi6lDpGyTUe52N3PGTbTxjDXxbdMkl3uahUVgGTM0k1Uo7jiCEluEFD5ZE IZkEDWcVTfJIpfxSgKRxkFni7FMP2a0jfFYeXJ3IEN+nlGZmnWfjaO3XPMBqkOxVtEM9sYpHvDpOU trHfAOlKyhVIa4FygrEcD/VS7OwMEPvUgWaS6a50Vl2JAwV+vGcfqEJ5EMFJ8VXtd5mJmslq8QinP 0dJta8Ng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t1Nai-0000000EUox-1uJy; Thu, 17 Oct 2024 10:18:48 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t1NEA-0000000ER0h-2y4p for linux-arm-kernel@lists.infradead.org; Thu, 17 Oct 2024 09:55:35 +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 02D2BFEC; Thu, 17 Oct 2024 02:55:58 -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 B55DF3F71E; Thu, 17 Oct 2024 02:55:27 -0700 (PDT) From: Luca Fancellu To: mark.rutland@arm.com, andre.przywara@arm.com Cc: linux-arm-kernel@lists.infradead.org Subject: [boot-wrapper v4 0/4] Add Armv8-R AArch64 support Date: Thu, 17 Oct 2024 10:55:16 +0100 Message-Id: <20241017095520.939464-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-20241017_025530_821140_53547BB7 X-CRM114-Status: UNSURE ( 8.80 ) 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 work took inspiration from a serie already present upstream [1]. [1] https://patchwork.kernel.org/project/linux-arm-kernel/cover/20210525062509.201464-1-jaxson.han@arm.com/ Changes from v3: - rebase on current master - detailed changes on each patch Changes from v2: - Now this work is based on this serie: https://patchwork.kernel.org/project/linux-arm-kernel/cover/20240729161501.1806271-1-mark.rutland@arm.com/ Given the major rework, dropped every R-by. Changes from v1: - Dropped patch 4 regarding GIC changes, it's not needed anymore. Luca Fancellu (4): Introduce --with-bw-arch for boot-wrapper compile arch aarch64: Enable Armv8-R EL2 boot aarch64: Implement PSCI for Armv8-R aarch64: Start Xen on Armv8-R at EL2 Makefile.am | 7 ++- arch/aarch64/boot.S | 5 ++ arch/aarch64/include/asm/cpu.h | 24 ++++++++++ arch/aarch64/init.c | 83 ++++++++++++++++++++++++++++++++-- configure.ac | 20 ++++++-- 5 files changed, 130 insertions(+), 9 deletions(-)