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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 84222C433EF for ; Fri, 21 Jan 2022 01:58:07 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B04A6837FB; Fri, 21 Jan 2022 02:58:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id EA3BA83461; Fri, 21 Jan 2022 02:58:04 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id 506E583810 for ; Fri, 21 Jan 2022 02:58:01 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=andre.przywara@arm.com 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 270D8ED1; Thu, 20 Jan 2022 17:58:00 -0800 (PST) Received: from slackpad.fritz.box (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 57F653F774; Thu, 20 Jan 2022 17:57:57 -0800 (PST) Date: Fri, 21 Jan 2022 01:57:11 +0000 From: Andre Przywara To: Jesse Taube Cc: u-boot@lists.denx.de, jagan@amarulasolutions.com, hdegoede@redhat.com, sjg@chromium.org, icenowy@aosc.io, marek.behun@nic.cz, festevam@denx.de, narmstrong@baylibre.com, tharvey@gateworks.com, christianshewitt@gmail.com, pbrobinson@gmail.com, lokeshvutla@ti.com, jernej.skrabec@gmail.com, hs@denx.de, samuel@sholland.org, arnaud.ferraris@gmail.com, giulio.benetti@benettiengineering.com, thirtythreeforty@gmail.com, Chris Morgan Subject: Re: [PATCH 01/11] arm: arm926ej-s: start.S: port save_boot_params support from armv7 code Message-ID: <20220121015711.6caf13f3@slackpad.fritz.box> In-Reply-To: <20220105003508.1143140-2-Mr.Bossman075@gmail.com> References: <20220105003508.1143140-1-Mr.Bossman075@gmail.com> <20220105003508.1143140-2-Mr.Bossman075@gmail.com> Organization: Arm Ltd. X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.31; x86_64-slackware-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On Tue, 4 Jan 2022 19:34:58 -0500 Jesse Taube wrote: Hi, > From: Icenowy Zheng > > The ARMv7 start code has support for saving some boot params at the > entry point, which is used by some SoCs to return to BROM. > > Port this to ARM926EJ-S start code. > > Signed-off-by: Icenowy Zheng > Signed-off-by: Jesse Taube Reviewed-by: Andre Przywara Cheers, Andre > --- > arch/arm/cpu/arm926ejs/start.S | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > > diff --git a/arch/arm/cpu/arm926ejs/start.S b/arch/arm/cpu/arm926ejs/start.S > index 0afcc47aad..aca7793c57 100644 > --- a/arch/arm/cpu/arm926ejs/start.S > +++ b/arch/arm/cpu/arm926ejs/start.S > @@ -17,6 +17,7 @@ > #include > #include > #include > +#include > > /* > ************************************************************************* > @@ -32,8 +33,13 @@ > */ > > .globl reset > + .globl save_boot_params_ret > + .type save_boot_params_ret,%function > > reset: > + /* Allow the board to save important registers */ > + b save_boot_params > +save_boot_params_ret: > /* > * set the cpu to SVC32 mode > */ > @@ -110,3 +116,16 @@ flush_dcache: > #endif > mov pc, lr /* back to my caller */ > #endif /* CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) */ > + > +/************************************************************************* > + * > + * void save_boot_params(u32 r0, u32 r1, u32 r2, u32 r3) > + * __attribute__((weak)); > + * > + * Stack pointer is not yet initialized at this moment > + * Don't save anything to stack even if compiled with -O0 > + * > + *************************************************************************/ > +WEAK(save_boot_params) > + b save_boot_params_ret /* back to my caller */ > +ENDPROC(save_boot_params)