From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LFaGo-0007t8-61 for qemu-devel@nongnu.org; Wed, 24 Dec 2008 15:23:54 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LFaGn-0007ss-Oz for qemu-devel@nongnu.org; Wed, 24 Dec 2008 15:23:53 -0500 Received: from [199.232.76.173] (port=54445 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LFaGn-0007sp-EN for qemu-devel@nongnu.org; Wed, 24 Dec 2008 15:23:53 -0500 Received: from savannah.gnu.org ([199.232.41.3]:35189 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LFaGn-0005bf-5X for qemu-devel@nongnu.org; Wed, 24 Dec 2008 15:23:53 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LFaGm-0003Ym-IF for qemu-devel@nongnu.org; Wed, 24 Dec 2008 20:23:52 +0000 Received: from blueswir1 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LFaGm-0003Yi-8r for qemu-devel@nongnu.org; Wed, 24 Dec 2008 20:23:52 +0000 MIME-Version: 1.0 Errors-To: blueswir1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Blue Swirl Message-Id: Date: Wed, 24 Dec 2008 20:23:52 +0000 Subject: [Qemu-devel] [6128] Use OpenBIOS for g3bw machine Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 6128 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6128 Author: blueswir1 Date: 2008-12-24 20:23:51 +0000 (Wed, 24 Dec 2008) Log Message: ----------- Use OpenBIOS for g3bw machine Modified Paths: -------------- trunk/hw/ppc_mac.h trunk/hw/ppc_oldworld.c trunk/qemu-doc.texi Modified: trunk/hw/ppc_mac.h =================================================================== --- trunk/hw/ppc_mac.h 2008-12-24 20:21:18 UTC (rev 6127) +++ trunk/hw/ppc_mac.h 2008-12-24 20:23:51 UTC (rev 6128) @@ -31,6 +31,8 @@ #define BIOS_FILENAME "ppc_rom.bin" #define VGABIOS_FILENAME "video.x" #define NVRAM_SIZE 0x2000 +#define PROM_FILENAME "openbios-ppc32" +#define PROM_ADDR 0xfff00000 #define KERNEL_LOAD_ADDR 0x01000000 #define INITRD_LOAD_ADDR 0x01800000 Modified: trunk/hw/ppc_oldworld.c =================================================================== --- trunk/hw/ppc_oldworld.c 2008-12-24 20:21:18 UTC (rev 6127) +++ trunk/hw/ppc_oldworld.c 2008-12-24 20:23:51 UTC (rev 6128) @@ -164,19 +164,16 @@ /* allocate and load BIOS */ bios_offset = qemu_ram_alloc(BIOS_SIZE); if (bios_name == NULL) - bios_name = BIOS_FILENAME; + bios_name = PROM_FILENAME; snprintf(buf, sizeof(buf), "%s/%s", bios_dir, bios_name); - bios_size = load_image(buf, phys_ram_base + bios_offset); + cpu_register_physical_memory(PROM_ADDR, BIOS_SIZE, bios_offset | IO_MEM_ROM); + + /* Load OpenBIOS (ELF) */ + bios_size = load_elf(buf, 0, NULL, NULL, NULL); if (bios_size < 0 || bios_size > BIOS_SIZE) { cpu_abort(env, "qemu: could not load PowerPC bios '%s'\n", buf); exit(1); } - if (bios_size > 0x00080000) { - /* As the NVRAM is located at 0xFFF04000, we cannot use 1 MB BIOSes */ - cpu_abort(env, "G3BW Mac hardware can not handle 1 MB BIOS\n"); - } - cpu_register_physical_memory((uint32_t)(-bios_size), - bios_size, bios_offset | IO_MEM_ROM); /* allocate and load VGA BIOS */ vga_bios_offset = qemu_ram_alloc(VGA_BIOS_SIZE); Modified: trunk/qemu-doc.texi =================================================================== --- trunk/qemu-doc.texi 2008-12-24 20:21:18 UTC (rev 6127) +++ trunk/qemu-doc.texi 2008-12-24 20:23:51 UTC (rev 6128) @@ -2328,6 +2328,11 @@ QEMU uses the Open Hack'Ware Open Firmware Compatible BIOS available at @url{http://perso.magic.fr/l_indien/OpenHackWare/index.htm}. +Since version 0.9.1, QEMU uses OpenBIOS @url{http://www.openbios.org/} +for the g3bw PowerMac machine. OpenBIOS is a free (GPL v2) portable +firmware implementation. The goal is to implement a 100% IEEE +1275-1994 (referred to as Open Firmware) compliant firmware. + @c man begin OPTIONS The following options are specific to the PowerPC emulation: