Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PCI bridge support #1009

Merged
merged 4 commits into from Sep 23, 2020
Merged

PCI bridge support #1009

merged 4 commits into from Sep 23, 2020

Conversation

Copy link
Member

@richardg867 richardg867 commented Sep 23, 2020

This adds:

  • Support for multiple PCI bus numbers in pci.c
  • Emulation of the DEC/Intel 21150 PCI bridge (9 bus masters, so 9 children)
  • Automatic insertion of a 21150 PCI bridge upon reaching the last NORMAL slot (never run out of slots)
  • Proper emulation of AGP bridges on Intel and VIA chipsets
  • A few IRQ steering fixes on AGP machines

Notes:

  • The meaning of the pci_add_card return value has changed to accomodate for multiple bus numbers. The data type and usage haven't changed.
  • Having a PCI device on the AGP bridge is legal at least on Intel platforms. See the Intel C440GX+ motherboard which uses a 21150 bridge attached to the AGP bus providing 66 MHz PCI slots.
  • On the other hand, VIA AGP bridges accept PCI devices but not PCI bridges ("not enough resources..."), so the PCI slot on VIA AGP bridges is given a special flag to prevent the automatic 21150 from reaching it. Some VIA machines also don't have IRQ steering table entries for the AGP slot (???)
  • Some devices may not like sitting behind bridges. ES1371 gameport is one of them. Can be fixed with a pci.c overhaul, as there is no clean way of rearranging PCI cards right now.
  • If the amount of PCI devices matches the amount of PCI slots, the last device will be alone behind a 21150 bridge. Not a big deal but can be fixed with a pci.c overhaul.
  • Additionally, having just enough PCI devices may result in an empty 21150 bridge being added on VIA AGP systems, due to the no-bridges quirk on the VIA AGP bridges. Same as above, not a big deal but can be fixed with a pci.c overhaul.
  • The PCI_NO_BRIDGES machine PCI type flag disables the automatic 21150 bridge system. It's present just in case there's some BIOS out there that can't handle bridges properly.

@OBattler OBattler merged commit fffb0bb into 86Box:master Sep 23, 2020
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants