From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LWC4I-000492-NA for qemu-devel@nongnu.org; Sun, 08 Feb 2009 10:59:38 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LWC4I-00048e-1n for qemu-devel@nongnu.org; Sun, 08 Feb 2009 10:59:38 -0500 Received: from [199.232.76.173] (port=47974 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LWC4H-00048Z-Sl for qemu-devel@nongnu.org; Sun, 08 Feb 2009 10:59:37 -0500 Received: from savannah.gnu.org ([199.232.41.3]:51094 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 1LWC4H-0004dk-G7 for qemu-devel@nongnu.org; Sun, 08 Feb 2009 10:59:37 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LWC4G-0001fH-VD for qemu-devel@nongnu.org; Sun, 08 Feb 2009 15:59:37 +0000 Received: from blueswir1 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LWC4G-0001fD-OK for qemu-devel@nongnu.org; Sun, 08 Feb 2009 15:59:36 +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: Sun, 08 Feb 2009 15:59:36 +0000 Subject: [Qemu-devel] [6560] Switch Mac99 to OpenBIOS 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: 6560 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6560 Author: blueswir1 Date: 2009-02-08 15:59:36 +0000 (Sun, 08 Feb 2009) Log Message: ----------- Switch Mac99 to OpenBIOS Modified Paths: -------------- trunk/hw/ppc_newworld.c trunk/pc-bios/README trunk/pc-bios/openbios-ppc trunk/qemu-doc.texi Modified: trunk/hw/ppc_newworld.c =================================================================== --- trunk/hw/ppc_newworld.c 2009-02-08 15:53:20 UTC (rev 6559) +++ trunk/hw/ppc_newworld.c 2009-02-08 15:59:36 UTC (rev 6560) @@ -32,10 +32,12 @@ #include "net.h" #include "sysemu.h" #include "boards.h" +#include "fw_cfg.h" #include "escc.h" #define MAX_IDE_BUS 2 #define VGA_BIOS_SIZE 65536 +#define CFG_ADDR 0xf0000510 /* debug UniNorth */ //#define DEBUG_UNIN @@ -103,6 +105,7 @@ int ppc_boot_device; int index; BlockDriverState *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; + void *fw_cfg; void *dbdma; linux_boot = (kernel_filename != NULL); @@ -135,20 +138,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); } - bios_size = (bios_size + 0xfff) & ~0xfff; - if (bios_size > 0x00080000) { - /* As the NVRAM is located at 0xFFF04000, we cannot use 1 MB BIOSes */ - cpu_abort(env, "Mac99 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); @@ -337,8 +336,10 @@ graphic_width, graphic_height, graphic_depth); /* No PCI init: the BIOS will do it */ - /* Special port to get debug messages from Open-Firmware */ - register_ioport_write(0x0F00, 4, 1, &PPC_debug_write, NULL); + fw_cfg = fw_cfg_init(0, 0, CFG_ADDR, CFG_ADDR + 2); + fw_cfg_add_i32(fw_cfg, FW_CFG_ID, 1); + fw_cfg_add_i64(fw_cfg, FW_CFG_RAM_SIZE, (uint64_t)ram_size); + fw_cfg_add_i16(fw_cfg, FW_CFG_MACHINE_ID, ARCH_MAC99); } QEMUMachine core99_machine = { Modified: trunk/pc-bios/README =================================================================== --- trunk/pc-bios/README 2009-02-08 15:53:20 UTC (rev 6559) +++ trunk/pc-bios/README 2009-02-08 15:59:36 UTC (rev 6560) @@ -42,7 +42,7 @@ firmware implementation. The goal is to implement a 100% IEEE 1275-1994 (referred to as Open Firmware) compliant firmware. The included Sparc32 and Sparc64 images are built from SVN revision 395. - The included PowerPC image is built from SVN revision 418. + The included PowerPC image is built from SVN revision 450. - The PXE roms come from Rom-o-Matic etherboot 5.4.2. pcnet32:pcnet32 -- [0x1022,0x2000] Modified: trunk/pc-bios/openbios-ppc =================================================================== (Binary files differ) Modified: trunk/qemu-doc.texi =================================================================== --- trunk/qemu-doc.texi 2009-02-08 15:53:20 UTC (rev 6559) +++ trunk/qemu-doc.texi 2009-02-08 15:59:36 UTC (rev 6560) @@ -2433,7 +2433,7 @@ @itemize @minus @item -UniNorth PCI Bridge +UniNorth or Grackle PCI Bridge @item PCI VGA compatible card with VESA Bochs Extensions @item @@ -2471,9 +2471,9 @@ @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 g3beige 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. +for the g3beige and mac99 PowerMac machines. 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