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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A3E9C433EF for ; Thu, 21 Oct 2021 14:47:26 +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 BAF116121F for ; Thu, 21 Oct 2021 14:47:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BAF116121F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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 2C4678346A; Thu, 21 Oct 2021 16:47:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org 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=kernel.org header.i=@kernel.org header.b="Sjef8zxQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7366C834D6; Thu, 21 Oct 2021 16:47:10 +0200 (CEST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id ED2F383499 for ; Thu, 21 Oct 2021 16:47:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id 510E761038; Thu, 21 Oct 2021 14:46:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634827619; bh=OYJu8vKRxj4hz+Yc+TovtJvBdBT4//xHI6GjY2Ap+IY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Sjef8zxQinPBcgpBXhFxY4uWQzkAzQ4hYM/QUeHWyMFh+uB2PJ00V9Gihjk83dArB 4rpmYz64aW1HYW/1bpetfrxNbTTL1tH3GoGo8xrog8aIiSd5IW7ZCBNsYzrdfDzJIq uzdS9WJ0TYP3voguCkMFOnGdBCAE/7kdsoFXWG/nyVtyoRA/8SU9GViqK8xJ14r7pR 8Zqf/1+NJkC/GLX0VnFXmLK5ZdRAZ2G55Nu0pWLRc0JhM7qFG/I48cYEADGQBE0tk2 /scUsq6GYqvqZXt3B5438VZ9Ge2cAwQ1/XGcZaiwNKxM+sHvL7eVMcjSYI4QL/b84K PPX9QrPSbx0HA== Received: by pali.im (Postfix) id 14CE785E; Thu, 21 Oct 2021 16:46:59 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Stefan Roese Cc: =?UTF-8?q?Marek=20Beh=C3=BAn?= , u-boot@lists.denx.de Subject: [PATCH 3/4] arm: mvebu: Add documentation for save_boot_params() function Date: Thu, 21 Oct 2021 16:46:08 +0200 Message-Id: <20211021144609.9319-4-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20211021144609.9319-1-pali@kernel.org> References: <20211021144609.9319-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Important detail is availability of kwbimage BIN header arguments passed via r0 and r1 registers by BootROM. Signed-off-by: Pali Rohár --- arch/arm/mach-mvebu/lowlevel_spl.S | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/mach-mvebu/lowlevel_spl.S b/arch/arm/mach-mvebu/lowlevel_spl.S index dde77b765214..39d42912c49f 100644 --- a/arch/arm/mach-mvebu/lowlevel_spl.S +++ b/arch/arm/mach-mvebu/lowlevel_spl.S @@ -3,6 +3,15 @@ #include #include +/* + * BootROM loads the header part of kwbimage into L2 cache. BIN header usually + * contains U-Boot SPL, optionally it can also contain additional arguments. + * The number of these arguments is in r0, pointer to the argument array in r1. + * BootROM expects executable BIN header code to return to address stored in lr. + * Other registers (r2 - r12) must be preserved. We save all registers to + * CONFIG_SPL_BOOTROM_SAVE address. BIN header arguments (passed via r0 and r1) + * are currently not used by U-Boot SPL binary. + */ ENTRY(save_boot_params) stmfd sp!, {r0 - r12, lr} /* @ save registers on stack */ ldr r12, =CONFIG_SPL_BOOTROM_SAVE -- 2.20.1