I am trying to figure out if KMDF and other kernel mode frameworks (NDIS, StorPort, WDDM) have a facility whereby the driver managing the device can handle rebalancing of PCIe resources specifically PCIe MMIO bars.
As an example, let us say I have a PCie function requesting 2 GB 64-bit BAR. BIOS has assigned a physical address and wrote the address in the BAR.
My driver for the PCIe function is happy (It does MmMapIOSpace and gets a CPU virtual address).
Now another PCIe device is hot plugged into the system and this PCIe function requests a large physical address space (physically contiguous space).
OS sees it does not have that much of a hole in 64-bit address space and wants to move my PCIe function to another 2 GB hole in the physical address space so it can satisfy the requirements.
This means my driver has to be notified of this change but the driver has to go through the whole AddDevice() so it can release the existing mappings and do a new MMapIoSpace.
Are there facilities in the KMDF and other kernel driver frameworks to let the driver know of these changes (obviously traffic has to be quiesced and other details are there)?
If so, what would they be?. For now, I am curious about KMDF driver framework.
Thanks,
RK