Hello Gents,
We are encountering a problem with our recent hardware using PCIe instead
PCI. The driver is actually mapping BAR0 using MmMapIoSpace().
Actually everything goes well if we install the driver after boot. The
problem occurs on some machine (15% of the machines) only when the driver
“loads” during boot. I’ve been step tracing this piece of code and
MmMapIoSpace() is returning an address for a given physical address. The
physical address is constant in my case, I verified that loading the driver
after boot or auto start during boot. The address returned by MmMapIoSpace()
before boot does not point to the expected physical memory. This address
actually points to a 0xFFFFFFFF area. Note that the device is displayed
correctly in the device manager.
Then I can proceed with this sequence :
-
Uninstall the device in the device manager
-
Reset the bridge ( the bridge our card connects to ) using PCI tree.
-
Scan for hardware changed in the device manager
-
Install the exact same driver
At this time the BAR reads perfectly. Well of course address returned by
MmMapIoSpace() is different each time but this is expected I guess. We have
never seen such a problem so far before our PCIe card. And this problem is
happening only on some machines, once again.
I’ve tried to get our driver to load last using the SubOrderGroup but the
same problem occurs. On every boot, the address returned by MmMapIoSpace()
seems wrong.
The way that function is called :
DevExt->RegsBase = (PUCHAR) MmMapIoSpace( regsBasePA,
regsLength,
MmNonCached );
Did you guys have seen that already, any pointers?
With my best regards,
Arnaud