From: Antony Pavlov <antonynpavlov@gmail.com>
To: barebox@lists.infradead.org
Subject: [PATCH] MIPS: starts.S fixup
Date: Fri, 8 Jul 2011 11:29:27 +0400 [thread overview]
Message-ID: <1310110167-14431-1-git-send-email-antonynpavlov@gmail.com> (raw)
---
arch/mips/boot/start.S | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/arch/mips/boot/start.S b/arch/mips/boot/start.S
index 53077e9..6996b33 100644
--- a/arch/mips/boot/start.S
+++ b/arch/mips/boot/start.S
@@ -70,10 +70,14 @@ _start:
mtc0 zero, CP0_COUNT
mtc0 zero, CP0_COMPARE
- ADR a0, _start, t1 /* a0 <- current position of _start */
+ /* copy barebox to link location */
+ ADR a0, _start, t1 /* a0 <- pc-relative position of _start */
la a1, _start /* link (RAM) _start address */
+ beq a0, a1, clear_bss
+ nop
+
la t0, _start
la t1, __bss_start
subu t2, t1, t0 /* t2 <- size of barebox */
@@ -82,11 +86,13 @@ _start:
#define LONGSIZE 4
copy_loop:
- lw t4, LONGSIZE * 0(a0) # copy from source address [t0]
+ /* copy from source address [a0] */
+ lw t4, LONGSIZE * 0(a0)
lw t5, LONGSIZE * 1(a0)
lw t6, LONGSIZE * 2(a0)
lw t7, LONGSIZE * 3(a0)
- sw t4, LONGSIZE * 0(a1) # copy fo target address [t1]
+ /* copy fo target address [a1] */
+ sw t4, LONGSIZE * 0(a1)
sw t5, LONGSIZE * 1(a1)
sw t6, LONGSIZE * 2(a1)
sw t7, LONGSIZE * 3(a1)
@@ -100,7 +106,7 @@ clear_bss:
sw zero, (t0)
la t1, _end - 4
1:
- addiu t0, 4
+ addiu t0, LONGSIZE
sw zero, (t0)
bne t0, t1, 1b
nop
--
1.7.5.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
reply other threads:[~2011-07-08 7:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1310110167-14431-1-git-send-email-antonynpavlov@gmail.com \
--to=antonynpavlov@gmail.com \
--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