Retire PciHotplugDeviceGuid.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8482 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -45,76 +45,6 @@ InstallHotPlugRequestProtocol (
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
Install protocol gEfiPciHotplugDeviceGuid into hotplug device
|
||||
instance.
|
||||
|
||||
@param PciIoDevice hotplug device instance.
|
||||
|
||||
**/
|
||||
VOID
|
||||
InstallPciHotplugGuid (
|
||||
IN PCI_IO_DEVICE *PciIoDevice
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
if (!FeaturePcdGet (PcdPciBusHotplugDeviceSupport)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (IS_CARDBUS_BRIDGE (&PciIoDevice->Parent->Pci)) {
|
||||
|
||||
Status = gBS->InstallProtocolInterface (
|
||||
&PciIoDevice->Handle,
|
||||
&gEfiPciHotplugDeviceGuid,
|
||||
EFI_NATIVE_INTERFACE,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
UnInstall protocol gEfiPciHotplugDeviceGuid into hotplug device
|
||||
instance.
|
||||
|
||||
@param PciIoDevice hotplug device instance.
|
||||
|
||||
**/
|
||||
VOID
|
||||
UninstallPciHotplugGuid (
|
||||
IN PCI_IO_DEVICE *PciIoDevice
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
if (!FeaturePcdGet (PcdPciBusHotplugDeviceSupport)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Status = gBS->OpenProtocol (
|
||||
PciIoDevice->Handle,
|
||||
&gEfiPciHotplugDeviceGuid,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
EFI_OPEN_PROTOCOL_TEST_PROTOCOL
|
||||
);
|
||||
|
||||
if (Status == EFI_SUCCESS) {
|
||||
//
|
||||
// This may triger CardBus driver to stop for
|
||||
// Pccard devices opened the GUID via BY_DRIVER
|
||||
//
|
||||
Status = gBS->UninstallProtocolInterface (
|
||||
PciIoDevice->Handle,
|
||||
&gEfiPciHotplugDeviceGuid,
|
||||
NULL
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Retrieve the BAR information via PciIo interface.
|
||||
|
||||
|
Reference in New Issue
Block a user