diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-10-06 11:24:18 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-10-06 11:24:18 +0000 |
commit | aa6ad6fee28653943bb2ce2f48d7ed61c4d6d603 (patch) | |
tree | 364780088088436567515c4d2ff897093d3b375e /hw | |
parent | 12de9a396acbc95e25c5d60ed097cc55777eaaed (diff) |
Support for loading a real BIOS image (Robert Reif)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3336 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r-- | hw/sun4m.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/hw/sun4m.c b/hw/sun4m.c index f9961c7739..d2b6b7b887 100644 --- a/hw/sun4m.c +++ b/hw/sun4m.c @@ -49,7 +49,7 @@ #define KERNEL_LOAD_ADDR 0x00004000 #define CMDLINE_ADDR 0x007ff000 #define INITRD_LOAD_ADDR 0x00800000 -#define PROM_SIZE_MAX (256 * 1024) +#define PROM_SIZE_MAX (512 * 1024) #define PROM_PADDR 0xff0000000ULL #define PROM_VADDR 0xffd00000 #define PROM_FILENAME "openbios-sparc32" @@ -434,10 +434,12 @@ static void sun4m_load_kernel(long vram_size, int RAM_size, int boot_device, bios_name = PROM_FILENAME; snprintf(buf, sizeof(buf), "%s/%s", bios_dir, bios_name); ret = load_elf(buf, PROM_PADDR - PROM_VADDR, NULL, NULL, NULL); - if (ret < 0) { - fprintf(stderr, "qemu: could not load prom '%s'\n", - buf); - exit(1); + if (ret < 0 || ret > PROM_SIZE_MAX) + ret = load_image(buf, phys_ram_base + prom_offset); + if (ret < 0 || ret > PROM_SIZE_MAX) { + fprintf(stderr, "qemu: could not load prom '%s'\n", + buf); + exit(1); } kernel_size = 0; |