]> git.proxmox.com Git - qemu.git/commitdiff
Use Mac NVRAM
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 8 Feb 2009 16:01:01 +0000 (16:01 +0000)
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 8 Feb 2009 16:01:01 +0000 (16:01 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6561 c046a42c-6fe2-441c-8c8c-71466251a162

hw/ppc_newworld.c

index 8f3ebdde7a0b7e952af464a9ff1f84e48933ecab..cf1a8402653cee99c30017f8a0a0363032f0b226 100644 (file)
@@ -93,12 +93,8 @@ static void ppc_core99_init (ram_addr_t ram_size, int vga_ram_size,
     ram_addr_t ram_offset, vga_ram_offset, bios_offset, vga_bios_offset;
     uint32_t kernel_base, kernel_size, initrd_base, initrd_size;
     PCIBus *pci_bus;
-    nvram_t nvram;
-#if 0
     MacIONVRAMState *nvr;
     int nvram_mem_index;
-#endif
-    m48t59_t *m48t59;
     int vga_bios_size, bios_size;
     qemu_irq *dummy_irq;
     int pic_mem_index, dbdma_mem_index, cuda_mem_index, escc_mem_index;
@@ -313,27 +309,11 @@ static void ppc_core99_init (ram_addr_t ram_size, int vga_ram_size,
 
     if (graphic_depth != 15 && graphic_depth != 32 && graphic_depth != 8)
         graphic_depth = 15;
-#if 0 /* XXX: this is ugly but needed for now, or OHW won't boot */
+
     /* The NewWorld NVRAM is not located in the MacIO device */
     nvr = macio_nvram_init(&nvram_mem_index, 0x2000, 1);
     pmac_format_nvram_partition(nvr, 0x2000);
     macio_nvram_map(nvr, 0xFFF04000);
-    nvram.opaque = nvr;
-    nvram.read_fn = &macio_nvram_read;
-    nvram.write_fn = &macio_nvram_write;
-#else
-    m48t59 = m48t59_init(dummy_irq[8], 0xFFF04000, 0x0074, NVRAM_SIZE, 59);
-    nvram.opaque = m48t59;
-    nvram.read_fn = &m48t59_read;
-    nvram.write_fn = &m48t59_write;
-#endif
-    PPC_NVRAM_set_params(&nvram, NVRAM_SIZE, "MAC99", ram_size,
-                         ppc_boot_device, kernel_base, kernel_size,
-                         kernel_cmdline,
-                         initrd_base, initrd_size,
-                         /* XXX: need an option to load a NVRAM image */
-                         0,
-                         graphic_width, graphic_height, graphic_depth);
     /* No PCI init: the BIOS will do it */
 
     fw_cfg = fw_cfg_init(0, 0, CFG_ADDR, CFG_ADDR + 2);