From: Erik M. <er...@us...> - 2001-10-14 22:37:46
|
Update of /cvsroot/blob/blob/src/blob In directory usw-pr-cvs1:/tmp/cvs-serv953 Modified Files: start.S Log Message: Fix bug in reblob code. If we're running from RAM, we can just skip the memory setup code and immediately do relocate the freshly downloaded blob. Index: start.S =================================================================== RCS file: /cvsroot/blob/blob/src/blob/start.S,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- start.S 2001/10/14 20:24:32 1.2 +++ start.S 2001/10/14 22:37:43 1.3 @@ -88,6 +88,10 @@ mov r1, #0x00 str r1, [r0, #ICMR] + /* if we're running from RAM, we don't want to setup and clear again */ + and r0, pc, #0xff000000 + teq r0, #0 + bne relocate /* switch CPU to correct speed */ ldr r0, PWR_BASE @@ -153,10 +157,10 @@ bne clear_loop +relocate: /* get a clue where we are running, so we know what to copy */ and r0, pc, #0xff000000 /* we don't care about the low bits */ - /* relocate the second stage loader */ add r2, r0, #(128 * 1024) /* blob is 128kB */ add r0, r0, #0x400 /* skip first 1024 bytes */ |