[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [patch 1/2] add pci config space struct
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [patch 1/2] add pci config space struct |
Date: |
Tue, 26 Aug 2008 12:40:30 +0200 |
User-agent: |
Thunderbird 2.0.0.16 (X11/20080723) |
Hi,
This patch adds a struct for the pci config header make it easier to
deal with it. Comes from qemu-xen.
cheers,
Gerd
>From b46342e5ea1c1d47b040becc2352ea03c9b3a33d Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <address@hidden>
Date: Tue, 26 Aug 2008 12:11:53 +0200
Subject: [PATCH] pci: add config space struct (from qemu-xen).
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/pci.h | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/hw/pci.h b/hw/pci.h
index e870987..2b1ebba 100644
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -6,6 +6,32 @@
/* PCI bus */
+struct pci_config_header {
+ uint16_t vendor_id;
+ uint16_t device_id;
+ uint16_t command;
+ uint16_t status;
+ uint8_t revision;
+ uint8_t api;
+ uint8_t subclass;
+ uint8_t class;
+ uint8_t cache_line_size; /* Units of 32 bit words */
+ uint8_t latency_timer; /* In units of bus cycles */
+ uint8_t header_type; /* Should be 0 */
+ uint8_t bist; /* Built in self test */
+ uint32_t base_address_regs[6];
+ uint32_t reserved1;
+ uint16_t sub_vendor_id;
+ uint16_t sub_device_id;
+ uint32_t rom_addr;
+ uint32_t reserved3;
+ uint32_t reserved4;
+ uint8_t interrupt_line;
+ uint8_t interrupt_pin;
+ uint8_t min_gnt;
+ uint8_t max_lat;
+};
+
extern target_phys_addr_t pci_mem_base;
typedef void PCIConfigWriteFunc(PCIDevice *pci_dev,
--
1.5.5.1