PCI device BAR registers changes

We are trying to switch our product to use Win11 and UEFI and ran into an issue. We noticed that our device BAR registers are now getting initialized twice instead of just once. Our device driver reads and saves the BAR registers during AddDevice but it appears we are only reading the first set of initialized addresses and missing the second initialization. Is this normal? If it is how do you know when the driver should read the BAR registers again?

Thanks Rony

First of all, you should really consider abandoning WDM and move to WDF. However to answer your question: start device not add device.

1 Like

Thanks Mark I'll try StartDevice.

Thanks again Mark. We verified that moving the BAR values read to StartDevice worked.