mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Oleksij Rempel <o.rempel@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Oleksij Rempel <o.rempel@pengutronix.de>
Subject: [PATCH v1 04/10] MIPS: start: preserve DTB pointer for later use
Date: Mon, 26 Nov 2018 10:18:01 +0100	[thread overview]
Message-ID: <20181126091807.19398-5-o.rempel@pengutronix.de> (raw)
In-Reply-To: <20181126091807.19398-1-o.rempel@pengutronix.de>

We will get DTB pointer in a0 register. Since a0 is used as argument by
other functions, we need to preserve it and then pass as argument to the
main_entry().

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
 arch/mips/boot/start.S | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/mips/boot/start.S b/arch/mips/boot/start.S
index e937e89af1..39ac9414d8 100644
--- a/arch/mips/boot/start.S
+++ b/arch/mips/boot/start.S
@@ -27,6 +27,10 @@ EXPORT(_start)
 
 	mips_barebox_10h
 
+	/* save dtb pointer */
+	move	s0, a0
+	move	s1, a1
+
 	/* disable watchpoints */
 	mtc0	zero, CP0_WATCHLO
 	mtc0	zero, CP0_WATCHHI
@@ -37,6 +41,9 @@ EXPORT(_start)
 
 	stack_setup
 
+	/* restore dtb pointer */
+	move	a0, s0
+	move	a1, s1
 	la	v0, main_entry
 	jal	v0
 	 nop
-- 
2.19.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2018-11-26  9:18 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-26  9:17 [PATCH v1 00/10] MIPS: migrate to multiimage support Oleksij Rempel
2018-11-26  9:17 ` [PATCH v1 01/10] images: piggy: use "a" instead of #alloc flag Oleksij Rempel
2018-11-26 12:25   ` Antony Pavlov
2018-11-26 13:00     ` Oleksij Rempel
2018-11-26  9:17 ` [PATCH v1 02/10] MIPS: add arch/mips/lib/pbl.lds.S Oleksij Rempel
2018-11-26  9:18 ` [PATCH v1 03/10] pbl: enable MIPS for PBL_RELOCATABLE Oleksij Rempel
2018-11-26  9:18 ` Oleksij Rempel [this message]
2018-11-26  9:18 ` [PATCH v1 05/10] MIPS: multiimage: add ENTRY_FUNCTION macros Oleksij Rempel
2018-11-26  9:18 ` [PATCH v1 06/10] MIPS: mutliimage: pass devicetree from PBL to the main_entry Oleksij Rempel
2018-11-26  9:18 ` [PATCH v1 07/10] MIPS: put main_entry to __bare_init section Oleksij Rempel
2018-11-26  9:18 ` [PATCH v1 08/10] MIPS: port all mach* to multiimage Oleksij Rempel
2018-11-26 12:13   ` Antony Pavlov
2018-11-26 13:02     ` Oleksij Rempel
2018-11-26 13:01   ` Antony Pavlov
2018-11-26 13:54     ` Oleksij Rempel
2018-11-26 14:15       ` Sascha Hauer
2018-11-26  9:18 ` [PATCH v1 09/10] MIPS: remove HAS_NO_BOARD_HL_CODE support Oleksij Rempel
2018-11-26  9:18 ` [PATCH v1 10/10] MIPS: multiimage: remove useless board files Oleksij Rempel
2018-11-26 12:22   ` Antony Pavlov
2018-11-26 13:01     ` Oleksij Rempel

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=20181126091807.19398-5-o.rempel@pengutronix.de \
    --to=o.rempel@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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