X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=arch%2Fnios2%2Fcpu%2Fstart.S;h=0f4ab286b925d19f87cca0247fd7aaae4d059215;hb=f9342e2c3e81d62e42393c0c1a8179c309ef3a20;hp=31cd5b004a0502d4ef38e6faa0ab3c4f86162aa0;hpb=37e4dafaae96ccc970a896f90186fadcf858aad0;p=u-boot diff --git a/arch/nios2/cpu/start.S b/arch/nios2/cpu/start.S index 31cd5b004a..0f4ab286b9 100644 --- a/arch/nios2/cpu/start.S +++ b/arch/nios2/cpu/start.S @@ -21,9 +21,8 @@ * MA 02111-1307 USA */ - +#include #include -#include #include /************************************************************************* @@ -34,6 +33,7 @@ .global _start _start: + wrctl status, r0 /* Disable interrupts */ /* ICACHE INIT -- only the icache line at the reset address * is invalidated at reset. So the init must stay within * the cache line size (8 words). If GERMS is used, we'll @@ -43,10 +43,9 @@ _start: ori r4, r0, %lo(CONFIG_SYS_ICACHELINE_SIZE) movhi r5, %hi(CONFIG_SYS_ICACHE_SIZE) ori r5, r5, %lo(CONFIG_SYS_ICACHE_SIZE) - mov r6, r0 -0: initi r6 - add r6, r6, r4 - bltu r6, r5, 0b +0: initi r5 + sub r5, r5, r4 + bgt r5, r0, 0b br _except_end /* Skip the tramp */ /* EXCEPTION TRAMPOLINE -- the following gets copied @@ -62,7 +61,6 @@ _except_end: /* INTERRUPTS -- for now, all interrupts masked and globally * disabled. */ - wrctl status, r0 /* Disable interrupts */ wrctl ienable, r0 /* All disabled */ /* DCACHE INIT -- if dcache not implemented, initd behaves as @@ -101,12 +99,12 @@ _cur: movhi r5, %hi(_cur - _start) 3: /* ZERO BSS/SBSS -- bss and sbss are assumed to be adjacent - * and between __bss_start and _end. + * and between __bss_start and __bss_end__. */ movhi r5, %hi(__bss_start) ori r5, r5, %lo(__bss_start) - movhi r6, %hi(_end) - ori r6, r6, %lo(_end) + movhi r6, %hi(__bss_end__) + ori r6, r6, %lo(__bss_end__) beq r5, r6, 5f 4: stwio r0, 0(r5) @@ -114,13 +112,6 @@ _cur: movhi r5, %hi(_cur - _start) bne r5, r6, 4b 5: - /* GLOBAL POINTER -- the global pointer is used to reference - * "small data" (see -G switch). The linker script must - * provide the gp address. - */ - movhi gp, %hi(_gp) - ori gp, gp, %lo(_gp) - /* JUMP TO RELOC ADDR */ movhi r4, %hi(_reloc) ori r4, r4, %lo(_reloc) @@ -204,14 +195,8 @@ dly_clks: bge r4, r0, dly_clks ret - -#if !defined(CONFIG_IDENT_STRING) -#define CONFIG_IDENT_STRING "" -#endif .data .globl version_string version_string: - .ascii U_BOOT_VERSION - .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")" - .ascii CONFIG_IDENT_STRING, "\0" + .ascii U_BOOT_VERSION_STRING, "\0"