Fix a port base adddress decoding bug. Port base addresses were always decoded like memory base addresses. Because of this bug, a device could have two port address ranges starting at the same base address but with different lengths.

svn path=/trunk/; revision=75981
This commit is contained in:
Eric Kohl 2017-09-27 22:59:48 +00:00
parent 64bf415133
commit 3ebd207ba1

View file

@ -355,7 +355,9 @@ PdoGetRangeLength(PPDO_DEVICE_EXTENSION DeviceExtension,
return TRUE;
}
*Base = OriginalValue.Bar & PCI_ADDRESS_MEMORY_ADDRESS_MASK_64;
*Base = ((OriginalValue.Bar & PCI_ADDRESS_IO_SPACE)
? (OriginalValue.Bar & PCI_ADDRESS_IO_ADDRESS_MASK_64)
: (OriginalValue.Bar & PCI_ADDRESS_MEMORY_ADDRESS_MASK_64));
*Length = ~((NewValue.Bar & PCI_ADDRESS_IO_SPACE)
? (NewValue.Bar & PCI_ADDRESS_IO_ADDRESS_MASK_64)