Hello,
I just made PCI vga cards works too. The problem is if the PCI card does not claim PCI IO resource, the bridge's IO enable bit in the command register is not enabled. Even with the legacy forwarding enabled in the bridge control, it still does not forward any legacy vga io. So the pci_bus_enable_resources() should be
void pci_bus_enable_resources(struct device *dev) { uint16_t ctrl;
/* enable IO in command register if there is VGA card * connected with (even it does not claim IO resource) */ if (dev->link[0].bridge_ctrl & PCI_BRIDGE_CTL_VGA) dev->command |= PCI_COMMAND_IO;
ctrl = pci_read_config16(dev, PCI_BRIDGE_CONTROL); ctrl |= dev->link[0].bridge_ctrl; ctrl |= (PCI_BRIDGE_CTL_PARITY + PCI_BRIDGE_CTL_SERR); /* error check */ printk_debug("%s bridge ctrl <- %04x\n", dev_path(dev), ctrl); pci_write_config16(dev, PCI_BRIDGE_CONTROL, ctrl);
pci_dev_enable_resources(dev);
enable_childrens_resources(dev); }