Ranges returned by VideoPortGetAccessRanges

I have a couple of questions about the use of VideoPortGetAccessRanges() in a video miniport.

  1. The method has an argument specifying the number of ranges to return so how will I know how many ranges I should request? I think it will be specified in the GPU reference manual. Here’s a screenshot from the PDF for the GPU I’m trying to support. There are 6 rows in this table, so would I request 6 ranges?

  1. Once I know how many ranges I need and VideoPortGetAccessRanges() has returned them, how will I know which is which? For example, there might be one for the framebuffer and one for MMIO. Are they guaranteed to be returned in a certain order, or do I need to check the size of each range and infer what it is?

There is one address range per BAR in the PCI configuration space. From this page, it looks like the device has 3 BARs, but you should check the PCI config space documentation. They are delivered in BAR order.

That makes sense. Thank you. I was able to start matching things in the reference manual with a PCI configuration table I found.

By the way, what on earth are you doing? Writing a graphics driver is an ENORMOUS task. This page is from Intel’s documentation, and all of Intel’s graphics chips already have Windows drivers.

I’m writing a GPL graphics driver for Windows 7 and XP x64.