]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkModulePkg/Include/Protocol/PciHotPlugRequest.h
Committing changes to the comments, to improve code documentation.
[mirror_edk2.git] / IntelFrameworkModulePkg / Include / Protocol / PciHotPlugRequest.h
CommitLineData
8ca67c46 1/** @file\r
7b6b7746 2 Provides services to notify the PCI bus driver that some events have happened in a hot-plug controller\r
3 (such as a PC Card socket, or PHPC), and to ask the PCI bus driver to create or destroy handles for \r
20774adc 4 PCI-like devices.\r
a9102619 5\r
f4671790 6Copyright (c) 2006 - 2009, Intel Corporation \r
a9102619 7All rights reserved. This program and the accompanying materials \r
8are licensed and made available under the terms and conditions of the BSD License \r
9which accompanies this distribution. The full text of the license may be found at \r
10http://opensource.org/licenses/bsd-license.php \r
11 \r
12THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
13WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
14\r
3db51098 15**/\r
a9102619 16\r
17#ifndef __PCI_HOTPLUG_REQUEST_H_\r
18#define __PCI_HOTPLUG_REQUEST_H_\r
19\r
20#define EFI_PCI_HOTPLUG_REQUEST_PROTOCOL_GUID \\r
d9aef0a8 21 {\r
22 0x19cb87ab, 0x2cb9, 0x4665, {0x83, 0x60, 0xdd, 0xcf, 0x60, 0x54, 0xf7, 0x9d} \\r
23 }\r
a9102619 24\r
25typedef enum {\r
20774adc
LG
26 ///\r
27 /// The PCI bus driver is requested to create handles for the specified devices. An array of\r
7b6b7746 28 /// EFI_HANDLE is returned, with a NULL element marking the end of the array.\r
20774adc 29 ///\r
a9102619 30 EfiPciHotPlugRequestAdd,\r
20774adc
LG
31\r
32 ///\r
33 /// The PCI bus driver is requested to destroy handles for the specified devices.\r
34 ///\r
a9102619 35 EfiPciHotplugRequestRemove\r
36} EFI_PCI_HOTPLUG_OPERATION;\r
37\r
38typedef struct _EFI_PCI_HOTPLUG_REQUEST_PROTOCOL EFI_PCI_HOTPLUG_REQUEST_PROTOCOL;\r
39\r
f4671790 40/**\r
7b6b7746 41 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
d9aef0a8 42 @param This A pointer to the hot plug request protocol.\r
43 @param Operation The operation the PCI bus driver is requested to make.\r
44 @param Controller The handle of the hot-plug controller.\r
45 @param RemainingDevicePath The remaining device path for the PCI-like hot-plug device.\r
7b6b7746 46 @param NumberOfChildren The number of child handles. For an add operation, it is an output parameter. \r
d9aef0a8 47 For a remove operation, it's an input parameter. When it contains a non-zero\r
48 value, children handles specified in ChildHandleBuffer are destroyed. Otherwise,\r
49 PCI bus driver is notified to stop managing the controller handle.\r
7b6b7746 50 @param ChildHandleBuffer The buffer which contains the child handles. For an add operation, it is an output \r
d9aef0a8 51 parameter and contains all newly created child handles. For a remove operation, it \r
52 contains child handles to be destroyed when NumberOfChildren contains a non-\r
53 zero value. It can be NULL when NumberOfChildren is 0. It's the caller's \r
54 responsibility to allocate and free memory for this buffer.\r
f4671790 55 \r
20774adc
LG
56 @retval EFI_SUCCESS The handles for the specified device have been created or destroyed\r
57 as requested, and for an add operation, the new handles are\r
58 returned in ChildHandleBuffer.\r
d9aef0a8 59 @retval EFI_INVALID_PARAMETER Operation is not a legal value.\r
60 @retval EFI_INVALID_PARAMETER Controller is NULL or not a valid handle.\r
61 @retval EFI_INVALID_PARAMETER NumberOfChildren is NULL.\r
62 @retval EFI_INVALID_PARAMETER ChildHandleBuffer is NULL while Operation is remove and \r
63 NumberOfChildren contains a non-zero value.\r
64 @retval EFI_INVALID_PARAMETER ChildHandleBuffer is NULL while Operation is add.\r
65 @retval EFI_OUT_OF_RESOURCES There are no enough resources to start the devices.\r
f4671790 66**/\r
a9102619 67typedef\r
68EFI_STATUS\r
69(EFIAPI *EFI_PCI_HOTPLUG_REQUEST_NOTIFY) (\r
70 IN EFI_PCI_HOTPLUG_REQUEST_PROTOCOL *This,\r
71 IN EFI_PCI_HOTPLUG_OPERATION Operation,\r
72 IN EFI_HANDLE Controller,\r
73 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL,\r
74 IN OUT UINT8 *NumberOfChildren,\r
75 IN OUT EFI_HANDLE *ChildHandleBuffer\r
76);\r
77\r
78\r
79\r
80struct _EFI_PCI_HOTPLUG_REQUEST_PROTOCOL {\r
81 EFI_PCI_HOTPLUG_REQUEST_NOTIFY Notify;\r
82};\r
83\r
84extern EFI_GUID gEfiPciHotPlugRequestProtocolGuid;\r
85\r
86#endif\r