Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01439C4338F for ; Sun, 25 Jul 2021 23:33:46 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 65D1B60EB4 for ; Sun, 25 Jul 2021 23:33:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 65D1B60EB4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=yifangu.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6F5178324B; Mon, 26 Jul 2021 01:33:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=yifangu.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 AF69883258; Mon, 26 Jul 2021 01:16:57 +0200 (CEST) Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com [209.85.160.181]) (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 E5DBB83245 for ; Mon, 26 Jul 2021 01:16:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=yifangu.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=gyf304@gmail.com Received: by mail-qt1-f181.google.com with SMTP id a19so5891758qtx.1 for ; Sun, 25 Jul 2021 16:16:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2Xf5G8P3D6WMn4IjXc/29chcm4ONtEO0Oa8f4Z5rMSI=; b=A6Budr31COAl7CiotVQZyl7DTMZvXjCf0gbC1Yxn3roTmTYgoTWRR3vIo6CRN8/i+R MXDA5CD0NY1wBkZyjPxXR3MKSf0wk44C6iWL03YT/ga6iE7ozhYYl+DNzQRBzfwGFYA2 CzvlOzn1gZBcUn+1SzTMo2Rdmgpt8tH2TSYk0xRMon7cBL+ds+PYyVqv3GhQeZQLlOvo n7emKiCLjrScJsmfYahVGmwhavB+tnAvKalaWZZnTBfwI8ANexgRJ88REnLrgNsj6A0n WnRK3li1285kC/rdKpK0tWIttLuSmIxjVRBB06FiN/jjt7/hqZe4HfCP8Yo3oHmXDJfZ UMWw== X-Gm-Message-State: AOAM53126S0tpqRB8XShB7jCrav/GFhioh0c7MjcSBibi/Jew6Yp9rAr cSeWmpkCoUTClD6j2cSpTgBOsvCUiCDO83Nt X-Google-Smtp-Source: ABdhPJwx4HfJhyv0buVeeYMgpG8WWEiQF1Snwtcu3H/im77JvgInvQvUtSuCFPJPvn/AV8P2fU8bKA== X-Received: by 2002:ac8:688f:: with SMTP id m15mr13021455qtq.65.1627254998488; Sun, 25 Jul 2021 16:16:38 -0700 (PDT) Received: from yifangu-Virtual-Machine.mshome.net (pool-100-6-159-43.pitbpa.fios.verizon.net. [100.6.159.43]) by smtp.gmail.com with ESMTPSA id u184sm17754694qkd.53.2021.07.25.16.16.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Jul 2021 16:16:38 -0700 (PDT) From: Yifan Gu To: u-boot@lists.denx.de Cc: Yifan Gu , Jagan Teki , Andre Przywara , Icenowy Zheng , George Hilliard Subject: [PATCH 01/27] arm: arm926ejs: start.S: port save_boot_params support from armv7 code Date: Sun, 25 Jul 2021 19:16:10 -0400 Message-Id: <20210725231636.879913-2-me@yifangu.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210725231636.879913-1-me@yifangu.com> References: <20210725231636.879913-1-me@yifangu.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Mon, 26 Jul 2021 01:32:10 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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: Yifan Gu --- 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 ff592ba810..9011afed3f 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_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.25.1