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 87C8CC433EF for ; Sat, 29 Jan 2022 15:23:35 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6F4C7836C4; Sat, 29 Jan 2022 16:23:25 +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="koI8+uti"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 115BC836B8; Sat, 29 Jan 2022 16:23:19 +0100 (CET) Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) (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 6C82E836AC for ; Sat, 29 Jan 2022 16:23:14 +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-qt1-x830.google.com with SMTP id y8so7697822qtn.8 for ; Sat, 29 Jan 2022 07:23:14 -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=CLcn87hoHXtycblDLRjf6jSo8SgNw6xyjblhcgeJHMo=; b=koI8+uti4zSeDnUhn7wHVGF/+yrgsxlPf1AVDTmt39xbSqIaE/x12psOkl8jskKv3M sRsa5eBqZYIiYX5SpeGRKHNtWbC0FHzIAr8LPbDPlfq3684P5kcBsJxtryYDWs/IVy13 Fh77blM6TY8ADAbWT+IB8dLyKt4466hweKzFPo1jLLNXktlnH2ZJdqKpfyVILWjMirEJ 8eBrrAdRMEEZCFnus61I+k+tYyiSEKrYbVL4ngug0mJKR6jWNjl7yx+FgDItBpA3DxqP e+1CuW00xuIiloEohrv23hEoRi68jW6QC8BwXostEiALBj/QmgBmFpIJGuLLB1qDN2/G IQeQ== 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=CLcn87hoHXtycblDLRjf6jSo8SgNw6xyjblhcgeJHMo=; b=uN9RQ7hgg8m2SKjjnbjbk58hcQcYXWXMr4avacfsw00O/hlG5ZhoDG96YEC/rVvfaq GSAXNYdErkMzoJSzzvvarfdKvcDKF7dHl7hEKY6qlrGN+KX9/iRi5cCl8TCkL49a0893 m9mMqkhto902Evezsg4KMMBWDbXKXdUTsqdyQZfsn4H5Wcj05BCDsIg/sSqxL36ceP9L 2qu5gQOvT/ydfdf5Km+9cSYFHUNBS5W7WUzyfMlxtoAEijCodvakAvzSqX9gnGH025jI Q5MbELI39dChiJHUhW5yw51uMLMWkRsfOqiUo6ZEeVFuQlz9P+HeOfeBmIOZoFuiEPBx NnSA== X-Gm-Message-State: AOAM533+hE2eQdo5yqadcA5V2K/6mJFu5xyqgy0ox7IuyWDNURfPLKe5 3RY0fqswc7Y8aFFR7HdJJeRXJVmRDWk= X-Google-Smtp-Source: ABdhPJy9jvfNwE+CgB+NG/enYCcTrTJSzO2sfG06wD9gr6QFlgsgZQPw07gwWlW/BEqx/I1S7QZ0Ow== X-Received: by 2002:ac8:7f0a:: with SMTP id f10mr9568483qtk.603.1643469793101; Sat, 29 Jan 2022 07:23:13 -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 c127sm5063124qkf.36.2022.01.29.07.23.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Jan 2022 07:23:12 -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, 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 v3 01/10] arm: arm926ej-s: start.S: port save_boot_params support from armv7 code Date: Sat, 29 Jan 2022 10:23:00 -0500 Message-Id: <20220129152309.1567937-2-Mr.Bossman075@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220129152309.1567937-1-Mr.Bossman075@gmail.com> References: <20220129152309.1567937-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.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.5 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 Reviewed-by: Andre Przywara Signed-off-by: Jesse Taube --- V1->V2: * Nothing done V2->V3: * Nothing done --- 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