From mboxrd@z Thu Jan 1 00:00:00 1970 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 F1A47C433F5 for ; Wed, 5 Jan 2022 00:35:35 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5325D830AF; Wed, 5 Jan 2022 01:35:24 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="maIijOVG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1B34C831E9; Wed, 5 Jan 2022 01:35:22 +0100 (CET) Received: from mail-qv1-xf32.google.com (mail-qv1-xf32.google.com [IPv6:2607:f8b0:4864:20::f32]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A5D2483094 for ; Wed, 5 Jan 2022 01:35:15 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mr.bossman075@gmail.com Received: by mail-qv1-xf32.google.com with SMTP id o10so35988957qvc.5 for ; Tue, 04 Jan 2022 16:35:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gp3QbPEoUdWU2T4bnVYm/weFG3FURlv/BSK8D2gWBzM=; b=maIijOVGMB/Hl13La55gnXTIQJvfBsR22gqZcw8+Jq/AiJwN/buS9kycT07aOrulc6 mVHglc8OLXnFmD6AKpZj0npbimqAW18fYuSB/GpUFgMVXDNDNdGP7Wk+3I11PAYlWSMa sKeWPKLRbLIO3PdhikaDjWdxGKY1/0zDgEMYvR4CjFf+Cn5/X90eHOZmdnwQN+mQJQHb DoOeYB98oFuR82qsWmmxjt3xIytT/pUcrvb8FzjcFuS0T7fpcFUKzG1pyGhAqHsjS+5I 5r3gxTMX/6z1wr3nRFImSjtvbwN1wyfLiVFE++woV4eyjO6XtETcZUhjEckKXiLBCdQf E3+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gp3QbPEoUdWU2T4bnVYm/weFG3FURlv/BSK8D2gWBzM=; b=Jq2MfqvIdLEChmC9tkFY7yEISaFLkdUvuYAun+Vgwy4kEcD9aLEkhzOmIjdGakKCtr kLmWYAdmnJpCIlBg+NWQUdLBTQkMMm9r2kSlJvn4OUW0cwUguWM9QKZobRIW82+NGTwD tJLJDG9+288s8iZdfZvxOp/PxelXpWGZzaYyDBudc4cx2Jqhs9R2sSuR6sqsmJcpAK1u KcSAlRVMCyjB+AwDerm1Oor1pZHqmNKtELKLPa0Ikap09HdLTCHo7cayG5I8I4IO5n3o GPPXuNEAWprXxNmdqx29tCT/dqJN60tH87bYCXzuUsvrBDiaY2MDnoCIc3ZNLLUy/Zdp caqQ== X-Gm-Message-State: AOAM532n1IKkoe3r/y+SxUd7ufchBLYa10pNIAJJFwn6ZOXzE49IS31z xrdUu6sVMw4WVFt7kOtMaKqe77vGx3A= X-Google-Smtp-Source: ABdhPJznNsi+hD7417Y4RrZEUxAPOzTOaVnL+kfaq0U8Wqy8GrvMjZIZmOe4nS5hRWHd/49KApxedA== X-Received: by 2002:ad4:596b:: with SMTP id eq11mr48588432qvb.101.1641342914291; Tue, 04 Jan 2022 16:35:14 -0800 (PST) Received: from jesse-desktop.jtp-bos.lab (146-115-144-188.s4282.c3-0.nwt-cbr1.sbo-nwt.ma.cable.rcncustomer.com. [146.115.144.188]) by smtp.gmail.com with ESMTPSA id x16sm33795029qkp.67.2022.01.04.16.35.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jan 2022 16:35:14 -0800 (PST) From: Jesse Taube X-Google-Original-From: Jesse Taube To: u-boot@lists.denx.de Cc: jagan@amarulasolutions.com, andre.przywara@arm.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, Mr.Bossman075@gmail.com, thirtythreeforty@gmail.com Subject: [PATCH 01/11] arm: arm926ej-s: start.S: port save_boot_params support from armv7 code Date: Tue, 4 Jan 2022 19:34:58 -0500 Message-Id: <20220105003508.1143140-2-Mr.Bossman075@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220105003508.1143140-1-Mr.Bossman075@gmail.com> References: <20220105003508.1143140-1-Mr.Bossman075@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 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 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 --- 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) -- 2.34.1