]> git.proxmox.com Git - grub2.git/blobdiff - grub-core/boot/mips/startup_raw.S
Implement grub_machine_get_bootlocation for ARC.
[grub2.git] / grub-core / boot / mips / startup_raw.S
index bbbc1dbece5001aee386f8d89f5fd3265979b5d0..606197624f0dfdb18140ea884cd12b10189b08c7 100644 (file)
@@ -196,6 +196,21 @@ do_check:
 argfw:
        not $s7, $a2
 cmdlinedone:   
+#endif
+#ifdef GRUB_MACHINE_ARC
+       lui $t0, %hi(_start - 256)
+       addiu $t0, $t0, %lo(_start - 256)
+       addiu $t3, $t0, 255
+       lw $t1, 0($a1)
+1:     
+       bne $t0, $t3, 2f
+        lb $t2, 0($t1)
+       move $t2, $zero
+2:
+       sb $t2, 0($t0)
+       addiu $t0, $t0, 1
+       bnez $t2, 1b
+        addiu $t1, $t1, 1
 #endif
        /* Copy the decompressor. */
        lui $t1, %hi(base)
@@ -253,10 +268,15 @@ cmdlinedone:
        lui $t0, %hi(EXT_C(grub_decompress_core))
        addiu $t0, $t0, %lo(EXT_C(grub_decompress_core))
 
+#ifdef GRUB_MACHINE_ARC
+       lui $sp, %hi(_start - 512)
+       jalr $t0
+        addiu $sp, $sp, %lo(_start - 512)
+#else
        lui $sp, %hi(_start - 256)
        jalr $t0
         addiu $sp, $sp, %lo(_start - 256)
-       
+#endif 
        move $a0, $s1
        move $a1, $s6