From c6b5fb7386c3a9a7fcfe0eead717f4248a7af346 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Fri, 1 Jul 2016 01:44:38 +0200 Subject: MdeModulePkg/PciBusDxe: look for the right capability in IsSHPC() 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." Cc: Alex Williamson Cc: Andrew Fish Cc: Feng Tian Cc: Jordan Justen Cc: Marcel Apfelbaum Cc: Michael Kinney Cc: Ruiyu Ni Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek Reviewed-by: Ruiyu Ni --- MdeModulePkg/Bus/Pci/PciBusDxe/PciHotPlugSupport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MdeModulePkg') diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciHotPlugSupport.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciHotPlugSupport.c index 257874b8b0..ca8766869a 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 ); -- cgit v1.2.3