[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 07/23] pci: helper functions to access PCIDevice::co
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH 07/23] pci: helper functions to access PCIDevice::config |
Date: |
Mon, 5 Oct 2009 19:06:47 +0900 |
add helper functions to get/set PCIDevice::config
Those will be used later.
Signed-off-by: Isaku Yamahata <address@hidden>
Acked-by: Michael S. Tsirkin <address@hidden>
---
hw/pci.h | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/hw/pci.h b/hw/pci.h
index 1bbaf6e..6d2172c 100644
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -311,6 +311,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 01/23] pci: fix PCI_DPRINTF() wrt variadic macro., (continued)
- [Qemu-devel] [PATCH 01/23] pci: fix PCI_DPRINTF() wrt variadic macro., Isaku Yamahata, 2009/10/05
- [Qemu-devel] [PATCH 10/23] pci: introduce FMT_PCIBUS for printf format for pcibus_t., Isaku Yamahata, 2009/10/05
- [Qemu-devel] [PATCH 17/23] pci: fix pci_default_write_config(), Isaku Yamahata, 2009/10/05
- [Qemu-devel] [PATCH 13/23] pci: make pci configuration transaction more accurate., Isaku Yamahata, 2009/10/05
- [Qemu-devel] [PATCH 22/23] pci: initialize wmask according to pci header type., Isaku Yamahata, 2009/10/05
- [Qemu-devel] [PATCH 06/23] pci: define a constant to represent a unmapped bar and use it., Isaku Yamahata, 2009/10/05
- [Qemu-devel] [PATCH 08/23] pci: use helper functions to access pci config space., Isaku Yamahata, 2009/10/05
- [Qemu-devel] [PATCH 07/23] pci: helper functions to access PCIDevice::config,
Isaku Yamahata <=
- [Qemu-devel] [PATCH 21/23] pci/brdige: qdevfy and initialize secondary bus and subordinate bus., Isaku Yamahata, 2009/10/05
- [Qemu-devel] [PATCH 23/23] pci/monitor: print out bridge's filtering values and so on., Isaku Yamahata, 2009/10/05
- [Qemu-devel] [PATCH 04/23] pci: use the symbolic constant, PCI_ROM_ADDRESS_ENABLE instead of 1., Isaku Yamahata, 2009/10/05
- [Qemu-devel] [PATCH 18/23] pci: add helper functions for pci config write function., Isaku Yamahata, 2009/10/05
- [Qemu-devel] [PATCH 09/23] pci: introduce pcibus_t to represent pci bus address/size instead of uint32_t, Isaku Yamahata, 2009/10/05
- [Qemu-devel] [PATCH 19/23] pci: use helper function in pci_default_write_config(), Isaku Yamahata, 2009/10/05
- [Qemu-devel] Re: [PATCH v4 00/23] pci: various pci clean up and pci express support., Michael S. Tsirkin, 2009/10/05