All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [patch 1/2] add pci config space struct
Date: Tue, 26 Aug 2008 12:40:30 +0200	[thread overview]
Message-ID: <48B3DD9E.3060905@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 128 bytes --]

  Hi,

This patch adds a struct for the pci config header make it easier to
deal with it.  Comes from qemu-xen.

cheers,
  Gerd

[-- Attachment #2: 0018-pci-add-config-space-struct-from-qemu-xen.patch --]
[-- Type: text/plain, Size: 1341 bytes --]

>From b46342e5ea1c1d47b040becc2352ea03c9b3a33d Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Tue, 26 Aug 2008 12:11:53 +0200
Subject: [PATCH] pci: add config space struct (from qemu-xen).


Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 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


             reply	other threads:[~2008-08-26 10:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-26 10:40 Gerd Hoffmann [this message]
2008-08-26 12:25 ` [Qemu-devel] [patch 1/2] add pci config space struct Avi Kivity
2008-08-26 14:08   ` Gerd Hoffmann
2008-08-26 14:55     ` Avi Kivity
2008-08-27 10:52       ` Gerd Hoffmann
2008-08-27 12:08 ` Paul Brook
2008-08-27 13:17   ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48B3DD9E.3060905@redhat.com \
    --to=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.