Commit fb82fea06403d7d7b064b9ef7acc9c62dcd52850
1 parent
bf9525e9
Clear BEV and ERL for the fake bootloader.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2609 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
4 additions
and
1 deletions
hw/mips_malta.c
@@ -654,8 +654,10 @@ static void main_cpu_reset(void *opaque) | @@ -654,8 +654,10 @@ static void main_cpu_reset(void *opaque) | ||
654 | /* The bootload does not need to be rewritten as it is located in a | 654 | /* The bootload does not need to be rewritten as it is located in a |
655 | read only location. The kernel location and the arguments table | 655 | read only location. The kernel location and the arguments table |
656 | location does not change. */ | 656 | location does not change. */ |
657 | - if (env->kernel_filename) | 657 | + if (env->kernel_filename) { |
658 | + env->CP0_Status &= ~((1 << CP0St_BEV) | (1 << CP0St_ERL)); | ||
658 | load_kernel (env); | 659 | load_kernel (env); |
660 | + } | ||
659 | } | 661 | } |
660 | 662 | ||
661 | static | 663 | static |
@@ -709,6 +711,7 @@ void mips_malta_init (int ram_size, int vga_ram_size, int boot_device, | @@ -709,6 +711,7 @@ void mips_malta_init (int ram_size, int vga_ram_size, int boot_device, | ||
709 | env->kernel_cmdline = kernel_cmdline; | 711 | env->kernel_cmdline = kernel_cmdline; |
710 | env->initrd_filename = initrd_filename; | 712 | env->initrd_filename = initrd_filename; |
711 | kernel_entry = load_kernel(env); | 713 | kernel_entry = load_kernel(env); |
714 | + env->CP0_Status &= ~((1 << CP0St_BEV) | (1 << CP0St_ERL)); | ||
712 | write_bootloader(env, bios_offset, kernel_entry); | 715 | write_bootloader(env, bios_offset, kernel_entry); |
713 | } else { | 716 | } else { |
714 | snprintf(buf, sizeof(buf), "%s/%s", bios_dir, BIOS_FILENAME); | 717 | snprintf(buf, sizeof(buf), "%s/%s", bios_dir, BIOS_FILENAME); |