Commit 4f3f238b42162456cee9889d7af5297a4d2149b9
1 parent
006f3a48
Use Mac NVRAM
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6561 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
1 additions
and
21 deletions
hw/ppc_newworld.c
@@ -93,12 +93,8 @@ static void ppc_core99_init (ram_addr_t ram_size, int vga_ram_size, | @@ -93,12 +93,8 @@ static void ppc_core99_init (ram_addr_t ram_size, int vga_ram_size, | ||
93 | ram_addr_t ram_offset, vga_ram_offset, bios_offset, vga_bios_offset; | 93 | ram_addr_t ram_offset, vga_ram_offset, bios_offset, vga_bios_offset; |
94 | uint32_t kernel_base, kernel_size, initrd_base, initrd_size; | 94 | uint32_t kernel_base, kernel_size, initrd_base, initrd_size; |
95 | PCIBus *pci_bus; | 95 | PCIBus *pci_bus; |
96 | - nvram_t nvram; | ||
97 | -#if 0 | ||
98 | MacIONVRAMState *nvr; | 96 | MacIONVRAMState *nvr; |
99 | int nvram_mem_index; | 97 | int nvram_mem_index; |
100 | -#endif | ||
101 | - m48t59_t *m48t59; | ||
102 | int vga_bios_size, bios_size; | 98 | int vga_bios_size, bios_size; |
103 | qemu_irq *dummy_irq; | 99 | qemu_irq *dummy_irq; |
104 | int pic_mem_index, dbdma_mem_index, cuda_mem_index, escc_mem_index; | 100 | 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, | @@ -313,27 +309,11 @@ static void ppc_core99_init (ram_addr_t ram_size, int vga_ram_size, | ||
313 | 309 | ||
314 | if (graphic_depth != 15 && graphic_depth != 32 && graphic_depth != 8) | 310 | if (graphic_depth != 15 && graphic_depth != 32 && graphic_depth != 8) |
315 | graphic_depth = 15; | 311 | graphic_depth = 15; |
316 | -#if 0 /* XXX: this is ugly but needed for now, or OHW won't boot */ | 312 | + |
317 | /* The NewWorld NVRAM is not located in the MacIO device */ | 313 | /* The NewWorld NVRAM is not located in the MacIO device */ |
318 | nvr = macio_nvram_init(&nvram_mem_index, 0x2000, 1); | 314 | nvr = macio_nvram_init(&nvram_mem_index, 0x2000, 1); |
319 | pmac_format_nvram_partition(nvr, 0x2000); | 315 | pmac_format_nvram_partition(nvr, 0x2000); |
320 | macio_nvram_map(nvr, 0xFFF04000); | 316 | macio_nvram_map(nvr, 0xFFF04000); |
321 | - nvram.opaque = nvr; | ||
322 | - nvram.read_fn = &macio_nvram_read; | ||
323 | - nvram.write_fn = &macio_nvram_write; | ||
324 | -#else | ||
325 | - m48t59 = m48t59_init(dummy_irq[8], 0xFFF04000, 0x0074, NVRAM_SIZE, 59); | ||
326 | - nvram.opaque = m48t59; | ||
327 | - nvram.read_fn = &m48t59_read; | ||
328 | - nvram.write_fn = &m48t59_write; | ||
329 | -#endif | ||
330 | - PPC_NVRAM_set_params(&nvram, NVRAM_SIZE, "MAC99", ram_size, | ||
331 | - ppc_boot_device, kernel_base, kernel_size, | ||
332 | - kernel_cmdline, | ||
333 | - initrd_base, initrd_size, | ||
334 | - /* XXX: need an option to load a NVRAM image */ | ||
335 | - 0, | ||
336 | - graphic_width, graphic_height, graphic_depth); | ||
337 | /* No PCI init: the BIOS will do it */ | 317 | /* No PCI init: the BIOS will do it */ |
338 | 318 | ||
339 | fw_cfg = fw_cfg_init(0, 0, CFG_ADDR, CFG_ADDR + 2); | 319 | fw_cfg = fw_cfg_init(0, 0, CFG_ADDR, CFG_ADDR + 2); |