aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2009-02-08 16:01:01 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2009-02-08 16:01:01 +0000
commit4f3f238b42162456cee9889d7af5297a4d2149b9 (patch)
tree0dc5bd32fb09fd6aadf9428cb63fd39a4dc51898 /hw
parent006f3a48e0793caae62c002636c9cd0c5334ae24 (diff)
Use Mac NVRAM
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6561 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r--hw/ppc_newworld.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/hw/ppc_newworld.c b/hw/ppc_newworld.c
index 8f3ebdde7a..cf1a840265 100644
--- a/hw/ppc_newworld.c
+++ b/hw/ppc_newworld.c
@@ -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);