X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=IntelFrameworkModulePkg%2FBus%2FPci%2FPciBusDxe%2FPciCommand.c;h=31bdd8d23425b33171dd0c8cf634891378d16f96;hp=af11143e92af2c66b310be2049dbbcd906572657;hb=f680f867cee25f6aad522d7e3960c0046c3bba61;hpb=94853f20f34fdce04673c734366d3a53af498325 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,