Get ECAM base address from KMDF

Hello,

Is there a way to get the ECAM base address to get information about the PCI configuration space?
OS is Windows 10, KMDF version is 1.19.
Initially, I used the fixed value (0xE0000000) identified from the device manager, but the value changed due to the CPU change.
Therefore, we would like to deal with this dynamically within the KMDF driver.

Thank you

Is there any way? Yes, of course, you just have to read the ACPI ‘MCFG’ table and off you go. But why would you need to do this? You can access extended configuration space for a device using the supported BUS_INTERFACE_STANDARD function mechanism or the IRP based IRP_MN_READ/WRITE_CONFIG mechanism. Note that the OS is likely to try to prevent you from using non-standard access methods on protected devices.

@Mark_Roddy said:
Is there any way? Yes, of course, you just have to read the ACPI ‘MCFG’ table and off you go. But why would you need to do this? You can access extended configuration space for a device using the supported BUS_INTERFACE_STANDARD function mechanism or the IRP based IRP_MN_READ/WRITE_CONFIG mechanism. Note that the OS is likely to try to prevent you from using non-standard access methods on protected devices.

When doing CvP of a device, I was thinking of mapping and accessing control and status.
I needed the ECAM address for mapping, but as you said you can do it with SetBusData/GetBusData.
I was able to confirm that it works even in environments with different ECAM addresses!
Thank you for your advice.