From: Erik M. <er...@us...> - 2001-09-24 17:50:46
|
Update of /cvsroot/blob/blob/src In directory usw-pr-cvs1:/tmp/cvs-serv24187 Modified Files: main.c Log Message: src and dst were swapped in do_reload(). Good spot from "prpplague". Index: main.c =================================================================== RCS file: /cvsroot/blob/blob/src/main.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- main.c 2001/09/18 20:23:24 1.13 +++ main.c 2001/09/24 17:50:41 1.14 @@ -578,36 +578,36 @@ static int do_reload(char *what) { - u32 *src = 0; u32 *dst = 0; + u32 *src = 0; int numWords; if(strcmp(what, "blob") == 0) { - src = (u32 *)BLOB_RAM_BASE; - dst = (u32 *)BLOB_START; + dst = (u32 *)BLOB_RAM_BASE; + src = (u32 *)BLOB_START; numWords = BLOB_LEN / 4; blob_status.blobSize = 0; blob_status.blobType = fromFlash; SerialOutputString("Loading blob from flash "); #ifdef PARAM_START } else if(strcmp(what, "param") == 0) { - src = (u32 *)PARAM_RAM_BASE; - dst = (u32 *)PARAM_START; + dst = (u32 *)PARAM_RAM_BASE; + src = (u32 *)PARAM_START; numWords = PARAM_LEN / 4; blob_status.paramSize = 0; blob_status.paramType = fromFlash; SerialOutputString("Loading paramater block from flash "); #endif } else if(strcmp(what, "kernel") == 0) { - src = (u32 *)KERNEL_RAM_BASE; - dst = (u32 *)KERNEL_START; + dst = (u32 *)KERNEL_RAM_BASE; + src = (u32 *)KERNEL_START; numWords = KERNEL_LEN / 4; blob_status.kernelSize = 0; blob_status.kernelType = fromFlash; SerialOutputString("Loading kernel from flash "); } else if(strcmp(what, "ramdisk") == 0) { - src = (u32 *)RAMDISK_RAM_BASE; - dst = (u32 *)INITRD_START; + dst = (u32 *)RAMDISK_RAM_BASE; + src = (u32 *)INITRD_START; numWords = INITRD_LEN / 4; blob_status.ramdiskSize = 0; blob_status.ramdiskType = fromFlash; @@ -619,7 +619,7 @@ return 0; } - MyMemCpy(src, dst, numWords); + MyMemCpy(dst, src, numWords); SerialOutputString(" done\n"); return 0; |