[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 05/15] pci/bridge: fix pci_bridge_reset()
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH v4 05/15] pci/bridge: fix pci_bridge_reset() |
Date: |
Mon, 18 Oct 2010 12:17:46 +0900 |
lower 4bits of base/limit register is RO, and
should not be modified on reset.
Signed-off-by: Isaku Yamahata <address@hidden>
---
hw/pci_bridge.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/hw/pci_bridge.c b/hw/pci_bridge.c
index 638e3b3..7229610 100644
--- a/hw/pci_bridge.c
+++ b/hw/pci_bridge.c
@@ -161,12 +161,15 @@ void pci_bridge_reset_reg(PCIDevice *dev)
conf[PCI_SUBORDINATE_BUS] = 0;
conf[PCI_SEC_LATENCY_TIMER] = 0;
- conf[PCI_IO_BASE] = 0;
- conf[PCI_IO_LIMIT] = 0;
- pci_set_word(conf + PCI_MEMORY_BASE, 0);
- pci_set_word(conf + PCI_MEMORY_LIMIT, 0);
- pci_set_word(conf + PCI_PREF_MEMORY_BASE, 0);
- pci_set_word(conf + PCI_PREF_MEMORY_LIMIT, 0);
+ pci_clear_bit_byte(conf + PCI_IO_BASE, PCI_IO_RANGE_MASK & 0xff);
+ pci_clear_bit_byte(conf + PCI_IO_LIMIT, PCI_IO_RANGE_MASK & 0xff);
+ pci_clear_bit_word(conf + PCI_MEMORY_BASE, PCI_MEMORY_RANGE_MASK & 0xffff);
+ pci_clear_bit_word(conf + PCI_MEMORY_LIMIT,
+ PCI_MEMORY_RANGE_MASK & 0xffff);
+ pci_clear_bit_word(conf + PCI_PREF_MEMORY_BASE,
+ PCI_PREF_RANGE_MASK & 0xffff);
+ pci_clear_bit_word(conf + PCI_PREF_MEMORY_LIMIT,
+ PCI_PREF_RANGE_MASK & 0xffff);
pci_set_word(conf + PCI_PREF_BASE_UPPER32, 0);
pci_set_word(conf + PCI_PREF_LIMIT_UPPER32, 0);
--
1.7.1.1
- [Qemu-devel] [PATCH v4 00/15] pcie port switch emulators, Isaku Yamahata, 2010/10/17
- [Qemu-devel] [PATCH v4 10/15] pcie port: define struct PCIEPort/PCIESlot and helper functions, Isaku Yamahata, 2010/10/17
- [Qemu-devel] [PATCH v4 12/15] x3130: pcie upstream port, Isaku Yamahata, 2010/10/17
- [Qemu-devel] [PATCH v4 01/15] pci: make pci_del_capability() update for w1cmask, Isaku Yamahata, 2010/10/17
- [Qemu-devel] [PATCH v4 08/15] pcie: helper functions for pcie capability and extended capability, Isaku Yamahata, 2010/10/17
- [Qemu-devel] [PATCH v4 15/15] pcie/aer: glue aer error injection into qemu monitor, Isaku Yamahata, 2010/10/17
- [Qemu-devel] [PATCH v4 14/15] pcie/hotplug: introduce pushing attention button command, Isaku Yamahata, 2010/10/17
- [Qemu-devel] [PATCH v4 05/15] pci/bridge: fix pci_bridge_reset(),
Isaku Yamahata <=
[Qemu-devel] [PATCH v4 02/15] pci: introduce helper functions to clear/set bits in configuration space, Isaku Yamahata, 2010/10/17
[Qemu-devel] [PATCH v4 07/15] pcie: add pcie constants to pcie_regs.h, Isaku Yamahata, 2010/10/17
[Qemu-devel] [PATCH v4 11/15] ioh3420: pcie root port in X58 ioh, Isaku Yamahata, 2010/10/17
[Qemu-devel] [PATCH v4 04/15] pci: record which is written into pci configuration space, Isaku Yamahata, 2010/10/17