[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH V5 05/29] pci: helper functions to access PCIDevice:
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH V5 05/29] pci: helper functions to access PCIDevice::config |
Date: |
Fri, 9 Oct 2009 15:28:38 +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 bab9cab..157995c 100644
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -312,6 +312,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 V5 03/29] pci: use PCI_SLOT() and PCI_FUNC()., (continued)
- [Qemu-devel] [PATCH V5 03/29] pci: use PCI_SLOT() and PCI_FUNC()., Isaku Yamahata, 2009/10/09
- [Qemu-devel] [PATCH V5 01/29] pci: fix PCI_DPRINTF() wrt variadic macro., Isaku Yamahata, 2009/10/09
- [Qemu-devel] [PATCH V5 10/29] pci: make pci_bar() aware of header type 1., Isaku Yamahata, 2009/10/09
- [Qemu-devel] [PATCH V5 04/29] pci: define a constant to represent a unmapped bar and use it., Isaku Yamahata, 2009/10/09
- [Qemu-devel] [PATCH V5 29/29] pci/monitor: print out bridge's filtering values and so on., Isaku Yamahata, 2009/10/09
- [Qemu-devel] [PATCH V5 14/29] pci: introduce FMT_PCIBUS for printf format for pcibus_t., Isaku Yamahata, 2009/10/09
- [Qemu-devel] [PATCH V5 05/29] pci: helper functions to access PCIDevice::config,
Isaku Yamahata <=
- [Qemu-devel] [PATCH V5 09/29] pci: clean up of pci_default_read_config., Isaku Yamahata, 2009/10/09
- [Qemu-devel] [PATCH V5 08/29] pci: s/PCI_ADDRESS_SPACE_/PCI_BASE_ADDRESS_SPACE_/ to match pci_regs.h, Isaku Yamahata, 2009/10/09
- [Qemu-devel] [PATCH V5 28/29] pci: initialize pci config headers depending it pci header type., Isaku Yamahata, 2009/10/09