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:
parent
5d420cd983
commit
566a191715
6 changed files with 44 additions and 7 deletions
|
@ -59,12 +59,20 @@ VARIABLE (grub_arch_memsize)
|
|||
.long 0
|
||||
VARIABLE (grub_arch_highmemsize)
|
||||
.long 0
|
||||
#ifdef GRUB_MACHINE_MIPS_LOONGSON
|
||||
VARIABLE (grub_arch_machine)
|
||||
.long GRUB_ARCH_MACHINE_FULOONG
|
||||
#endif
|
||||
cont:
|
||||
/* Save our base. */
|
||||
move $s0, $ra
|
||||
|
||||
#ifdef GRUB_MACHINE_MIPS_QEMU_MIPS
|
||||
lui $t1, %hi(grub_arch_busclock)
|
||||
addiu $t1, %lo(grub_arch_busclock)
|
||||
sw $s4, 8($t1)
|
||||
#endif
|
||||
|
||||
#ifdef GRUB_MACHINE_MIPS_LOONGSON
|
||||
lui $t1, %hi(grub_arch_busclock)
|
||||
addiu $t1, %lo(grub_arch_busclock)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue