From: Curt Brune <curt@cucy.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] ARM720t -- Relocating Exception Vectors
Date: Tue, 6 Jul 2004 17:28:17 -0700 [thread overview]
Message-ID: <20040706172817.B7626@cucy.com> (raw)
This patch is for cpu/arm720t/start.S -- The patch relocates the
exception vectors to RAM address 0x0.
See previous posting about relocating ARM exception vectors for a
discussion of the problem.
Cheers,
Curt
--
========================================================================
Curt Brune | Phone 1.650.380.2528 | Managing Principal
curt at cucy.com | WWW www.cucy.com | Cucy Systems
========================================================================
Cucy Systems -- Software. Integration. Training.
========================================================================
-------------- next part --------------
diff -purN new/u-boot/cpu/arm720t/start.S u-boot/cpu/arm720t/start.S
--- new/u-boot/cpu/arm720t/start.S 2004-07-01 09:30:47.000000000 -0700
+++ u-boot/cpu/arm720t/start.S 2004-07-06 16:57:34.000000000 -0700
@@ -160,6 +160,35 @@ clbss_l:str r2, [r0] /* clear loop...
cmp r0, r1
bne clbss_l
+ /*
+ * When using interrupts make sure the exception vectors are
+ * at address 0x0. It's possible that u-boot was relocated
+ * from FLASH (address 0x0) to RAM (address TEXT_BASE) and the
+ * FLASH re-mapped elsewhere. In this case the exception
+ * vectors would no longer be at address 0x0, they would be
+ * where ever FLASH and RAM were re-mapped to.
+ */
+ ldr r0, _TEXT_BASE
+ ldr r1, =0x0
+ cmp r0, r1 /* everything is fine if TEXT_BASE is 0x0 */
+ beq go_start
+
+ /*
+ * Otherwise copy the exception vectors (and associated data)
+ * from flash to 0x0.
+ */
+ adr r2, _start
+ adr r3, _fiq
+ sub r2, r3, r2
+ add r2, r2, #8
+
+vec_copy_loop:
+ ldr r4, [r0], #4
+ str r4, [r1], #4
+ cmp r2, r1
+ bne vec_copy_loop
+
+go_start:
ldr pc, _start_armboot
_start_armboot: .word start_armboot
next reply other threads:[~2004-07-07 0:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-07 0:28 Curt Brune [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-07-07 7:21 [U-Boot-Users] [PATCH] ARM720t -- Relocating Exception Vectors Friedrich, Lars
2004-07-07 14:37 ` Curt Brune
2004-07-07 17:33 ` Curt Brune
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=20040706172817.B7626@cucy.com \
--to=curt@cucy.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.