i82378.c (2c9b15cab12c21e32dffb67c5e18f3dc407ca224) i82378.c (1437c94b2689c2010362f84d14f14feaa1d8dba3)
1/*
2 * QEMU Intel i82378 emulation (PCI to ISA bridge)
3 *
4 * Copyright (c) 2010-2011 Hervé Poussineau
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either

--- 207 unchanged lines hidden (view full) ---

216 pci_conf = dev->config;
217 pci_set_word(pci_conf + PCI_COMMAND,
218 PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER);
219 pci_set_word(pci_conf + PCI_STATUS,
220 PCI_STATUS_DEVSEL_MEDIUM);
221
222 pci_conf[PCI_INTERRUPT_PIN] = 1; /* interrupt pin 0 */
223
1/*
2 * QEMU Intel i82378 emulation (PCI to ISA bridge)
3 *
4 * Copyright (c) 2010-2011 Hervé Poussineau
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either

--- 207 unchanged lines hidden (view full) ---

216 pci_conf = dev->config;
217 pci_set_word(pci_conf + PCI_COMMAND,
218 PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER);
219 pci_set_word(pci_conf + PCI_STATUS,
220 PCI_STATUS_DEVSEL_MEDIUM);
221
222 pci_conf[PCI_INTERRUPT_PIN] = 1; /* interrupt pin 0 */
223
224 memory_region_init_io(&s->io, NULL, &i82378_io_ops, s, "i82378-io", 0x00010000);
224 memory_region_init_io(&s->io, OBJECT(pci), &i82378_io_ops, s,
225 "i82378-io", 0x00010000);
225 pci_register_bar(dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &s->io);
226
226 pci_register_bar(dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &s->io);
227
227 memory_region_init_io(&s->mem, NULL, &i82378_mem_ops, s, "i82378-mem", 0x01000000);
228 memory_region_init_io(&s->mem, OBJECT(pci), &i82378_mem_ops, s,
229 "i82378-mem", 0x01000000);
228 pci_register_bar(dev, 1, PCI_BASE_ADDRESS_SPACE_MEMORY, &s->mem);
229
230 /* Make I/O address read only */
231 pci_set_word(dev->wmask + PCI_COMMAND, PCI_COMMAND_SPECIAL);
232 pci_set_long(dev->wmask + PCI_BASE_ADDRESS_0, 0);
233 pci_set_long(pci_conf + PCI_BASE_ADDRESS_0, pci->isa_io_base);
234
235 isa_mem_base = pci->isa_mem_base;

--- 42 unchanged lines hidden ---
230 pci_register_bar(dev, 1, PCI_BASE_ADDRESS_SPACE_MEMORY, &s->mem);
231
232 /* Make I/O address read only */
233 pci_set_word(dev->wmask + PCI_COMMAND, PCI_COMMAND_SPECIAL);
234 pci_set_long(dev->wmask + PCI_BASE_ADDRESS_0, 0);
235 pci_set_long(pci_conf + PCI_BASE_ADDRESS_0, pci->isa_io_base);
236
237 isa_mem_base = pci->isa_mem_base;

--- 42 unchanged lines hidden ---