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