MIPS qemu flash support.

* grub-core/boot/mips/startup_raw.S [GRUB_MACHINE_MIPS_QEMU_MIPS]: Check
	magic.
	* grub-core/kern/mips/qemu_mips/init.c (probe_mem): New function.
	(grub_machine_init): Probe memory if its size isn't known.
	* util/grub-mkimage.c (image_targets): Add flash targets.
	(generate_image): Handle flash targets.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-07-05 21:42:36 +02:00
parent d734599439
commit 748ccabea1
4 changed files with 121 additions and 3 deletions

View file

@ -54,8 +54,22 @@ codestart:
/* Parse arguments. Has to be done before relocation.
So need to do it in asm. */
#ifdef GRUB_MACHINE_MIPS_QEMU_MIPS
lui $t0, %hi (((16 << 20) - 264 + 4) | 0x80000000)
lw $t1, %lo (((16 << 20) - 264 + 4) | 0x80000000) ($t0)
lui $t2, 0x1234
ori $t2, 0x5678
bne $t1, $t2, 1f
nop
lui $t0, %hi (((16 << 20) - 264) | 0x80000000)
lw $s4, %lo (((16 << 20) - 264) | 0x80000000) ($t0)
b 2f
lw $s4, %lo (((16 << 20) - 264) | 0x80000000) ($t0)
1:
li $s4, 0
2:
#endif
#ifdef GRUB_MACHINE_MIPS_LOONGSON