diff options
Diffstat (limited to 'hw/mips_r4k.c')
-rw-r--r-- | hw/mips_r4k.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/mips_r4k.c b/hw/mips_r4k.c index 1b6a801676..528ff2b8df 100644 --- a/hw/mips_r4k.c +++ b/hw/mips_r4k.c @@ -257,8 +257,9 @@ void mips_r4k_init (int ram_size, int vga_ram_size, int boot_device, if (linux_boot) { kernel_base = KERNEL_LOAD_ADDR; /* now we can load the kernel */ - kernel_size = load_image(kernel_filename, phys_ram_base + kernel_base); - if (kernel_size < 0) { + kernel_size = load_image(kernel_filename, + phys_ram_base + (kernel_base - 0x80000000)); + if (kernel_size == (target_ulong) -1) { fprintf(stderr, "qemu: could not load kernel '%s'\n", kernel_filename); exit(1); @@ -268,7 +269,7 @@ void mips_r4k_init (int ram_size, int vga_ram_size, int boot_device, initrd_base = INITRD_LOAD_ADDR; initrd_size = load_image(initrd_filename, phys_ram_base + initrd_base); - if (initrd_size < 0) { + if (initrd_size == (target_ulong) -1) { fprintf(stderr, "qemu: could not load initial ram disk '%s'\n", initrd_filename); exit(1); |