]> Git Repo - qemu.git/commitdiff
pci: helper functions to access PCIDevice::config
authorIsaku Yamahata <[email protected]>
Fri, 30 Oct 2009 12:20:59 +0000 (21:20 +0900)
committerAnthony Liguori <[email protected]>
Mon, 9 Nov 2009 14:43:04 +0000 (08:43 -0600)
add helper functions to get/set PCIDevice::config
Those will be used later.

Signed-off-by: Isaku Yamahata <[email protected]>
Acked-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
hw/pci.h

index bab9caba98019f1ea5c7fe7ee8485c0220c63ad8..157995c96dc9a0424e47a5568c26392fcdc66a7f 100644 (file)
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -311,6 +311,18 @@ pci_get_long(uint8_t *config)
     return le32_to_cpupu((uint32_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)
 {
This page took 0.033508 seconds and 4 git commands to generate.