Commit de12d6369bec323e9198c85b9cd60e52812442ba
1 parent
bc9ed47b
kernel load fix (Ralf Baechle)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1467 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
4 additions
and
3 deletions
hw/mips_r4k.c
... | ... | @@ -257,8 +257,9 @@ void mips_r4k_init (int ram_size, int vga_ram_size, int boot_device, |
257 | 257 | if (linux_boot) { |
258 | 258 | kernel_base = KERNEL_LOAD_ADDR; |
259 | 259 | /* now we can load the kernel */ |
260 | - kernel_size = load_image(kernel_filename, phys_ram_base + kernel_base); | |
261 | - if (kernel_size < 0) { | |
260 | + kernel_size = load_image(kernel_filename, | |
261 | + phys_ram_base + (kernel_base - 0x80000000)); | |
262 | + if (kernel_size == (target_ulong) -1) { | |
262 | 263 | fprintf(stderr, "qemu: could not load kernel '%s'\n", |
263 | 264 | kernel_filename); |
264 | 265 | exit(1); |
... | ... | @@ -268,7 +269,7 @@ void mips_r4k_init (int ram_size, int vga_ram_size, int boot_device, |
268 | 269 | initrd_base = INITRD_LOAD_ADDR; |
269 | 270 | initrd_size = load_image(initrd_filename, |
270 | 271 | phys_ram_base + initrd_base); |
271 | - if (initrd_size < 0) { | |
272 | + if (initrd_size == (target_ulong) -1) { | |
272 | 273 | fprintf(stderr, "qemu: could not load initial ram disk '%s'\n", |
273 | 274 | initrd_filename); |
274 | 275 | exit(1); | ... | ... |