aboutsummaryrefslogtreecommitdiff
path: root/hw/mips_r4k.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-07-02 15:11:25 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-07-02 15:11:25 +0000
commitde12d6369bec323e9198c85b9cd60e52812442ba (patch)
tree1a5cd1e75b017d568e6f131594456d5bc7fd978e /hw/mips_r4k.c
parentbc9ed47b123a0a8d3aa32d5bd3f8c682afcd6bd0 (diff)
kernel load fix (Ralf Baechle)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1467 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/mips_r4k.c')
-rw-r--r--hw/mips_r4k.c7
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);