summary refs log tree commit diff stats
path: root/hw/sparc64/sun4u.c
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2014-08-04 18:13:11 +0100
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2014-08-17 13:12:52 +0100
commita1cf8be550c65d316ad666c778e21773ce113eb8 (patch)
tree6001a468e19a0b3fa4ddd8ff2dc2efa7db98e77b /hw/sparc64/sun4u.c
parentf2c85a2f36f57f155cda7bc9f7c42b44f1a2439e (diff)
downloadfocaccia-qemu-a1cf8be550c65d316ad666c778e21773ce113eb8.tar.gz
focaccia-qemu-a1cf8be550c65d316ad666c778e21773ce113eb8.zip
sun4u: switch second PCI-ebus bridge BAR over to PCI IO space
The ebus is the sun4u equivalent of the old ISA bus which is already mapped at
the beginning of PCI IO space within QEMU. NetBSD attempts to find the physical
addresses of devices connected to the ebus by parsing the BARs of the PCI-ebus
bridge and using the base address found by matching both the address space
type and range for a particular ebus address.

Since the second PCI-ebus bridge BAR is already aliased onto IO space, switch
the BAR over to match and reduce the size to 0x1000 which is enough to cover
all the legacy ioport devices whilst leaving the remaining IO space for other
PCI devices. This allows NetBSD SPARC64 to correctly detect and access devices
on the ebus.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'hw/sparc64/sun4u.c')
-rw-r--r--hw/sparc64/sun4u.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
index 33c311bf28..b9f3bee9ae 100644
--- a/hw/sparc64/sun4u.c
+++ b/hw/sparc64/sun4u.c
@@ -609,8 +609,8 @@ pci_ebus_init1(PCIDevice *pci_dev)
                              0, 0x1000000);
     pci_register_bar(pci_dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &s->bar0);
     memory_region_init_alias(&s->bar1, OBJECT(s), "bar1", get_system_io(),
-                             0, 0x800000);
-    pci_register_bar(pci_dev, 1, PCI_BASE_ADDRESS_SPACE_MEMORY, &s->bar1);
+                             0, 0x1000);
+    pci_register_bar(pci_dev, 1, PCI_BASE_ADDRESS_SPACE_IO, &s->bar1);
     return 0;
 }