[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 07/25] pci: helper functions to access PCIDevice::co
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH 07/25] pci: helper functions to access PCIDevice::config |
Date: |
Fri, 2 Oct 2009 19:31:39 +0900 |
add helper functions to get/set PCIDevice::config
Those will be used later.
Signed-off-by: Isaku Yamahata <address@hidden>
---
hw/pci.h | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/hw/pci.h b/hw/pci.h
index 00c8947..e79540a 100644
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -310,6 +310,18 @@ pci_get_long(uint8_t *config)
}
static inline void
+pci_set_quad(uint8_t *config, uint64_t val)
+{
+ cpu_to_le64w((uint64_t *)config, val);
+}
+
+static inline uint64_t
+pci_get_quad(uint8_t *config)
+{
+ return le64_to_cpup((uint64_t *)config);
+}
+
+static inline void
pci_config_set_vendor_id(uint8_t *pci_config, uint16_t val)
{
pci_set_word(&pci_config[PCI_VENDOR_ID], val);
--
1.6.0.2
- [Qemu-devel] [PATCH 00/25] pci: various pci clean up and pci express support. V2, Isaku Yamahata, 2009/10/02
- [Qemu-devel] [PATCH 02/25] pci: use appropriate PRIs in PCI_DPRINTF() for portability., Isaku Yamahata, 2009/10/02
- [Qemu-devel] [PATCH 15/25] pci_host.h: split non-inline static function in pci_host.h into pci_host.c, Isaku Yamahata, 2009/10/02
- [Qemu-devel] [PATCH 25/25] pci/monitor: print out bridge's filtering values and so on., Isaku Yamahata, 2009/10/02
- [Qemu-devel] [PATCH 12/25] pci: 64bit bar support., Isaku Yamahata, 2009/10/02
- [Qemu-devel] [PATCH 10/25] pci: introduce FMT_pcibus for printf format for pcibus_t., Isaku Yamahata, 2009/10/02
- [Qemu-devel] [PATCH 14/25] pci: factor out the logic to get pci device from address., Isaku Yamahata, 2009/10/02
- [Qemu-devel] [PATCH 07/25] pci: helper functions to access PCIDevice::config,
Isaku Yamahata <=
- [Qemu-devel] [PATCH 21/25] pci: make bar update function aware of pci bridge., Isaku Yamahata, 2009/10/02
- [Qemu-devel] [PATCH 13/25] pci: make pci configuration transaction more accurate., Isaku Yamahata, 2009/10/02
- [Qemu-devel] [PATCH 24/25] pci: initialize wmask according to pci header type., Isaku Yamahata, 2009/10/02
- [Qemu-devel] [PATCH 18/25] pci: add helper functions for pci config write function., Isaku Yamahata, 2009/10/02
- [Qemu-devel] [PATCH 20/25] pci: factor out config update logic., Isaku Yamahata, 2009/10/02
- [Qemu-devel] [PATCH 22/25] pci/brdige: qdevfy and initialize secondary bus and subordinate bus., Isaku Yamahata, 2009/10/02
- [Qemu-devel] [PATCH 23/25] pci: add helper function to initialize wmask., Isaku Yamahata, 2009/10/02
- [Qemu-devel] [PATCH 08/25] pci: use helper functions to access pci config space., Isaku Yamahata, 2009/10/02
- [Qemu-devel] [PATCH 11/25] pci: typedef pcibus_t as uint64_t instead of uint32_t., Isaku Yamahata, 2009/10/02
- [Qemu-devel] [PATCH 03/25] pci: introduce constant PCI_NUM_PINS for the number of interrupt pins, 4., Isaku Yamahata, 2009/10/02