Commit 992e5acd4d0c08d397c39c80acc8203fd394bd9c
1 parent
fe096129
Use OpenBIOS for g3bw machine
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6128 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
3 changed files
with
12 additions
and
8 deletions
hw/ppc_mac.h
| ... | ... | @@ -31,6 +31,8 @@ |
| 31 | 31 | #define BIOS_FILENAME "ppc_rom.bin" |
| 32 | 32 | #define VGABIOS_FILENAME "video.x" |
| 33 | 33 | #define NVRAM_SIZE 0x2000 |
| 34 | +#define PROM_FILENAME "openbios-ppc32" | |
| 35 | +#define PROM_ADDR 0xfff00000 | |
| 34 | 36 | |
| 35 | 37 | #define KERNEL_LOAD_ADDR 0x01000000 |
| 36 | 38 | #define INITRD_LOAD_ADDR 0x01800000 | ... | ... |
hw/ppc_oldworld.c
| ... | ... | @@ -164,19 +164,16 @@ static void ppc_heathrow_init (ram_addr_t ram_size, int vga_ram_size, |
| 164 | 164 | /* allocate and load BIOS */ |
| 165 | 165 | bios_offset = qemu_ram_alloc(BIOS_SIZE); |
| 166 | 166 | if (bios_name == NULL) |
| 167 | - bios_name = BIOS_FILENAME; | |
| 167 | + bios_name = PROM_FILENAME; | |
| 168 | 168 | snprintf(buf, sizeof(buf), "%s/%s", bios_dir, bios_name); |
| 169 | - bios_size = load_image(buf, phys_ram_base + bios_offset); | |
| 169 | + cpu_register_physical_memory(PROM_ADDR, BIOS_SIZE, bios_offset | IO_MEM_ROM); | |
| 170 | + | |
| 171 | + /* Load OpenBIOS (ELF) */ | |
| 172 | + bios_size = load_elf(buf, 0, NULL, NULL, NULL); | |
| 170 | 173 | if (bios_size < 0 || bios_size > BIOS_SIZE) { |
| 171 | 174 | cpu_abort(env, "qemu: could not load PowerPC bios '%s'\n", buf); |
| 172 | 175 | exit(1); |
| 173 | 176 | } |
| 174 | - if (bios_size > 0x00080000) { | |
| 175 | - /* As the NVRAM is located at 0xFFF04000, we cannot use 1 MB BIOSes */ | |
| 176 | - cpu_abort(env, "G3BW Mac hardware can not handle 1 MB BIOS\n"); | |
| 177 | - } | |
| 178 | - cpu_register_physical_memory((uint32_t)(-bios_size), | |
| 179 | - bios_size, bios_offset | IO_MEM_ROM); | |
| 180 | 177 | |
| 181 | 178 | /* allocate and load VGA BIOS */ |
| 182 | 179 | vga_bios_offset = qemu_ram_alloc(VGA_BIOS_SIZE); | ... | ... |
qemu-doc.texi
| ... | ... | @@ -2328,6 +2328,11 @@ PC compatible keyboard and mouse. |
| 2328 | 2328 | QEMU uses the Open Hack'Ware Open Firmware Compatible BIOS available at |
| 2329 | 2329 | @url{http://perso.magic.fr/l_indien/OpenHackWare/index.htm}. |
| 2330 | 2330 | |
| 2331 | +Since version 0.9.1, QEMU uses OpenBIOS @url{http://www.openbios.org/} | |
| 2332 | +for the g3bw PowerMac machine. OpenBIOS is a free (GPL v2) portable | |
| 2333 | +firmware implementation. The goal is to implement a 100% IEEE | |
| 2334 | +1275-1994 (referred to as Open Firmware) compliant firmware. | |
| 2335 | + | |
| 2331 | 2336 | @c man begin OPTIONS |
| 2332 | 2337 | |
| 2333 | 2338 | The following options are specific to the PowerPC emulation: | ... | ... |