[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 45/61] pci/monitor: print out bridge's filtering val
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH 45/61] pci/monitor: print out bridge's filtering values and so on. |
Date: |
Wed, 30 Sep 2009 19:18:21 +0900 |
make pci_info_device() print out bridge's filtering value like
io base/limit, subbus and subordinate bus.
Signed-off-by: Isaku Yamahata <address@hidden>
---
hw/pci.c | 43 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 43 insertions(+), 0 deletions(-)
diff --git a/hw/pci.c b/hw/pci.c
index 94fe87f..7aed737 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -1150,7 +1150,50 @@ static void pci_info_device(PCIDevice *d)
d->config[PCI_INTERRUPT_LINE]);
}
if (class == 0x0604) {
+ int shift;
+ uint64_t base;
+ uint64_t limit;
monitor_printf(mon, " BUS %d.\n", d->config[0x19]);
+ monitor_printf(mon, " SECONDARY BUS %d.\n",
+ d->config[PCI_SECONDARY_BUS]);
+ monitor_printf(mon, " SUBORDINATE BUS %d.\n",
+ d->config[PCI_SUBORDINATE_BUS]);
+
+ if (d->config[PCI_IO_BASE] & PCI_IO_RANGE_TYPE_32) {
+ shift = 16;
+ } else {
+ shift = 8;
+ }
+ base = ((uint32_t)d->config[PCI_IO_BASE] & ~PCI_IO_RANGE_TYPE_MASK)
+ << shift;
+ base |= (uint32_t)pci_config_get_word(d, PCI_IO_BASE_UPPER16) << 16;
+ limit = ((uint32_t)d->config[PCI_IO_LIMIT] & ~PCI_IO_RANGE_TYPE_MASK)
+ << shift;
+ limit |= (uint32_t)pci_config_get_word(d, PCI_IO_LIMIT_UPPER16) << 16;
+ limit |= 0xfff;
+ monitor_printf(mon, " IO range [0x%04"PRIx64", 0x%04"PRIx64"]\n",
+ base, limit);
+
+ shift = 16;
+ base = ((uint32_t)pci_config_get_word(d, PCI_MEMORY_BASE) &
+ PCI_MEMORY_RANGE_MASK) << shift;
+ limit = ((uint32_t)pci_config_get_word(d, PCI_MEMORY_LIMIT) &
+ PCI_MEMORY_RANGE_MASK) << shift;
+ limit |= 0xfffff;
+ monitor_printf(mon,
+ " MEM range [0x%08"PRIx64", 0x%08"PRIx64"]\n",
+ base, limit);
+ shift = 16;
+ base = ((uint64_t)pci_config_get_word(d, PCI_PREF_MEMORY_BASE) &
+ PCI_PREF_RANGE_MASK) << shift;
+ limit = ((uint64_t)pci_config_get_word(d, PCI_PREF_MEMORY_LIMIT) &
+ PCI_PREF_RANGE_MASK) << shift;
+ base |= (uint64_t)pci_config_get_long(d, PCI_PREF_BASE_UPPER32) << 32;
+ limit |= (uint64_t)pci_config_get_long(d, PCI_PREF_LIMIT_UPPER32) <<
32;
+ limit |= 0xfffff;
+ monitor_printf(mon,
+ " pref MEM range [0x%08"PRIx64", 0x%08"PRIx64"]\n",
+ base, limit);
}
for(i = 0;i < PCI_NUM_REGIONS; i++) {
r = &d->io_regions[i];
--
1.6.0.2
- [Qemu-devel] [PATCH 47/61] pci.h: add more status constats., (continued)
- [Qemu-devel] [PATCH 47/61] pci.h: add more status constats., Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 57/61] ioapic: add callback when entry is set or ioapic is reset, Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 24/61] pci: define a constant to represent a unmapped bar and use it., Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 18/61] pc: split out piix specific part from pc.c into pc_piix.c, Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 42/61] pci/brdige: qdevfy and initialize secondary bus and subordinate bus., Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 35/61] piix_pci: use pci_swizzle_map_irq_fn()., Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 34/61] pci: introduce pci_swizzle_map_irq_fn() for interrupt pin swizzle., Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 60/61] pci: add opaque arg to pci_map_irq_fn., Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 46/61] pci/bridge: implement intel 82801ba bridge., Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 40/61] pci: use qdev to get parent bus with PCIBus., Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 45/61] pci/monitor: print out bridge's filtering values and so on.,
Isaku Yamahata <=
- [Qemu-devel] [PATCH 29/61] pci: factor out the logic to get pci device from address., Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 08/61] pc: make an unnecessary global variable, pit, local., Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 52/61] pci: add a hook to replace default pci bus instead of 0 bus., Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 33/61] pci: use the symbolic constant, PCI_ROM_ADDRESS_ENABLE instead of 1., Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 48/61] pci id: add subclass codes for serial device., Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 13/61] pc: split out cpu initialization from pc_init1() into pc_cpus_init()., Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 10/61] pc: remove a global variable, RTCState *rtc_state., Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 25/61] pci: use uint64_t for bar addr and size instead of uint32_t., Isaku Yamahata, 2009/09/30
- [Qemu-devel] Re: [PATCH 00/61] Q35 chip set and stuff., Michael S. Tsirkin, 2009/09/30