summaryrefslogtreecommitdiffstats
path: root/hw/pcie_port.c
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2010-11-19 13:28:45 +0200
committerMichael S. Tsirkin <mst@redhat.com>2010-11-22 10:00:06 +0200
commitbba5ed772a562fefdb218df8d821c3b537ce5759 (patch)
tree56f87300e53e57a4544317b26e739345eb4776d1 /hw/pcie_port.c
parentf6bdfcc9352e53fac5b9a144fc9ead991163484b (diff)
downloadhqemu-bba5ed772a562fefdb218df8d821c3b537ce5759.zip
hqemu-bba5ed772a562fefdb218df8d821c3b537ce5759.tar.gz
pcie/port: fix bridge control register wmask
pci generic layer initialized wmask for bridge control register according to pci spec. pcie deviates slightly from it, so initialize it properly. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/pcie_port.c')
-rw-r--r--hw/pcie_port.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/pcie_port.c b/hw/pcie_port.c
index 117de61..340dcdb 100644
--- a/hw/pcie_port.c
+++ b/hw/pcie_port.c
@@ -27,6 +27,14 @@ void pcie_port_init_reg(PCIDevice *d)
pci_set_word(d->config + PCI_STATUS, 0);
pci_set_word(d->config + PCI_SEC_STATUS, 0);
+ /* Unlike conventional pci bridge, some bits are hardwared to 0. */
+ pci_set_word(d->wmask + PCI_BRIDGE_CONTROL,
+ PCI_BRIDGE_CTL_PARITY |
+ PCI_BRIDGE_CTL_ISA |
+ PCI_BRIDGE_CTL_VGA |
+ PCI_BRIDGE_CTL_SERR |
+ PCI_BRIDGE_CTL_BUS_RESET);
+
/* 7.5.3.5 Prefetchable Memory Base Limit
* The Prefetchable Memory Base and Prefetchable Memory Limit registers
* must indicate that 64-bit addresses are supported, as defined in
OpenPOWER on IntegriCloud