summaryrefslogtreecommitdiffstats
path: root/arch/arm/lib/relocate.S
diff options
context:
space:
mode:
authorrev13@wp.pl <rev13@wp.pl>2015-03-01 12:44:39 +0100
committerTom Rini <trini@konsulko.com>2015-04-22 12:14:55 -0400
commit12d8a729137ec58107236c472ddb14a819e7bd0b (patch)
tree9d4f065d21466e06071d29b1b86eb6d185f0dffb /arch/arm/lib/relocate.S
parent5d27223ea5424fc157c8ac0afb236bc8cfcd1772 (diff)
downloadtalos-obmc-uboot-12d8a729137ec58107236c472ddb14a819e7bd0b.tar.gz
talos-obmc-uboot-12d8a729137ec58107236c472ddb14a819e7bd0b.zip
ARM: Add ARMv7-M support
Signed-off-by: Kamil Lulko <rev13@wp.pl>
Diffstat (limited to 'arch/arm/lib/relocate.S')
-rw-r--r--arch/arm/lib/relocate.S13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/lib/relocate.S b/arch/arm/lib/relocate.S
index 92f531452d..475d503dd9 100644
--- a/arch/arm/lib/relocate.S
+++ b/arch/arm/lib/relocate.S
@@ -9,6 +9,9 @@
#include <asm-offsets.h>
#include <config.h>
#include <linux/linkage.h>
+#ifdef CONFIG_CPU_V7M
+#include <asm/armv7m.h>
+#endif
/*
* Default/weak exception vectors relocation routine
@@ -23,6 +26,15 @@
ENTRY(relocate_vectors)
+#ifdef CONFIG_CPU_V7M
+ /*
+ * On ARMv7-M we only have to write the new vector address
+ * to VTOR register.
+ */
+ ldr r0, [r9, #GD_RELOCADDR] /* r0 = gd->relocaddr */
+ ldr r1, =V7M_SCB_BASE
+ str r0, [r1, V7M_SCB_VTOR]
+#else
#ifdef CONFIG_HAS_VBAR
/*
* If the ARM processor has the security extensions,
@@ -47,6 +59,7 @@ ENTRY(relocate_vectors)
ldmia r0!, {r2-r8,r10}
stmia r1!, {r2-r8,r10}
#endif
+#endif
bx lr
ENDPROC(relocate_vectors)
OpenPOWER on IntegriCloud