#include <Protocol/PciHostBridgeResourceAllocation.h>\r
#include <Protocol/PciIo.h>\r
#include <Protocol/LoadFile2.h>\r
-#include <Guid/PciHotplugDevice.h>\r
#include <Protocol/PciRootBridgeIo.h>\r
#include <Protocol/PciHotPlugRequest.h>\r
#include <Protocol/DevicePath.h>\r
\r
[Guids]\r
gEfiPciOptionRomTableGuid # SOMETIMES_CONSUMED System Table\r
- gEfiPciHotplugDeviceGuid # PRIVATE\r
- gEfiPciOptionRomTableGuid # SOMETIMES_CONSUMED\r
\r
[Protocols]\r
gEfiPciHotPlugRequestProtocolGuid # PROTOCOL ALWAYS_PRODUCED\r
return Status;\r
}\r
\r
- //\r
- // Install Pccard Hotplug GUID for Pccard device so that\r
- // to notify CardBus driver to stop the device when de-register happens\r
- //\r
- InstallPciHotplugGuid (PciIoDevice);\r
-\r
if (Handle != NULL) {\r
*Handle = PciIoDevice->Handle;\r
}\r
CurrentLink = CurrentLink->ForwardLink;\r
}\r
}\r
- //\r
- // Uninstall Pccard Hotplug GUID for Pccard device\r
- //\r
- UninstallPciHotplugGuid (PciIoDevice);\r
\r
//\r
// Close the child handle\r
);\r
}\r
\r
-/**\r
- Install protocol gEfiPciHotplugDeviceGuid into hotplug device\r
- instance.\r
- \r
- @param PciIoDevice hotplug device instance.\r
- \r
-**/\r
-VOID\r
-InstallPciHotplugGuid (\r
- IN PCI_IO_DEVICE *PciIoDevice\r
- )\r
-{\r
- EFI_STATUS Status;\r
-\r
- if (!FeaturePcdGet (PcdPciBusHotplugDeviceSupport)) {\r
- return;\r
- }\r
-\r
- if (IS_CARDBUS_BRIDGE (&PciIoDevice->Parent->Pci)) {\r
-\r
- Status = gBS->InstallProtocolInterface (\r
- &PciIoDevice->Handle,\r
- &gEfiPciHotplugDeviceGuid,\r
- EFI_NATIVE_INTERFACE,\r
- NULL\r
- );\r
- ASSERT_EFI_ERROR (Status);\r
- }\r
-}\r
-\r
-/**\r
- UnInstall protocol gEfiPciHotplugDeviceGuid into hotplug device\r
- instance.\r
- \r
- @param PciIoDevice hotplug device instance.\r
- \r
-**/\r
-VOID\r
-UninstallPciHotplugGuid (\r
- IN PCI_IO_DEVICE *PciIoDevice\r
- )\r
-{\r
- EFI_STATUS Status;\r
-\r
- if (!FeaturePcdGet (PcdPciBusHotplugDeviceSupport)) {\r
- return;\r
- }\r
-\r
- Status = gBS->OpenProtocol (\r
- PciIoDevice->Handle,\r
- &gEfiPciHotplugDeviceGuid,\r
- NULL,\r
- NULL,\r
- NULL,\r
- EFI_OPEN_PROTOCOL_TEST_PROTOCOL\r
- );\r
-\r
- if (Status == EFI_SUCCESS) {\r
- //\r
- // This may triger CardBus driver to stop for\r
- // Pccard devices opened the GUID via BY_DRIVER\r
- //\r
- Status = gBS->UninstallProtocolInterface (\r
- PciIoDevice->Handle,\r
- &gEfiPciHotplugDeviceGuid,\r
- NULL\r
- );\r
- }\r
-}\r
-\r
/**\r
Retrieve the BAR information via PciIo interface.\r
\r
IN EFI_STATUS *Status\r
);\r
\r
-/**\r
- Install protocol gEfiPciHotplugDeviceGuid into hotplug device\r
- instance.\r
- \r
- @param PciIoDevice hotplug device instance.\r
- \r
-**/\r
-VOID\r
-InstallPciHotplugGuid (\r
- IN PCI_IO_DEVICE *PciIoDevice\r
- );\r
-\r
-/**\r
- UnInstall protocol gEfiPciHotplugDeviceGuid into hotplug device\r
- instance.\r
- \r
- @param PciIoDevice hotplug device instance.\r
- \r
-**/\r
-VOID\r
-UninstallPciHotplugGuid (\r
- IN PCI_IO_DEVICE *PciIoDevice\r
- );\r
-\r
/**\r
Retrieve the BAR information via PciIo interface.\r
\r
+++ /dev/null
-/** @file\r
- GUIDs used to indicate the device is Pccard hotplug device\r
- \r
-Copyright (c) 2006, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution. The full text of the license may be found at \r
-http://opensource.org/licenses/bsd-license.php \r
- \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
-\r
-**/\r
-\r
-#ifndef __PCI_HOTPLUG_DEVICE_GUID_H_\r
-#define __PCI_HOTPLUG_DEVICE_GUID_H_\r
-\r
-#define EFI_PCI_HOTPLUG_DEVICE_GUID \\r
- { 0x0b280816, 0x52e7, 0x4e51, {0xaa, 0x57, 0x11, 0xbd, 0x41, 0xcb, 0xef, 0xc3 } }\r
-\r
-extern EFI_GUID gEfiPciHotplugDeviceGuid;\r
-\r
-#endif // __PCI_HOTPLUG_DEVICE_GUID_H_\r
-\r
## Include/Guid/PciOptionRomTable.h\r
gEfiPciOptionRomTableGuid = { 0x7462660F, 0x1CBD, 0x48DA, { 0xAD, 0x11, 0x91, 0x71, 0x79, 0x13, 0x83, 0x1C }}\r
\r
- ## Include/Guid/PciHotplugDevice.h\r
- gEfiPciHotplugDeviceGuid = { 0x0B280816, 0x52E7, 0x4E51, { 0xAA, 0x57, 0x11, 0xBD, 0x41, 0xCB, 0xEF, 0xC3 }}\r
-\r
gEfiIntelFrameworkModulePkgTokenSpaceGuid = { 0xD3705011, 0xBC19, 0x4af7, { 0xBE, 0x16, 0xF6, 0x80, 0x30, 0x37, 0x8C, 0x15 }}\r
\r
## Include/Guid/CustomDecompress.h\r