]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Include/Protocol/PciHotPlugRequest.h
Committing changes to the comments, to improve code documentation.
[mirror_edk2.git] / IntelFrameworkModulePkg / Include / Protocol / PciHotPlugRequest.h
index 996b5b3265bed955d072bf2e7cb1553194612286..40c13498e49d367245d374a2b76dea0ff6f41fc5 100644 (file)
@@ -1,5 +1,7 @@
 /** @file\r
-  This protocol is used to add or remove all PCI child devices on the PCI root bridge.\r
+  Provides services to notify the PCI bus driver that some events have happened in a hot-plug controller\r
+  (such as a PC Card socket, or PHPC), and to ask the PCI bus driver to create or destroy handles for \r
+  PCI-like devices.\r
 \r
 Copyright (c) 2006 - 2009, Intel Corporation                                                         \r
 All rights reserved. This program and the accompanying materials                          \r
@@ -16,27 +18,51 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define __PCI_HOTPLUG_REQUEST_H_\r
 \r
 #define EFI_PCI_HOTPLUG_REQUEST_PROTOCOL_GUID \\r
-{0x19cb87ab,0x2cb9,{0x4665,0x83,0x60,0xdd,0xcf,0x60,0x54,0xf7,0x9d}}\r
+  {\r
+    0x19cb87ab, 0x2cb9, 0x4665, {0x83, 0x60, 0xdd, 0xcf, 0x60, 0x54, 0xf7, 0x9d} \\r
+  }\r
 \r
 typedef enum {\r
+  ///\r
+  /// The PCI bus driver is requested to create handles for the specified devices. An array of\r
+  /// EFI_HANDLE is returned, with a NULL element marking the end of the array.\r
+  ///\r
   EfiPciHotPlugRequestAdd,\r
+\r
+  ///\r
+  /// The PCI bus driver is requested to destroy handles for the specified devices.\r
+  ///\r
   EfiPciHotplugRequestRemove\r
 } EFI_PCI_HOTPLUG_OPERATION;\r
 \r
 typedef struct _EFI_PCI_HOTPLUG_REQUEST_PROTOCOL  EFI_PCI_HOTPLUG_REQUEST_PROTOCOL;\r
 \r
 /**\r
-  Hot plug request notify.\r
-  \r
-  @param This                 A pointer to the hot plug request protocol.\r
-  @param Operation            The operation.\r
-  @param Controller           A pointer to the controller.\r
-  @param RemainingDevicePath  A pointer to the device path.\r
-  @param NumberOfChildren     A the number of child handle in the ChildHandleBuffer.\r
-  @param ChildHandleBuffer    A pointer to the array contain the child handle.\r
+  This function allows the PCI bus driver to be notified to act as requested when a hot-plug event has  happened on the hot-plug controller. Currently, the operations include add operation and remove operation.  \r
+  @param This                    A pointer to the hot plug request protocol.\r
+  @param Operation               The operation the PCI bus driver is requested to make.\r
+  @param Controller              The handle of the hot-plug controller.\r
+  @param RemainingDevicePath     The remaining device path for the PCI-like hot-plug device.\r
+  @param NumberOfChildren        The number of child handles. For an add operation, it is an output parameter. \r
+                                 For a remove operation, it's an input parameter. When it contains a non-zero\r
+                                 value, children handles specified in ChildHandleBuffer are destroyed. Otherwise,\r
+                                 PCI bus driver is notified to stop managing the controller handle.\r
+  @param ChildHandleBuffer       The buffer which contains the child handles. For an add operation, it is an output \r
+                                 parameter and contains all newly created child handles. For a remove operation, it \r
+                                 contains child handles to be destroyed when NumberOfChildren contains a non-\r
+                                 zero value. It can be NULL when NumberOfChildren is 0. It's the caller's \r
+                                 responsibility to allocate and free memory for this buffer.\r
   \r
-  @retval EFI_NOT_FOUND Can not find bridge according to controller handle.\r
-  @retval EFI_SUCCESS   Success operating.\r
+  @retval EFI_SUCCESS            The handles for the specified device have been created or destroyed\r
+                                 as requested, and for an add operation, the new handles are\r
+                                 returned in ChildHandleBuffer.\r
+  @retval EFI_INVALID_PARAMETER  Operation is not a legal value.\r
+  @retval EFI_INVALID_PARAMETER  Controller is NULL or not a valid handle.\r
+  @retval EFI_INVALID_PARAMETER  NumberOfChildren is NULL.\r
+  @retval EFI_INVALID_PARAMETER  ChildHandleBuffer is NULL while Operation is remove and \r
+                                 NumberOfChildren contains a non-zero value.\r
+  @retval EFI_INVALID_PARAMETER  ChildHandleBuffer is NULL while Operation is add.\r
+  @retval EFI_OUT_OF_RESOURCES   There are no enough resources to start the devices.\r
 **/\r
 typedef\r
 EFI_STATUS\r