From: "Pali Rohár" <pali@kernel.org>
To: Stefan Roese <sr@denx.de>
Cc: "Marek Behún" <marek.behun@nic.cz>, 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 [thread overview]
Message-ID: <20211021144609.9319-4-pali@kernel.org> (raw)
In-Reply-To: <20211021144609.9319-1-pali@kernel.org>
Important detail is availability of kwbimage BIN header arguments passed
via r0 and r1 registers by BootROM.
Signed-off-by: Pali Rohár <pali@kernel.org>
---
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 <config.h>
#include <linux/linkage.h>
+/*
+ * 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
next prev parent reply other threads:[~2021-10-21 14:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-21 14:46 [PATCH 0/4] arm: mvebu: Fix usage of BIN header arguments Pali Rohár
2021-10-21 14:46 ` [PATCH 1/4] tools: kwboot: Align UART baudrate change code in BIN header to 128-bit boundary Pali Rohár
2021-10-22 6:47 ` Stefan Roese
2021-10-21 14:46 ` [PATCH 2/4] tools: kwbimage: Align BIN header executable code " Pali Rohár
2021-10-22 6:47 ` Stefan Roese
2021-10-21 14:46 ` Pali Rohár [this message]
2021-10-22 6:47 ` [PATCH 3/4] arm: mvebu: Add documentation for save_boot_params() function Stefan Roese
2021-10-21 14:46 ` [PATCH 4/4] arm: mvebu: Remove dummy BIN header arguments for SPL binary Pali Rohár
2021-10-22 6:48 ` Stefan Roese
2021-10-28 10:48 ` [PATCH 0/4] arm: mvebu: Fix usage of BIN header arguments Stefan Roese
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211021144609.9319-4-pali@kernel.org \
--to=pali@kernel.org \
--cc=marek.behun@nic.cz \
--cc=sr@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox