=================================================================== RCS file: /cvs/funnyos/arch/sam7s64/boot/loader.S,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- funnyos/arch/sam7s64/boot/loader.S 2007/11/12 15:49:18 1.5 +++ funnyos/arch/sam7s64/boot/loader.S 2007/11/12 21:56:12 1.6 @@ -1,5 +1,5 @@ /* - * $Id: loader.S,v 1.5 2007/11/12 15:49:18 nbrk Exp $ + * $Id: loader.S,v 1.6 2007/11/12 21:56:12 nbrk Exp $ */ /* * FunnyOS loader @@ -26,20 +26,22 @@ */ /* load .data addr */ - ldr r1, Asdata + ldr r1, Aflash_sdata /* load end of FLASH */ - ldr r2, Aedata + ldr r2, Aflash_edata - /* load addr in sram */ - ldr r3, Asram + /* will copy data in sram starting from that addr */ + ldr r3, Asram_sdata - /* copy data in sram */ + /* + * Copy data in sram + */ loop: - ldr r4, [r1], #4 /* fetch from flash */ - str r4, [r3], #4 /* store to sram */ - cmp r1, r3 /* compare with end of flash */ - bls loop + ldr r4, [r1], #4 /* fetch from flash, increment flash_sdata */ + str r4, [r3], #4 /* store to sram, increment sram_sdata */ + cmp r1, r2 /* compare with flash_edata */ + blo loop /* * Setup an IRQ stack @@ -92,13 +94,13 @@ _vector_fiq: nop -Asdata: +Aflash_sdata: .word 0x0000f000 -Aedata: +Aflash_edata: .word 0x0000ffff -Asram: +Asram_sdata: .word 0x00200000 /* last word of the physical memory */