summaryrefslogtreecommitdiff
path: root/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-norelocate_irqvec_cpy.patch
diff options
context:
space:
mode:
authorPaul Sokolovsky <pmiscml@gmail.com>2007-06-14 04:51:44 +0000
committerPaul Sokolovsky <pmiscml@gmail.com>2007-06-14 04:51:44 +0000
commit998f6f792ea953caf0ca7ab8b7fbe858d68a510f (patch)
tree90754e0b123fbf58fc099648a68eae3dda0f8004 /packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-norelocate_irqvec_cpy.patch
parent60dfd703b4c5180533ec14102c276fc4fb70a5a3 (diff)
parent1d4ca5c243ec65cf27ec1d4d908163da029e6fcc (diff)
merge of '443650a5c3bfafa4e922391b71d87087c6b6f355'
and 'a59cc92c385b66015a1eb53d505bf4f139187778'
Diffstat (limited to 'packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-norelocate_irqvec_cpy.patch')
-rw-r--r--packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-norelocate_irqvec_cpy.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-norelocate_irqvec_cpy.patch b/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-norelocate_irqvec_cpy.patch
new file mode 100644
index 0000000000..0d5a49771d
--- /dev/null
+++ b/packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-norelocate_irqvec_cpy.patch
@@ -0,0 +1,32 @@
+If we've somehow magically make u-boot end up in RAM (JTAG, ...), then that RAM
+is mapped to 0x30000000 and not 0, so we need to copy the interrupt vectors, etc.
+
+Index: u-boot/cpu/arm920t/start.S
+===================================================================
+--- u-boot.orig/cpu/arm920t/start.S
++++ u-boot/cpu/arm920t/start.S
+@@ -332,7 +332,23 @@ done_nand_read:
+ strb r1, [r0]
+ #endif /* CONFIG_S3C2410_NAND_BOOT */
+ done_relocate:
+-#endif /* CONFIG_SKIP_RELOCATE_UBOOT */
++
++#if defined(CONFIG_USE_IRQ) && defined(CONFIG_S3C2410)
++ /* In the case of the S3C2410, if we've somehow magically (JTAG, ...)
++ ended up in RAM, then that ram is mapped to 0x30000000 and not 0.
++ So we need to copy the interrupt vectors, etc. */
++
++ mov r0, #0
++ ldr r1, _TEXT_BASE
++ mov r2, #0x40
++irqvec_cpy_next:
++ ldr r3, [r1], #4
++ str r3, [r0], #4
++ subs r2, r2, #4
++ bne irqvec_cpy_next
++#endif /* CONFIG_USE_IRQ */
++
++#endif /* !CONFIG_SKIP_RELOCATE_UBOOT */
+
+ /* Set up the stack */
+ stack_setup: