diff options
author | Oleksij Rempel <o.rempel@pengutronix.de> | 2018-11-27 10:19:29 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-12-13 08:09:13 +0100 |
commit | 4c76513e7d294bfbb0b3a28119c41849aed389f0 (patch) | |
tree | 519ba510730d02be9a8c3204c1b40ca654928e45 /arch/mips | |
parent | b54b69853af95b61435f257ac1d5fab325553799 (diff) | |
download | barebox-4c76513e7d294bfbb0b3a28119c41849aed389f0.tar.gz barebox-4c76513e7d294bfbb0b3a28119c41849aed389f0.tar.xz |
MIPS: start: preserve DTB pointer for later use
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>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/boot/start.S | 7 |
1 files changed, 7 insertions, 0 deletions
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 |