From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KXvzP-00021W-Rj for qemu-devel@nongnu.org; Tue, 26 Aug 2008 06:41:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KXvzN-00020c-7O for qemu-devel@nongnu.org; Tue, 26 Aug 2008 06:41:30 -0400 Received: from [199.232.76.173] (port=35271 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KXvzJ-0001zp-Us for qemu-devel@nongnu.org; Tue, 26 Aug 2008 06:41:26 -0400 Received: from mx2.redhat.com ([66.187.237.31]:45027) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KXvzJ-0000uL-De for qemu-devel@nongnu.org; Tue, 26 Aug 2008 06:41:25 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id m7QAemg4013511 for ; Tue, 26 Aug 2008 06:41:09 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m7QAebeQ028567 for ; Tue, 26 Aug 2008 06:40:38 -0400 Received: from zweiblum.travel.kraxel.org (vpn-4-42.str.redhat.com [10.32.4.42]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id m7QAeVQQ014548 for ; Tue, 26 Aug 2008 06:40:32 -0400 Message-ID: <48B3DD9E.3060905@redhat.com> Date: Tue, 26 Aug 2008 12:40:30 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------020209050807090607060100" Subject: [Qemu-devel] [patch 1/2] add pci config space struct Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------020209050807090607060100 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi, This patch adds a struct for the pci config header make it easier to deal with it. Comes from qemu-xen. cheers, Gerd --------------020209050807090607060100 Content-Type: text/plain; name="0018-pci-add-config-space-struct-from-qemu-xen.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename*0="0018-pci-add-config-space-struct-from-qemu-xen.patch" >>From b46342e5ea1c1d47b040becc2352ea03c9b3a33d Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 26 Aug 2008 12:11:53 +0200 Subject: [PATCH] pci: add config space struct (from qemu-xen). Signed-off-by: Gerd Hoffmann --- 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 --------------020209050807090607060100--