From patchwork Wed Jul 31 14:10:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Fancellu X-Patchwork-Id: 13748840 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 9CA8FC3DA7F for ; Wed, 31 Jul 2024 14:12:28 +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=a9Ri20i+7/cbyt2NkpgmYrr/iahdj4GZL6kcSM5i1Gw=; b=Z2n1CpyL5XU9pLoYo5KRj6dTTL kLXb1AOedtaHqzz2PSXNuwn7WZna+LSJeVjjdkRsaxNXDG/y8H09c0rR44LpZoECxgyI8XYRyVjlE WVl8ZJoLnihrwXiYAPRFrg42I7pVJcWgJjRyKF9Lr83ppHqFM+JQgv2TaNfQWl0DOY42vM7gKn4MS H9LlXf7HF+6PG5/LRAt7HYmakIVXOP1NDIL6szqOhacSpYzF/4Xq5ZeuERJmkFlgPpdSvSLGRKVz4 GXe58TYOz2W27PuW5QUSJG7W06OdzPS5o18keDxPg2SDrEdRN9hBg9eChI1RAArVIk/crEIqZ/1bQ x54FTciQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZA3r-00000001Qbj-2gpg; Wed, 31 Jul 2024 14:12: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 1sZA2t-00000001QD6-28aT for linux-arm-kernel@lists.infradead.org; Wed, 31 Jul 2024 14:11:17 +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 330DE1007; Wed, 31 Jul 2024 07:11:38 -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 E11BF3F5A1; Wed, 31 Jul 2024 07:11:11 -0700 (PDT) From: Luca Fancellu To: mark.rutland@arm.com, andre.przywara@arm.com Cc: linux-arm-kernel@lists.infradead.org Subject: [boot-wrapper v3 0/4] Add Armv8-R AArch64 support Date: Wed, 31 Jul 2024 15:10:59 +0100 Message-Id: <20240731141103.2559706-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-20240731_071115_630502_D5083787 X-CRM114-Status: UNSURE ( 9.11 ) 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 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 | 69 ++++++++++++++++++++++++++++++++-- configure.ac | 20 ++++++++-- 5 files changed, 118 insertions(+), 7 deletions(-)