提交 776e1bbb 编写于 作者: B Blue Swirl

PCI: fix bridge configuration

PCI bridges' qdev info structures must indicate bridge header type,
otherwise critical bridge registers (esp. PCI_PRIMARY_BUS,
PCI_SECONDARY_BUS, PCI_SUBORDINATE_BUS) will not be writable.
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 f139a412
......@@ -365,6 +365,7 @@ static PCIDeviceInfo pbm_pci_host_info = {
.qdev.name = "pbm",
.qdev.size = sizeof(PCIDevice),
.init = pbm_pci_host_init,
.header_type = PCI_HEADER_TYPE_BRIDGE,
};
static void pbm_register_devices(void)
......
......@@ -181,6 +181,7 @@ static PCIDeviceInfo dec_21154_pci_host_info = {
.qdev.name = "dec-21154",
.qdev.size = sizeof(PCIDevice),
.init = dec_21154_pci_host_init,
.header_type = PCI_HEADER_TYPE_BRIDGE,
};
static void grackle_register_devices(void)
......
......@@ -1874,6 +1874,7 @@ static PCIDeviceInfo bridge_info = {
.init = pci_bridge_initfn,
.exit = pci_bridge_exitfn,
.config_write = pci_bridge_write_config,
.header_type = PCI_HEADER_TYPE_BRIDGE,
.qdev.props = (Property[]) {
DEFINE_PROP_HEX32("vendorid", PCIBridge, vid, 0),
DEFINE_PROP_HEX32("deviceid", PCIBridge, did, 0),
......
......@@ -269,6 +269,7 @@ static PCIDeviceInfo dec_21154_pci_host_info = {
.qdev.name = "dec-21154",
.qdev.size = sizeof(PCIDevice),
.init = dec_21154_pci_host_init,
.header_type = PCI_HEADER_TYPE_BRIDGE,
};
static PCIDeviceInfo unin_agp_pci_host_info = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册