]> git.karo-electronics.de Git - karo-tx-uboot.git/commitdiff
Blackfin: kill off LDR jump block
authorMike Frysinger <vapier@gentoo.org>
Sat, 18 Oct 2008 08:04:49 +0000 (04:04 -0400)
committerMike Frysinger <vapier@gentoo.org>
Mon, 23 Mar 2009 19:14:54 +0000 (15:14 -0400)
The Boot ROM uses EVT1 as the entry point so set that rather than having
to use a tiny jump block in the default EVT1 location.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
blackfin_config.mk
board/bf533-ezkit/u-boot.lds.S
board/bf533-stamp/u-boot.lds.S
board/bf537-stamp/u-boot.lds.S
board/bf561-ezkit/u-boot.lds.S
cpu/blackfin/cpu.c
cpu/blackfin/initcode.c

index f3fcd7a0749dcb99c7fe00aa11f6af8ee16795d7..04a75290dd750749316521725aaa52ac73b3a824 100644 (file)
@@ -36,6 +36,7 @@ endif
 
 SYM_PREFIX = _
 
+LDR_FLAGS += -J
 LDR_FLAGS += --bmode $(subst BFIN_BOOT_,,$(CONFIG_BFIN_BOOT_MODE))
 LDR_FLAGS += --use-vmas
 ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS)
index da16726d868cbcd6050bd169fc7a1d624b1bc2d8..f80f8944b1a643ad81b5f5cce590ce13268449a4 100644 (file)
 
 OUTPUT_ARCH(bfin)
 
-/* The 0xC offset is so we don't clobber the tiny LDR jump block. */
 MEMORY
 {
        ram     : ORIGIN = CONFIG_SYS_MONITOR_BASE, LENGTH = CONFIG_SYS_MONITOR_LEN
-       l1_code : ORIGIN = L1_INST_SRAM+0xC, LENGTH = L1_INST_SRAM_SIZE
-       l1_data : ORIGIN = L1_DATA_B_SRAM,   LENGTH = L1_DATA_B_SRAM_SIZE
+       l1_code : ORIGIN = L1_INST_SRAM,            LENGTH = L1_INST_SRAM_SIZE
+       l1_data : ORIGIN = L1_DATA_B_SRAM,          LENGTH = L1_DATA_B_SRAM_SIZE
 }
 
 ENTRY(_start)
index 76daa75c0d6bae1990f5a34e9dc7d0a4258972ea..8ddfa81dad0dc6487ab596597765d0c946ba2724 100644 (file)
 
 OUTPUT_ARCH(bfin)
 
-/* The 0xC offset is so we don't clobber the tiny LDR jump block. */
 MEMORY
 {
        ram     : ORIGIN = CONFIG_SYS_MONITOR_BASE, LENGTH = CONFIG_SYS_MONITOR_LEN
-       l1_code : ORIGIN = L1_INST_SRAM+0xC, LENGTH = L1_INST_SRAM_SIZE
-       l1_data : ORIGIN = L1_DATA_B_SRAM,   LENGTH = L1_DATA_B_SRAM_SIZE
+       l1_code : ORIGIN = L1_INST_SRAM,            LENGTH = L1_INST_SRAM_SIZE
+       l1_data : ORIGIN = L1_DATA_B_SRAM,          LENGTH = L1_DATA_B_SRAM_SIZE
 }
 
 ENTRY(_start)
index 76daa75c0d6bae1990f5a34e9dc7d0a4258972ea..8ddfa81dad0dc6487ab596597765d0c946ba2724 100644 (file)
 
 OUTPUT_ARCH(bfin)
 
-/* The 0xC offset is so we don't clobber the tiny LDR jump block. */
 MEMORY
 {
        ram     : ORIGIN = CONFIG_SYS_MONITOR_BASE, LENGTH = CONFIG_SYS_MONITOR_LEN
-       l1_code : ORIGIN = L1_INST_SRAM+0xC, LENGTH = L1_INST_SRAM_SIZE
-       l1_data : ORIGIN = L1_DATA_B_SRAM,   LENGTH = L1_DATA_B_SRAM_SIZE
+       l1_code : ORIGIN = L1_INST_SRAM,            LENGTH = L1_INST_SRAM_SIZE
+       l1_data : ORIGIN = L1_DATA_B_SRAM,          LENGTH = L1_DATA_B_SRAM_SIZE
 }
 
 ENTRY(_start)
index 3d0453e2f20fde5d511d29d481eea8b5232f466d..4220e8190de431aa0dfa5b8ee557db298134f0ba 100644 (file)
 
 OUTPUT_ARCH(bfin)
 
-/* The 0xC offset is so we don't clobber the tiny LDR jump block. */
 MEMORY
 {
        ram     : ORIGIN = CONFIG_SYS_MONITOR_BASE, LENGTH = CONFIG_SYS_MONITOR_LEN
-       l1_code : ORIGIN = L1_INST_SRAM+0xC, LENGTH = L1_INST_SRAM_SIZE
-       l1_data : ORIGIN = L1_DATA_B_SRAM,   LENGTH = L1_DATA_B_SRAM_SIZE
+       l1_code : ORIGIN = L1_INST_SRAM,            LENGTH = L1_INST_SRAM_SIZE
+       l1_data : ORIGIN = L1_DATA_B_SRAM,          LENGTH = L1_DATA_B_SRAM_SIZE
 }
 
 ENTRY(_start)
index 30c214be7bc370268257fcaf4eac0af119be2a47..c2ff8cd8c6dd354134bf3ae0e32375afafcb080b 100644 (file)
@@ -25,18 +25,12 @@ ulong bfin_poweron_retx;
 __attribute__ ((__noreturn__))
 void cpu_init_f(ulong bootflag, ulong loaded_from_ldr)
 {
-       /* Build a NOP slide over the LDR jump block.  Whee! */
-       serial_early_puts("NOP Slide\n");
-       char nops[0xC];
-       memset(nops, 0x00, sizeof(nops));
-       extern char _stext_l1;
-       memcpy(&_stext_l1 - sizeof(nops), nops, sizeof(nops));
-
        if (!loaded_from_ldr) {
                /* Relocate sections into L1 if the LDR didn't do it -- don't
                 * check length because the linker script does the size
                 * checking at build time.
                 */
+               extern char _stext_l1;
                serial_early_puts("L1 Relocate\n");
                extern char _stext_l1, _etext_l1, _stext_l1_lma;
                memcpy(&_stext_l1, &_stext_l1_lma, (&_etext_l1 - &_stext_l1));
index 3f3b4796c11a3534b6911493fc52fc1c9163fa74..342b96ab8f1001fd148692af545f9757f1986af7 100644 (file)
@@ -372,6 +372,10 @@ void initcode(ADI_BOOT_DATA *bootstruct)
        bfin_write_SIC_IWR(-1);
 #endif
 
+       /* tell the bootrom where our entry point is */
+       if (CONFIG_BFIN_BOOT_MODE != BFIN_BOOT_BYPASS)
+               bfin_write_EVT1(CONFIG_SYS_MONITOR_BASE);
+
        serial_putc('>');
        serial_putc('\n');