From patchwork Mon Jul 29 16:14:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 13745261 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 03B9AC3DA4A for ; Mon, 29 Jul 2024 16:16:35 +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:References:In-Reply-To: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:List-Owner; bh=J6T97nShCpcFoHrVaJFzqsWMr3k0A7XqgoskZqG+0II=; b=fDIH2JZrS+tSoiI3BF9J5Wnm1i SnRtnTDC6imf4iULMtI3S+uoqCdmOXgcvoNF0wpo2mmOQHlIprKrWKnqO0KSWuKVDz+sh0C3k5TvP TjE90wGqPyoi0D5M92m8/OpVkVYfP7X+zRoWh+iRAGm0uSVTpHkUS3FEIfyKjP1hGLcQ9OvbapbZ6 voW4rHNOVOUqqLeiXyuqPWhcxyaizs0RzeFrlknMIHINnn32KhYBsBBMU8l+Y+0NbbrjVNkotBZDY FD9+59H2xv+YgR8XHzdaP81u1sO2MsQiR4O7lhPhCpqpgMMH6brQlZmZ6ovrnMzlL4LhULFg6jxOl LkIeidEw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYT2w-0000000Byaa-1Grb; Mon, 29 Jul 2024 16:16:26 +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 1sYT1l-0000000ByKR-3uYq for linux-arm-kernel@lists.infradead.org; Mon, 29 Jul 2024 16:15:15 +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 10C781007; Mon, 29 Jul 2024 09:15:39 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 93AB83F766; Mon, 29 Jul 2024 09:15:12 -0700 (PDT) From: Mark Rutland To: linux-arm-kernel@lists.infradead.org Cc: akos.denke@arm.com, andre.przywara@arm.com, luca.fancellu@arm.com, mark.rutland@arm.com, maz@kernel.org Subject: [BOOT-WRAPPER 02/11] aarch64: Remove redundant EL1 entry logic Date: Mon, 29 Jul 2024 17:14:52 +0100 Message-Id: <20240729161501.1806271-3-mark.rutland@arm.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240729161501.1806271-1-mark.rutland@arm.com> References: <20240729161501.1806271-1-mark.rutland@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240729_091514_041746_9E5F9C8F X-CRM114-Status: UNSURE ( 9.71 ) 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 For historical reasons the boot-wrapper has code to handle being entered at Non-secure EL1, but currently this is unsupported and cannot be used to boot a kernel as jump_kernel() unconditionally writes to SCTLR_EL2, which will UNDEF. Remove the logic for handling Non-secure EL1. Signed-off-by: Mark Rutland Cc: Akos Denke Cc: Andre Przywara Cc: Luca Fancellu Cc: Marc Zyngier --- arch/aarch64/boot.S | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/arch/aarch64/boot.S b/arch/aarch64/boot.S index b889137..51ef41b 100644 --- a/arch/aarch64/boot.S +++ b/arch/aarch64/boot.S @@ -31,10 +31,8 @@ ASM_FUNC(_start) b.eq reset_at_el3 cmp x0, #CURRENTEL_EL2 b.eq reset_at_el2 - cmp x0, #CURRENTEL_EL1 - b.eq reset_at_el1 - /* Booting at EL0 is not supported */ + /* Booting at EL1 or EL0 is not supported */ b . /* @@ -72,19 +70,6 @@ reset_at_el2: msr sctlr_el2, x0 isb - b reset_no_el3 - - /* - * EL1 initialization - */ -reset_at_el1: - mov_64 x0, SCTLR_EL1_RESET - msr sctlr_el1, x0 - isb - - b reset_no_el3 - -reset_no_el3: cpuid x0, x1 bl find_logical_id cmp x0, #MPIDR_INVALID