The PCI Hot Plug capability register block is marked with capability ID
0x0C (EFI_PCI_CAPABILITY_ID_SHPC), not 0x06
(EFI_PCI_CAPABILITY_ID_HOTPLUG).

This bug prevents PciBusDxe from recognizing whether a PCI-to-PCI bridge
supports hotplug. In turn the platform's EFI_PCI_HOT_PLUG_INIT_PROTOCOL is
not consulted for resource padding information:

  GatherPpbInfo()                [PciEnumeratorSupport.c]
    GetResourcePaddingPpb()      [PciResourceSupport.c]
      GetResourcePaddingForHpb() [PciHotPlugSupport.c]
        IsPciHotPlugBus()        [PciHotPlugSupport.c]
          IsSHPC()               [PciHotPlugSupport.c]
            //
            // returns FALSE
            //
        //
        // the following is not reached:
        //
        gPciHotPlugInit->GetResourcePadding()

Look for the correct capability ID.

Cc: "Johnson, Brian J." <[email protected]>
Cc: Alex Williamson <[email protected]>
Cc: Andrew Fish <[email protected]>
Cc: Feng Tian <[email protected]>
Cc: Jordan Justen <[email protected]>
Cc: Marcel Apfelbaum <[email protected]>
Cc: Ruiyu Ni <[email protected]>
Cc: Star Zeng <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <[email protected]>
---
 MdeModulePkg/Bus/Pci/PciBusDxe/PciHotPlugSupport.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciHotPlugSupport.c 
b/MdeModulePkg/Bus/Pci/PciBusDxe/PciHotPlugSupport.c
index 257874b8b03e..ca8766869ae7 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciHotPlugSupport.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciHotPlugSupport.c
@@ -300,7 +300,7 @@ IsSHPC (
   Offset = 0;
   Status = LocateCapabilityRegBlock (
             PciIoDevice,
-            EFI_PCI_CAPABILITY_ID_HOTPLUG,
+            EFI_PCI_CAPABILITY_ID_SHPC,
             &Offset,
             NULL
             );
-- 
1.8.3.1


_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to