qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [patch 1/2] add pci config space struct


From: Avi Kivity
Subject: Re: [Qemu-devel] [patch 1/2] add pci config space struct
Date: Tue, 26 Aug 2008 15:25:08 +0300
User-agent: Thunderbird 2.0.0.16 (X11/20080723)

Gerd Hoffmann wrote:
  Hi,

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

cheers,
  Gerd
+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;
+};

Shouldn't little-endian types be used here to force the users to use little-endian accessors?

--
error compiling committee.c: too many arguments to function





reply via email to

[Prev in Thread] Current Thread [Next in Thread]