From: Minkyu Kang <mk7.kang@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2, RFC] armv7: fixloop: don't fixup if location is invalid on RAM
Date: Tue, 04 Jan 2011 17:52:14 +0900 [thread overview]
Message-ID: <4D22DFBE.8090503@samsung.com> (raw)
In-Reply-To: <AANLkTikMdk3D99mEtpLP6ZDb+5WiorN3Qqm-84LkgN6p@mail.gmail.com>
Need to check that location is valid on RAM before the fixup.
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
---
arch/arm/cpu/armv7/start.S | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S
index 684f2d2..a052378 100644
--- a/arch/arm/cpu/armv7/start.S
+++ b/arch/arm/cpu/armv7/start.S
@@ -195,6 +195,11 @@ copy_loop:
add r3, r3, r0 /* r3 <- rel dyn end in FLASH */
fixloop:
ldr r0, [r2] /* r0 <- location to fix up, IN FLASH! */
+ ldr r7, _TEXT_BASE
+ cmp r0, r7
+ blo fixskip
+ cmp r0, r6
+ bhs fixskip
add r0, r0, r9 /* r0 <- location to fix up in RAM */
ldr r1, [r2, #4]
and r7, r1, #0xff
@@ -217,6 +222,7 @@ fixrel:
add r1, r1, r9
fixnext:
str r1, [r0]
+fixskip:
add r2, r2, #8 /* each rel.dyn entry is 8 bytes */
cmp r2, r3
blo fixloop
--
1.7.1
next prev parent reply other threads:[~2011-01-04 8:52 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-27 10:27 [U-Boot] [PATCH RFC] armv7: fixloop: don't fixup if location is NULL Minkyu Kang
[not found] ` <AANLkTikMdk3D99mEtpLP6ZDb+5WiorN3Qqm-84LkgN6p@mail.gmail.com>
2011-01-04 8:52 ` Minkyu Kang [this message]
2011-01-04 9:49 ` [U-Boot] [PATCH v2, RFC] armv7: fixloop: don't fixup if location is invalid on RAM Joakim Tjernlund
2011-01-04 10:04 ` Minkyu Kang
2011-01-04 10:31 ` Joakim Tjernlund
2011-01-04 11:02 ` Minkyu Kang
2011-01-04 16:23 ` Joakim Tjernlund
2011-01-04 17:02 ` Albert ARIBAUD
2011-01-05 5:27 ` Minkyu Kang
2011-01-08 7:43 ` Albert ARIBAUD
2011-01-08 10:32 ` [U-Boot] [PATCH RFC] armv7: fixloop: don't fixup if location is NULL Andreas Bießmann
2011-01-08 10:49 ` Albert ARIBAUD
2011-01-08 12:18 ` Albert ARIBAUD
2011-01-08 16:44 ` Joakim Tjernlund
2011-01-08 16:51 ` Andreas Bießmann
2011-01-09 9:00 ` Albert ARIBAUD
2011-01-09 21:26 ` Andreas Bießmann
2011-01-10 7:31 ` Minkyu Kang
2011-01-10 10:20 ` Wolfgang Denk
2011-01-10 11:30 ` Minkyu Kang
2011-01-10 12:14 ` Wolfgang Denk
2011-01-10 14:04 ` Minkyu Kang
2011-01-10 17:21 ` Albert ARIBAUD
2011-01-11 10:57 ` Minkyu Kang
2011-01-11 11:03 ` Wolfgang Denk
2011-01-11 11:13 ` Minkyu Kang
2011-01-11 11:23 ` Wolfgang Denk
2011-01-11 13:00 ` Andreas Bießmann
2011-01-11 13:07 ` Andreas Bießmann
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=4D22DFBE.8090503@samsung.com \
--to=mk7.kang@samsung.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.