]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mx31: Fix boot hang by avoiding vector relocation
authorFabio Estevam <fabio.estevam@freescale.com>
Mon, 23 Feb 2015 12:09:08 +0000 (09:09 -0300)
committerStefano Babic <sbabic@denx.de>
Mon, 2 Mar 2015 08:57:05 +0000 (09:57 +0100)
Since commit 3ff46cc42b9d73d0 ("arm: relocate the exception vectors") mx31
does not boot anymore.

Add a specific relocate_vectors macro that skips the vector relocation, as the
i.MX31 SoC does not provide RAM at the high vectors address (0xFFFF0000), and
(0x00000000) maps to ROM.

This allows mx31 to boot again.

Cc: Anatolij Gustschin <agust@denx.de>
Cc: Magnus Lilja <lilja.magnus@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
arch/arm/cpu/arm1136/mx31/Makefile
arch/arm/cpu/arm1136/mx31/relocate.S [new file with mode: 0644]

index 9670ed9382e48a5a936cd70a8f5522ec455afdd2..dcbd57065bbc239ee582a765180b1a89d619d6f8 100644 (file)
@@ -8,3 +8,7 @@
 obj-y  += generic.o
 obj-y  += timer.o
 obj-y  += devices.o
+
+ifndef CONFIG_SPL_BUILD
+obj-y  += relocate.o
+endif
diff --git a/arch/arm/cpu/arm1136/mx31/relocate.S b/arch/arm/cpu/arm1136/mx31/relocate.S
new file mode 100644 (file)
index 0000000..1c556df
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ *  relocate - i.MX31-specific vector relocation
+ *
+ *  Copyright (c) 2013  Albert ARIBAUD <albert.u.boot@aribaud.net>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <linux/linkage.h>
+
+/*
+ * The i.MX31 SoC is very specific with respect to exceptions: it
+ * does not provide RAM at the high vectors address (0xFFFF0000),
+ * thus only the low address (0x00000000) is useable; but that is
+ * in ROM, so let's avoid relocating the vectors.
+ */
+       .section        .text.relocate_vectors,"ax",%progbits
+
+ENTRY(relocate_vectors)
+
+       bx      lr
+
+ENDPROC(relocate_vectors)