[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 02/34] pci: handle BAR mapping at PCI level
From: |
Isaku Yamahata |
Subject: |
Re: [Qemu-devel] [PATCH 02/34] pci: handle BAR mapping at PCI level |
Date: |
Fri, 23 Jul 2010 19:40:00 +0900 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
On Thu, Jul 22, 2010 at 09:54:46PM +0000, Blue Swirl wrote:
> diff --git a/hw/pci.c b/hw/pci.c
> index a98d6f3..49f03fb 100644
> --- a/hw/pci.c
> +++ b/hw/pci.c
...
> @@ -817,6 +825,25 @@ void pci_register_bar(PCIDevice *pci_dev, int region_num,
> pci_set_long(pci_dev->wmask + addr, wmask & 0xffffffff);
> pci_set_long(pci_dev->cmask + addr, 0xffffffff);
> }
> + pci_bar_map(pci_dev, region_num, 0, 0, size, -1);
> +}
> +
> +void pci_bar_map(PCIDevice *pci_dev, int region_num, int subregion_num,
> + pcibus_t offset, pcibus_t size, int ix)
> +{
> + PCIIOSubRegion *s;
> +
> + if ((unsigned int)region_num >= PCI_NUM_REGIONS ||
> + (unsigned int)subregion_num >= PCI_NUM_SUBREGIONS) {
> + return;
> + }
abort() or assert()? It's caller's bug.
--
yamahata