From patchwork Thu Jun 6 13:36:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Fancellu X-Patchwork-Id: 13688516 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 3B606C25B75 for ; Thu, 6 Jun 2024 13:37:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nd5oHS99x0xxKSNnDBqwfWwdY5sH6Zfq9tvh6q+wleE=; b=kqgqmgTiFQQGP4 DCLSlQjnZmHztiNENpHCpTU6fXGRI0Az7AxX2VgdTgW/NsVPCbwQHDOYSk8dpTrvYW1n0ZHrT10CI M21KiSPmfrZGKYs3bHK2beuYGxAYr12eBz++5ZWwbKhn7BWkaujvCamC0xL0vxtlplxig1/yx9qay cXpGQ1oJT6VVHydgKoWiOXhAVbQ6Y5Q5Xa6NYrpkkCtfUhpeENTvwViAg2f/V6Y72bLCY4ZU4/tU7 xVx5vaPYzhh/7f23hlssDFVGH/TdS6y/2YNll/8ZJqu0KXOA/fxASRqYdT1YM6DQk9Xh8kAkzcsZp kvWe7C1iQ9ibOS0NYS+A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFDIQ-00000009vYX-0ZA6; Thu, 06 Jun 2024 13:36:50 +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 1sFDIJ-00000009vSr-27re for linux-arm-kernel@lists.infradead.org; Thu, 06 Jun 2024 13:36:45 +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 70D08339; Thu, 6 Jun 2024 06:37:04 -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 A0A8A3F792; Thu, 6 Jun 2024 06:36:39 -0700 (PDT) From: Luca Fancellu To: linux-arm-kernel@lists.infradead.org Cc: diego.sueiro@arm.com Subject: [boot-wrapper 1/7] aarch64: Rename labels and prepare for lower EL booting Date: Thu, 6 Jun 2024 14:36:22 +0100 Message-Id: <20240606133628.3330423-2-luca.fancellu@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240606133628.3330423-1-luca.fancellu@arm.com> References: <20240606133628.3330423-1-luca.fancellu@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240606_063643_627572_1F11DA2C X-CRM114-Status: UNSURE ( 8.81 ) 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 The current code can boot from a lower EL than EL3, but the flag 'flag_no_el3' have the meaning of "Don't drop to a lower EL", so rename the flag to flag_keep_el. This is a preparation work to boot on Armv8-R AArch64 which has no EL3. Signed-off-by: Luca Fancellu Reviewed-by: Andre Przywara --- arch/aarch64/boot.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/aarch64/boot.S b/arch/aarch64/boot.S index da5fa6548b65..7727475925c1 100644 --- a/arch/aarch64/boot.S +++ b/arch/aarch64/boot.S @@ -92,7 +92,7 @@ reset_no_el3: bl setup_stack mov w0, #1 - ldr x1, =flag_no_el3 + ldr x1, =flag_keep_el str w0, [x1] bl cpu_init_bootwrapper @@ -124,7 +124,7 @@ ASM_FUNC(jump_kernel) bl find_logical_id bl setup_stack // Reset stack pointer - ldr w0, flag_no_el3 + ldr w0, flag_keep_el cmp w0, #0 // Prepare Z flag mov x0, x20 @@ -133,7 +133,7 @@ ASM_FUNC(jump_kernel) mov x3, x23 b.eq 1f - br x19 // No EL3 + br x19 // Keep EL 1: mov x4, #SPSR_KERNEL @@ -151,5 +151,5 @@ ASM_FUNC(jump_kernel) .data .align 3 -flag_no_el3: +flag_keep_el: .long 0