WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [Qemu-devel] [PATCH RFC V3 04/12] xen: Add the Xen platf

To: anthony.perard@xxxxxxxxxx
Subject: [Xen-devel] Re: [Qemu-devel] [PATCH RFC V3 04/12] xen: Add the Xen platform pci device
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Fri, 24 Sep 2010 14:10:28 +0900
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, qemu-devel@xxxxxxxxxx, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Delivery-date: Thu, 23 Sep 2010 22:11:28 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1284722107-28550-5-git-send-email-anthony.perard@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1284722107-28550-1-git-send-email-anthony.perard@xxxxxxxxxx> <1284722107-28550-5-git-send-email-anthony.perard@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.19 (2009-01-05)
On Fri, Sep 17, 2010 at 12:14:59PM +0100, anthony.perard@xxxxxxxxxx wrote:
> +static int xen_platform_initfn(PCIDevice *dev)
> +{
> +    PCIXenPlatformState *d = DO_UPCAST(PCIXenPlatformState, pci_dev, dev);
> +    uint8_t *pci_conf;
> +
> +    pci_conf = d->pci_dev.config;
> +
> +    pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_XENSOURCE);
> +    pci_config_set_device_id(pci_conf, 0x0001);
> +    pci_set_word(pci_conf + PCI_COMMAND, PCI_COMMAND_IO | 
> PCI_COMMAND_MEMORY);
> +
> +    pci_config_set_revision(pci_conf, 1);
> +    pci_config_set_prog_interface(pci_conf, 0);
> +
> +    pci_config_set_class(pci_conf, PCI_CLASS_OTHERS << 8 | 0x80);
> +
> +    pci_conf[PCI_HEADER_TYPE] = PCI_HEADER_TYPE_NORMAL;

Eliminate this line. Don't overwrite multifunction bit.
Please refer to 
498238687fd3a2bf3efb32694732f88ceac72e99
6eab3de16d36c48a983366b09d0a0029a5260bc3



> +    pci_conf[PCI_INTERRUPT_PIN] = 1;
> +
> +    /* Microsoft WHQL requires non-zero subsystem IDs. */
> +    /* http://www.pcisig.com/reflector/msg02205.html.  */
> +    pci_set_word(pci_conf + PCI_SUBSYSTEM_VENDOR_ID, 
> pci_conf[PCI_VENDOR_ID]);
> +    pci_set_word(pci_conf + PCI_SUBSYSTEM_ID, 0x0001);
> +
> +    pci_register_bar(&d->pci_dev, 0, 0x100,
> +            PCI_BASE_ADDRESS_SPACE_IO, platform_ioport_map);
> +
> +    /* reserve 16MB mmio address for share memory*/
> +    pci_register_bar(&d->pci_dev, 1, 0x1000000,
> +            PCI_BASE_ADDRESS_MEM_PREFETCH, platform_mmio_map);
> +
> +    platform_fixed_ioport_init(d);
> +
> +    return 0;
> +}

-- 
yamahata

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>