]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciLib.h
Retire PciHotplugDeviceGuid.
[mirror_edk2.git] / IntelFrameworkModulePkg / Bus / Pci / PciBusDxe / PciLib.h
index 80c3af6c6cf94abd7c4b3e4fa22e00f7f0a4e1d4..91ff03159d5a4d42cd30c31e7340f287202b0dbf 100644 (file)
@@ -23,8 +23,8 @@ Revision History
 \r
 **/\r
 \r
-#ifndef _EFI_PCI_LIB_H\r
-#define _EFI_PCI_LIB_H\r
+#ifndef _EFI_PCI_LIB_H_\r
+#define _EFI_PCI_LIB_H_\r
 \r
 //\r
 // Mask definistions for PCD PcdPciIncompatibleDeviceSupportMask\r
@@ -53,39 +53,15 @@ typedef struct {
   Install protocol gEfiPciHotPlugRequestProtocolGuid\r
   @param Status    return status of protocol installation.\r
 **/\r
-void\r
+VOID\r
 InstallHotPlugRequestProtocol (\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
+  Retrieve the BAR information via PciIo interface.\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
-  @param PciIoDevice Pci device instance\r
+  @param PciIoDevice Pci device instance.\r
 **/\r
 VOID\r
 GetBackPcCardBar (\r
@@ -96,8 +72,8 @@ GetBackPcCardBar (
   Remove rejected pci device from specific root bridge\r
   handle.\r
   \r
-  @param RootBridgeHandle  specific parent root bridge handle\r
-  @param Bridge            Bridge device instance\r
+  @param RootBridgeHandle  specific parent root bridge handle.\r
+  @param Bridge            Bridge device instance.\r
   \r
   @retval EFI_SUCCESS  Success operation.\r
 **/\r
@@ -110,7 +86,7 @@ RemoveRejectedPciDevices (
 /**\r
   Wrapper function for allocating resource for pci host bridge.\r
   \r
-  @param PciResAlloc Point to protocol instance EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL\r
+  @param PciResAlloc Point to protocol instance EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.\r
   \r
 **/\r
 EFI_STATUS\r
@@ -118,11 +94,23 @@ PciHostBridgeResourceAllocator (
   IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc\r
   );\r
 \r
+/**\r
+  Wrapper function for allocating resource for pci host bridge without hotplug device support.\r
+  \r
+  @param PciResAlloc Point to protocol instance EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.\r
+  \r
+**/\r
 EFI_STATUS\r
 PciHostBridgeResourceAllocator_WithoutHotPlugDeviceSupport (\r
   IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc\r
   );\r
 \r
+/**\r
+  Wrapper function for allocating resource for pci host bridge with hotplug device support.\r
+  \r
+  @param PciResAlloc Point to protocol instance EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.\r
+  \r
+**/\r
 EFI_STATUS\r
 PciHostBridgeResourceAllocator_WithHotPlugDeviceSupport (\r
   IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc\r
@@ -130,15 +118,15 @@ PciHostBridgeResourceAllocator_WithHotPlugDeviceSupport (
 \r
 /**\r
   Wapper function of scanning pci bus and assign bus number to the given PCI bus system\r
-  Feature flag PcdPciBusHotplugDeviceSupport determine whether need support hotplug  \r
+  Feature flag PcdPciBusHotplugDeviceSupport determine whether need support hotplug.  \r
   \r
-  @param  Bridge          Bridge device instance\r
-  @param  StartBusNumber  start point\r
-  @param  SubBusNumber    Point to sub bus number\r
-  @param  PaddedBusRange  Customized bus number\r
+  @param  Bridge          Bridge device instance.\r
+  @param  StartBusNumber  start point.\r
+  @param  SubBusNumber    Point to sub bus number.\r
+  @param  PaddedBusRange  Customized bus number.\r
   \r
-  @retval EFI_SUCCESS     Success\r
-  @retval EFI_DEVICE_ERROR Fail to scan bus\r
+  @retval EFI_SUCCESS     Success.\r
+  @retval EFI_DEVICE_ERROR Fail to scan bus.\r
 **/\r
 EFI_STATUS\r
 PciScanBus (\r
@@ -148,6 +136,18 @@ PciScanBus (
   OUT UINT8                             *PaddedBusRange\r
   );\r
 \r
+/**\r
+  Wapper function of scanning pci bus and assign bus number to the given PCI bus system\r
+  Feature flag PcdPciBusHotplugDeviceSupport determine whether need support hotplug.  \r
+  \r
+  @param  Bridge          Bridge device instance.\r
+  @param  StartBusNumber  start point.\r
+  @param  SubBusNumber    Point to sub bus number.\r
+  @param  PaddedBusRange  Customized bus number.\r
+  \r
+  @retval EFI_SUCCESS     Success.\r
+  @retval EFI_DEVICE_ERROR Fail to scan bus.\r
+**/\r
 EFI_STATUS\r
 PciScanBus_WithHotPlugDeviceSupport (\r
   IN PCI_IO_DEVICE                      *Bridge,\r
@@ -156,6 +156,18 @@ PciScanBus_WithHotPlugDeviceSupport (
   OUT UINT8                             *PaddedBusRange\r
   );\r
 \r
+/**\r
+  Wapper function of scanning pci bus and assign bus number to the given PCI bus system\r
+  Feature flag PcdPciBusHotplugDeviceSupport determine whether need support hotplug.  \r
+  \r
+  @param  Bridge          Bridge device instance.\r
+  @param  StartBusNumber  start point.\r
+  @param  SubBusNumber    Point to sub bus number.\r
+  @param  PaddedBusRange  Customized bus number.\r
+  \r
+  @retval EFI_SUCCESS     Success.\r
+  @retval EFI_DEVICE_ERROR Fail to scan bus.\r
+**/\r
 EFI_STATUS\r
 PciScanBus_WithoutHotPlugDeviceSupport (\r
   IN PCI_IO_DEVICE                      *Bridge,\r
@@ -165,25 +177,24 @@ PciScanBus_WithoutHotPlugDeviceSupport (
   );\r
 \r
 /**\r
-  Process Option Rom on this host bridge\r
+  Process Option Rom on this host bridge.\r
   \r
-  @param Bridge  Pci bridge device instance\r
+  @param Bridge  Pci bridge device instance.\r
   \r
-  @retval EFI_SUCCESS Success\r
+  @retval EFI_SUCCESS Success.\r
 **/\r
-\r
 EFI_STATUS\r
 PciRootBridgeP2CProcess (\r
   IN PCI_IO_DEVICE *Bridge\r
   );\r
 \r
 /**\r
-  Process Option Rom on this host bridge\r
+  Process Option Rom on this host bridge.\r
   \r
-  @param PciResAlloc Pointer to instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL\r
+  @param PciResAlloc Pointer to instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.\r
   \r
-  @retval EFI_NOT_FOUND Can not find the root bridge instance\r
-  @retval EFI_SUCCESS   Success process\r
+  @retval EFI_NOT_FOUND Can not find the root bridge instance.\r
+  @retval EFI_SUCCESS   Success process.\r
 **/\r
 EFI_STATUS\r
 PciHostBridgeP2CProcess (\r
@@ -192,15 +203,14 @@ PciHostBridgeP2CProcess (
 \r
 /**\r
   This function is used to enumerate the entire host bridge\r
-  in a given platform\r
+  in a given platform.\r
 \r
   @param PciResAlloc   A pointer to the resource allocate protocol.\r
 \r
-  @retval EFI_OUT_OF_RESOURCES no enough resource\r
-  @retval EFI_SUCCESS Success\r
+  @retval EFI_OUT_OF_RESOURCES no enough resource.\r
+  @retval EFI_SUCCESS Success.\r
 \r
 **/\r
-\r
 EFI_STATUS\r
 PciHostBridgeEnumerator (\r
   EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL  *PciResAlloc\r
@@ -211,7 +221,8 @@ PciHostBridgeEnumerator (
 \r
   @param  PciIo               A pointer to the EFI_PCI_O_PROTOCOL.\r
   @param  Width               Signifies the width of the memory operations.\r
-  @Param  Address             The address within the PCI configuration space for the PCI controller.\r
+  @param  Address             The address within the PCI configuration space for the PCI controller.\r
+  @param  Count               The number of unit to be read.\r
   @param  Buffer              For read operations, the destination buffer to store the results. For\r
                               write operations, the source buffer to write data from.\r
 \r
@@ -235,7 +246,8 @@ PciIoRead (
 \r
   @param  PciIo               A pointer to the EFI_PCI_O_PROTOCOL.\r
   @param  Width               Signifies the width of the memory operations.\r
-  @Param  Address             The address within the PCI configuration space for the PCI controller.\r
+  @param  Address             The address within the PCI configuration space for the PCI controller.\r
+  @param  Count               The number of unit to be write.\r
   @param  Buffer              For read operations, the destination buffer to store the results. For\r
                               write operations, the source buffer to write data from.\r
 \r
@@ -260,7 +272,8 @@ PciIoWrite (
   @param  PciRootBridgeIo     A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
   @param  Pci                 A pointer to PCI_TYPE00.\r
   @param  Width               Signifies the width of the memory operations.\r
-  @Param  Address             The address within the PCI configuration space for the PCI controller.\r
+  @param  Address             The address within the PCI configuration space for the PCI controller.\r
+  @param  Count               The number of unit to be write.\r
   @param  Buffer              For read operations, the destination buffer to store the results. For\r
                               write operations, the source buffer to write data from.\r
 \r
@@ -286,7 +299,8 @@ PciRootBridgeIoWrite (
   @param  PciRootBridgeIo     A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
   @param  Pci                 A pointer to PCI_TYPE00.\r
   @param  Width               Signifies the width of the memory operations.\r
-  @Param  Address             The address within the PCI configuration space for the PCI controller.\r
+  @param  Address             The address within the PCI configuration space for the PCI controller.\r
+  @param  Count               The number of unit to be read.\r
   @param  Buffer              For read operations, the destination buffer to store the results. For\r
                               write operations, the source buffer to write data from.\r
 \r
@@ -299,7 +313,7 @@ PciRootBridgeIoWrite (
 EFI_STATUS\r
 PciRootBridgeIoRead (\r
   IN       EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL        *PciRootBridgeIo,\r
-  IN       PCI_TYPE00                             *Pci,\r
+  IN       PCI_TYPE00                             *Pci,         OPTIONAL\r
   IN       EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH  Width,\r
   IN       UINT64                                 Address,\r
   IN       UINTN                                  Count,\r