summaryrefslogtreecommitdiffstats
path: root/meta/packages/uboot/u-boot-mkimage-openmoko-native/uboot-s3c2410-norelocate_irqvec_cpy.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/uboot/u-boot-mkimage-openmoko-native/uboot-s3c2410-norelocate_irqvec_cpy.patch')
-rw-r--r--meta/packages/uboot/u-boot-mkimage-openmoko-native/uboot-s3c2410-norelocate_irqvec_cpy.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/meta/packages/uboot/u-boot-mkimage-openmoko-native/uboot-s3c2410-norelocate_irqvec_cpy.patch b/meta/packages/uboot/u-boot-mkimage-openmoko-native/uboot-s3c2410-norelocate_irqvec_cpy.patch
new file mode 100644
index 0000000000..0d5a49771d
--- /dev/null
+++ b/meta/packages/uboot/u-boot-mkimage-openmoko-native/uboot-s3c2410-norelocate_irqvec_cpy.patch
@@ -0,0 +1,32 @@
1If we've somehow magically make u-boot end up in RAM (JTAG, ...), then that RAM
2is mapped to 0x30000000 and not 0, so we need to copy the interrupt vectors, etc.
3
4Index: u-boot/cpu/arm920t/start.S
5===================================================================
6--- u-boot.orig/cpu/arm920t/start.S
7+++ u-boot/cpu/arm920t/start.S
8@@ -332,7 +332,23 @@ done_nand_read:
9 strb r1, [r0]
10 #endif /* CONFIG_S3C2410_NAND_BOOT */
11 done_relocate:
12-#endif /* CONFIG_SKIP_RELOCATE_UBOOT */
13+
14+#if defined(CONFIG_USE_IRQ) && defined(CONFIG_S3C2410)
15+ /* In the case of the S3C2410, if we've somehow magically (JTAG, ...)
16+ ended up in RAM, then that ram is mapped to 0x30000000 and not 0.
17+ So we need to copy the interrupt vectors, etc. */
18+
19+ mov r0, #0
20+ ldr r1, _TEXT_BASE
21+ mov r2, #0x40
22+irqvec_cpy_next:
23+ ldr r3, [r1], #4
24+ str r3, [r0], #4
25+ subs r2, r2, #4
26+ bne irqvec_cpy_next
27+#endif /* CONFIG_USE_IRQ */
28+
29+#endif /* !CONFIG_SKIP_RELOCATE_UBOOT */
30
31 /* Set up the stack */
32 stack_setup: