Prevent potential loss of memory map by overwrite on qemu-mips.

* grub-core/boot/mips/startup_raw.S [GRUB_MACHINE_MIPS_QEMU_MIPS]:
	Save ram size in $s4.
	* grub-core/kern/mips/qemu_mips/init.c (RAMSIZE): Removed.
	All users changed to grub_arch_memsize.
	* grub-core/kern/mips/startup.S (grub_arch_machine): Restrict to
	Loongson.
	[GRUB_MACHINE_MIPS_QEMU_MIPS]: Save grub_arch_memsize.
	* grub-core/loader/mips/linux.c (grub_linux_boot): Pass memory size.
	* include/grub/mips/qemu_mips/memory.h (grub_arch_memsize): New
	external variable.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-05-17 19:32:51 +02:00
parent 5d420cd983
commit 566a191715
6 changed files with 44 additions and 7 deletions

View file

@ -50,6 +50,11 @@ 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) | 0x80000000)
lw $s4, %lo (((16 << 20) - 264) | 0x80000000) ($t0)
#endif
#ifdef GRUB_MACHINE_MIPS_LOONGSON
move $s2, $zero
move $s3, $zero