diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-12-24 20:30:01 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-12-24 20:30:01 +0000 |
commit | 52f163b7f4ca67371c15d17bb55b0a9d19d6700c (patch) | |
tree | fab4f33d88fa142d1e210366e9738e36ce56dfde /hw/ppc_oldworld.c | |
parent | 271dd5e09ee1d8ad4438471211ffbf6b5a377084 (diff) | |
download | qemu-52f163b7f4ca67371c15d17bb55b0a9d19d6700c.zip qemu-52f163b7f4ca67371c15d17bb55b0a9d19d6700c.tar.gz qemu-52f163b7f4ca67371c15d17bb55b0a9d19d6700c.tar.bz2 |
Fix kernel loading
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6131 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/ppc_oldworld.c')
-rw-r--r-- | hw/ppc_oldworld.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/hw/ppc_oldworld.c b/hw/ppc_oldworld.c index 5bf52ee..9318be4 100644 --- a/hw/ppc_oldworld.c +++ b/hw/ppc_oldworld.c @@ -207,7 +207,15 @@ static void ppc_heathrow_init (ram_addr_t ram_size, int vga_ram_size, 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); + kernel_size = load_elf(kernel_filename, kernel_base - 0xc0000000ULL, + NULL, NULL, NULL); + if (kernel_size < 0) + kernel_size = load_aout(kernel_filename, kernel_base, + ram_size - kernel_base); + if (kernel_size < 0) + kernel_size = load_image_targphys(kernel_filename, + kernel_base, + ram_size - kernel_base); if (kernel_size < 0) { cpu_abort(env, "qemu: could not load kernel '%s'\n", kernel_filename); |