Author: ekohl
Date: Wed Sep 27 22:59:48 2017
New Revision: 75981
URL:
http://svn.reactos.org/svn/reactos?rev=75981&view=rev
Log:
[PCI]
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.
Modified:
trunk/reactos/drivers/bus/pci/pdo.c
Modified: trunk/reactos/drivers/bus/pci/pdo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pci/pdo.c?rev=…
==============================================================================
--- trunk/reactos/drivers/bus/pci/pdo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/pci/pdo.c [iso-8859-1] Wed Sep 27 22:59:48 2017
@@ -355,7 +355,9 @@
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)