All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@qumranet.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [patch 1/2] add pci config space struct
Date: Tue, 26 Aug 2008 15:25:08 +0300	[thread overview]
Message-ID: <48B3F624.2060502@qumranet.com> (raw)
In-Reply-To: <48B3DD9E.3060905@redhat.com>

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	other threads:[~2008-08-26 12:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-26 10:40 [Qemu-devel] [patch 1/2] add pci config space struct Gerd Hoffmann
2008-08-26 12:25 ` Avi Kivity [this message]
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=48B3F624.2060502@qumranet.com \
    --to=avi@qumranet.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.