On Tue, Jul 05, 2011 at 05:27:00PM +0200, Gerd Hoffmann wrote:
diff --git a/src/pciinit.c b/src/pciinit.c index bfff3db..b0a712d 100644 --- a/src/pciinit.c +++ b/src/pciinit.c @@ -12,15 +12,83 @@ #include "pci_regs.h" // PCI_COMMAND #include "xen.h" // usingXen
-#define PCI_ROM_SLOT 6 -#define PCI_NUM_REGIONS 7 +#define PCI_IO_INDEX_SHIFT 2 +#define PCI_MEM_INDEX_SHIFT 12
-static void pci_bios_init_device_in_bus(int bus); +#define PCI_BRIDGE_IO_MIN 0x100
This seems a little low: virtio block devices need I think 64 bytes at the moment. To have 32 of these behind a bridge we'll need to allocate 2K of io memory per bridge. this means we can have at most 31 such bridges but that seems a reasonable limitation to me.