How do you find the PCI memory hole on x86?

1.1k views Asked by At

I ask as it's really hard to find solid/official documentation on a lot of things to do with x86 programming beyond the basic bootloader/real mode interrupts/protected mode/write to VGA memory tasks one would do when learning about basic OS development.

After reading the Wikipedia articles about x86 architecture, chipsets, I/O Controller Hub, and PCI/PCI Express to get a better understanding, it is apparent that there are 2 ways of accessing PCI interfaces: I/O ports and Memory Mapped IO.

I (incorrectly?) understand that using x86 I/O ports is considered a legacy method and is not recommended, so using the PCI MMIO access method (through the PCI "memory hole") would be preferable, but I cannot find any guides/information/source code that do not use I/O ports like 0xCF8/0xCFC to access/probe PCI, do configuration etc.

Where is the PCI memory hole? How can I access/probe PCI purely through MMIO?

I tried reading the Linux PCI code, but I am too unfamiliar with it and Linux kernel structure to have any proper idea about what is going on or how to properly navigate around, so anyone in the know who could clarify how it accomplishes this, I would greatly appreciate it!

0

There are 0 answers