[PATCH v3 04/10] MIPS: start: preserve DTB pointer for later use

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux