diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2009-11-14 01:04:29 +0100 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2009-11-14 01:11:27 +0100 |
commit | e16ad5b0442931e6b76be246cf9dd2866ce352c8 (patch) | |
tree | 53dafadd18607ae65b0e9106849d572d7aee45b3 /hw/mips_malta.c | |
parent | bc90ff774221e77fe0f8a319ceab3e1fe7169298 (diff) |
mips: fix CPU reset
Don't load the kernel twice during reset.
See f2d74978764f62d832d61ac17bb5d934ade58816.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'hw/mips_malta.c')
-rw-r--r-- | hw/mips_malta.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/mips_malta.c b/hw/mips_malta.c index 30fa6b8edb..a9b2c74d93 100644 --- a/hw/mips_malta.c +++ b/hw/mips_malta.c @@ -683,7 +683,7 @@ static void prom_set(int index, const char *string, ...) } /* Kernel */ -static int64_t load_kernel (CPUState *env) +static int64_t load_kernel (void) { int64_t kernel_entry, kernel_low, kernel_high; int index = 0; @@ -758,7 +758,6 @@ static void main_cpu_reset(void *opaque) location does not change. */ if (loaderparams.kernel_filename) { env->CP0_Status &= ~((1 << CP0St_BEV) | (1 << CP0St_ERL)); - load_kernel (env); } } @@ -843,8 +842,7 @@ void mips_malta_init (ram_addr_t ram_size, loaderparams.kernel_filename = kernel_filename; loaderparams.kernel_cmdline = kernel_cmdline; loaderparams.initrd_filename = initrd_filename; - kernel_entry = load_kernel(env); - env->CP0_Status &= ~((1 << CP0St_BEV) | (1 << CP0St_ERL)); + kernel_entry = load_kernel(); write_bootloader(env, qemu_get_ram_ptr(bios_offset), kernel_entry); } else { dinfo = drive_get(IF_PFLASH, 0, fl_idx); |