]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/PciBusDxe: look for the right capability in IsSHPC()
authorLaszlo Ersek <lersek@redhat.com>
Thu, 30 Jun 2016 23:44:38 +0000 (01:44 +0200)
committerLaszlo Ersek <lersek@redhat.com>
Wed, 13 Jul 2016 06:39:14 +0000 (08:39 +0200)
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." <bjohnson@sgi.com>
Cc: Alex Williamson <alex.williamson@redhat.com>
Cc: Andrew Fish <afish@apple.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Marcel Apfelbaum <marcel@redhat.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ruiyu Ni <Ruiyu.ni@intel.com>
MdeModulePkg/Bus/Pci/PciBusDxe/PciHotPlugSupport.c

index 257874b8b03ed43b7dfada351dac65263d53ceaa..ca8766869ae7aaf87878e9799a0c31f5e9653bb8 100644 (file)
@@ -300,7 +300,7 @@ IsSHPC (
   Offset = 0;\r
   Status = LocateCapabilityRegBlock (\r
             PciIoDevice,\r
-            EFI_PCI_CAPABILITY_ID_HOTPLUG,\r
+            EFI_PCI_CAPABILITY_ID_SHPC,\r
             &Offset,\r
             NULL\r
             );\r