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 68359C28CF5 for ; Wed, 26 Jan 2022 13:53:54 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1ECAC833DA; Wed, 26 Jan 2022 14:53:46 +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="efZzPNrr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7257283388; Wed, 26 Jan 2022 14:53:44 +0100 (CET) Received: from mail-qt1-x82f.google.com (mail-qt1-x82f.google.com [IPv6:2607:f8b0:4864:20::82f]) (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 4FF6B8326F for ; Wed, 26 Jan 2022 14:53:36 +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-x82f.google.com with SMTP id y17so27207184qtx.9 for ; Wed, 26 Jan 2022 05:53:36 -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=6omX7yBHgQIFxVt6B/UFVhqJnYmIf65Sf+W7iZzPRqM=; b=efZzPNrrpeq0xD1l8WhkOP0AILaBlFhj8DayCR6PazTnLbZg6xgHBJ3Q24f64/5mpD yHorZ4sinvd6Dxx2l5FbjARzpDxnTXjQGX48xW4fTdirAeU11rKhcYdNIcCXhY4PFEZ8 S2NRJszsvNsWaPKRypJ5HAQ5zB5hWV9OPJlm9TFD3ob9PPZ0NEF275JMfL3PICtzo1/S luEDqEudhmAv5oSfUDpINT8cWqJXWUMMVcY6n9CMu9HZEi49S4xEmDdMED0eI3/v2pSB WDUbuulT2hSpKYkz2CvjZfjXFP2CWmE8FKpQa4pcolAvrxBJ2QWEz5TlkMxVP0yRV6MI iHig== 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=6omX7yBHgQIFxVt6B/UFVhqJnYmIf65Sf+W7iZzPRqM=; b=i4D4gupbtRP/FeuRg3Tu7+eU0GjxS9mAfOdkbCCqPHsJmTfOZw8eBC+E28JjE1qwmu T+A8IL/y8cCpVlv0ynMVXl9U5S5M/7yhbkd/1rviywX01Xszaix4ElsRUEC9OdAmYw7T +ODNpONxp7+KJN9vSsQdCTL05ZLWTIQm8no4GZ3f6UcuSpm9R3eECPNbDhlQSvafBsOf xK9vIVSV9YZ1Xg6IyWsny1QcpDUzQJNPOdn0nelGQ61RsCCSJpN6AmvVK/GgBDBR0tiX 5NmAfneyRUGD/wDPpRdGPCuopSuQHqOWjEKDD8qD555iG8kFRw/BeOIXUHZLw+MQEAzQ gAvg== X-Gm-Message-State: AOAM531faLrpK2uPb/q+5naJPZiaE3CH0L/1Gy+zwn3ASYd6KO4H4zYG pO1n50qlWY3eBpyOrAFwVUA+ftF1EY0= X-Google-Smtp-Source: ABdhPJy+q91CkE7YV2Wa6pGiDvqDCzeYA/d5MfU63mZ1nKSL7GV70Y5GWRqxfYq6ymDWRSjkNTFFBg== X-Received: by 2002:ac8:58cd:: with SMTP id u13mr13708831qta.408.1643205215014; Wed, 26 Jan 2022 05:53:35 -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 bl1sm1969848qkb.16.2022.01.26.05.53.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jan 2022 05:53:34 -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 v2 01/12] arm: arm926ej-s: start.S: port save_boot_params support from armv7 code Date: Wed, 26 Jan 2022 08:53:18 -0500 Message-Id: <20220126135329.2997430-2-Mr.Bossman075@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220126135329.2997430-1-Mr.Bossman075@gmail.com> References: <20220126135329.2997430-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 Signed-off-by: Jesse Taube Reviewed-by: Andre Przywara --- V1->V2: * 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