From 2ff5108b6f66bb0f3818a9ee83d1d786565b8b52 Mon Sep 17 00:00:00 2001 From: mokopatches Date: Fri, 11 Apr 2008 14:26:50 +0100 Subject: [PATCH] uboot-s3c2410-norelocate_irqvec_cpy.patch 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. --- cpu/arm920t/start.S | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/cpu/arm920t/start.S b/cpu/arm920t/start.S index 6c60b1c4..9fc145eb 100644 --- a/cpu/arm920t/start.S +++ b/cpu/arm920t/start.S @@ -369,6 +369,22 @@ done_nand_read: strb r1, [r0] #endif /* CONFIG_S3C2410_NAND_BOOT */ done_relocate: + +#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 */ #endif /* Set up the stack */ -- 2.11.4.GIT