r665 - trunk/src/target/u-boot/patches

laforge at sita.openmoko.org laforge at sita.openmoko.org
Sun Feb 4 20:24:31 CET 2007


Author: laforge
Date: 2007-02-04 20:24:31 +0100 (Sun, 04 Feb 2007)
New Revision: 665

Added:
   trunk/src/target/u-boot/patches/uboot-s3c2410-norelocate_irqvec_cpy.patch
Log:
if we run from SDRAM, we need to 'down-relocate' our interrupt vectors into S3C2410 internal SRAM.


Added: trunk/src/target/u-boot/patches/uboot-s3c2410-norelocate_irqvec_cpy.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-s3c2410-norelocate_irqvec_cpy.patch	2007-02-04 19:23:55 UTC (rev 664)
+++ trunk/src/target/u-boot/patches/uboot-s3c2410-norelocate_irqvec_cpy.patch	2007-02-04 19:24:31 UTC (rev 665)
@@ -0,0 +1,31 @@
+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.git/cpu/arm920t/start.S
+===================================================================
+--- u-boot.git.orig/cpu/arm920t/start.S	2007-02-04 14:25:20.000000000 +0100
++++ u-boot.git/cpu/arm920t/start.S	2007-02-04 14:39:42.000000000 +0100
+@@ -277,6 +277,23 @@
+ 1:	b	1b
+ done_nand_read:
+ #endif /* NAND_BOOT */
++#else  /* 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
++	beq	irqvec_cpy_done
++	bne	irqvec_cpy_next
++irqvec_cpy_done:
++#endif /* CONFIG_USE_IRQ */
+ #endif	/* CONFIG_SKIP_RELOCATE_UBOOT */
+ 
+ 	/* Set up the stack						    */





More information about the commitlog mailing list