]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
copy modules backwards
authorphcoder <phcoder@debian.bg45.phnet>
Sun, 18 Oct 2009 14:10:42 +0000 (16:10 +0200)
committerphcoder <phcoder@debian.bg45.phnet>
Sun, 18 Oct 2009 14:10:42 +0000 (16:10 +0200)
kern/mips/startup.S

index b31b49331757f42950aaa7ee4ac6fb008c07616a..fca319e223f64d188fa9c0c1013193f718a8f1b6 100644 (file)
@@ -75,12 +75,18 @@ reloccont:
        
        lw $t3, (GRUB_KERNEL_CPU_TOTAL_MODULE_SIZE - BASE_ADDR)($ra)
 
+       /* Backward copy.  */
+       add $t1, $t1, $t3
+       add $t2, $t2, $t3
+       addiu $t1, $t1, 0xffff
+       addiu $t2, $t2, 0xffff
+
        /* $t2 is source. $t1 is destination. $t3 is size.  */
 modulesmovcont:
        lb $t4, 0($t2)
        sb $t4, 0($t1)
-       addiu $t1,$t1,1
-       addiu $t2,$t2,1
+       addiu $t1,$t1,0xffff
+       addiu $t2,$t2,0xffff
        addiu $t3, 0xffff
        bne $t3, $0, modulesmovcont