qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Add and use #defines for PCI device classes


From: Blue Swirl
Subject: Re: [Qemu-devel] [PATCH] Add and use #defines for PCI device classes
Date: Sun, 1 Feb 2009 20:12:59 +0200

On 2/1/09, Stuart Brady <address@hidden> wrote:
> This patch adds and uses #defines for PCI device classes and subclases,
>  using a new pci_config_set_class() function, similar to the recently
>  added pci_config_set_vendor_id() and pci_config_set_device_id().

Nice idea. I think I'll add similar stuff to OpenBIOS too.

>  Index: hw/sun4u.c
>  ===================================================================
>  --- hw/sun4u.c  (revision 6490)
>  +++ hw/sun4u.c  (working copy)
>  @@ -373,8 +373,7 @@ pci_ebus_init(PCIBus *bus, int devfn)
>      s->config[0x07] = 0x03; // status = medium devsel
>      s->config[0x08] = 0x01; // revision
>      s->config[0x09] = 0x00; // programming i/f
>  -    s->config[0x0A] = 0x80; // class_sub = misc bridge
>  -    s->config[0x0B] = 0x06; // class_base = PCI_bridge
>  +    pci_config_set_class(d->config, PCI_CLASS_BRIDGE_OTHER);

Borken, s != d.




reply via email to

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