summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciCommand.c
diff options
context:
space:
mode:
Diffstat (limited to 'IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciCommand.c')
-rw-r--r--IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciCommand.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciCommand.c b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciCommand.c
index af11143e92..31bdd8d234 100644
--- a/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciCommand.c
+++ b/IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciCommand.c
@@ -153,11 +153,7 @@ LocateCapabilityRegBlock (
}
}
- while (CapabilityPtr > 0x3F) {
- //
- // Mask it to DWORD alignment per PCI spec
- //
- CapabilityPtr &= 0xFC;
+ while ((CapabilityPtr >= 0x40) && ((CapabilityPtr & 0x03) == 0x00)) {
PciIoRead (
&PciIoDevice->PciIo,
EfiPciIoWidthUint16,