diff options
author | j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-11-04 01:16:04 +0000 |
---|---|---|
committer | j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-11-04 01:16:04 +0000 |
commit | 74e9115560fbdd6342f3e1a42ced6bd76b227f82 (patch) | |
tree | 7a195c7564b403f937d683ae58b6f30b84343412 /hw/macio.c | |
parent | f3e3285dcdcf84aa3f19ae888a914660922ad5f7 (diff) |
Fix PowerMac NVRAM device.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3521 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/macio.c')
-rw-r--r-- | hw/macio.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/hw/macio.c b/hw/macio.c index 82e3e9afec..5a5db47738 100644 --- a/hw/macio.c +++ b/hw/macio.c @@ -31,7 +31,7 @@ struct macio_state_t { int pic_mem_index; int dbdma_mem_index; int cuda_mem_index; - int nvram_mem_index; + void *nvram; int nb_ide; int ide_mem_index[4]; }; @@ -68,14 +68,12 @@ static void macio_map (PCIDevice *pci_dev, int region_num, macio_state->ide_mem_index[i]); } } - if (macio_state->nvram_mem_index >= 0) { - cpu_register_physical_memory(addr + 0x60000, 0x20000, - macio_state->nvram_mem_index); - } + if (macio_state->nvram != NULL) + macio_nvram_map(macio_state->nvram, addr + 0x60000); } void macio_init (PCIBus *bus, int device_id, int is_oldworld, int pic_mem_index, - int dbdma_mem_index, int cuda_mem_index, int nvram_mem_index, + int dbdma_mem_index, int cuda_mem_index, void *nvram, int nb_ide, int *ide_mem_index) { PCIDevice *d; @@ -90,7 +88,7 @@ void macio_init (PCIBus *bus, int device_id, int is_oldworld, int pic_mem_index, macio_state->pic_mem_index = pic_mem_index; macio_state->dbdma_mem_index = dbdma_mem_index; macio_state->cuda_mem_index = cuda_mem_index; - macio_state->nvram_mem_index = nvram_mem_index; + macio_state->nvram = nvram; if (nb_ide > 4) nb_ide = 4; macio_state->nb_ide = nb_ide; |