]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciHotPlugSupport.h
Add function doxygen header for PciBus module.
[mirror_edk2.git] / IntelFrameworkModulePkg / Bus / Pci / PciBusDxe / PciHotPlugSupport.h
CommitLineData
3db51098 1/**@file\r
ead42efc 2\r
3db51098 3Copyright (c) 2006, Intel Corporation \r
ead42efc 4All rights reserved. This program and the accompanying materials \r
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
3db51098 12**/\r
ead42efc 13\r
ead42efc 14\r
15#ifndef _EFI_PCI_HOT_PLUG_SUPPORT_H\r
16#define _EFI_PCI_HOT_PLUG_SUPPORT_H\r
17\r
18\r
19//\r
20// stall 1 second\r
21//\r
22#define STALL_1_SECOND 1000000 \r
23\r
24typedef struct {\r
25 EFI_EVENT Event;\r
26 BOOLEAN Initialized;\r
27 VOID *Padding;\r
28} ROOT_HPC_DATA;\r
29\r
30extern EFI_PCI_HOT_PLUG_INIT_PROTOCOL *gPciHotPlugInit;\r
31extern EFI_HPC_LOCATION *gPciRootHpcPool;\r
32extern UINTN gPciRootHpcCount;\r
33extern ROOT_HPC_DATA *gPciRootHpcData;\r
34\r
57076f45 35/**\r
36 Init HPC private data.\r
37 \r
38 @param Event event object\r
39 @param Context HPC private data.\r
40**/\r
ead42efc 41VOID\r
42EFIAPI\r
43PciHPCInitialized (\r
44 IN EFI_EVENT Event,\r
45 IN VOID *Context\r
46 )\r
ead42efc 47;\r
48\r
57076f45 49/**\r
50 Compare two device path\r
51 \r
52 @param DevicePath1 the first device path want to be compared\r
53 @param DevicePath2 the first device path want to be compared\r
54 \r
55 @retval TRUE equal\r
56 @retval FALSE different\r
57**/\r
ead42efc 58BOOLEAN\r
59EfiCompareDevicePath (\r
60 IN EFI_DEVICE_PATH_PROTOCOL *DevicePath1,\r
61 IN EFI_DEVICE_PATH_PROTOCOL *DevicePath2\r
62 )\r
ead42efc 63;\r
64\r
57076f45 65/**\r
66 Init hot plug support and root hot plug private data.\r
67 \r
68**/\r
ead42efc 69EFI_STATUS\r
70InitializeHotPlugSupport (\r
71 VOID\r
72 )\r
ead42efc 73;\r
74\r
57076f45 75/**\r
76 Test whether PCI device is hot plug bus.\r
77 \r
78 @param PciIoDevice PCI device instance\r
79 \r
80 @retval EFI_SUCCESS PCI device is hot plug bus\r
81 @retval EFI_NOT_FOUND PCI device is not hot plug bus\r
82**/\r
ead42efc 83EFI_STATUS\r
84IsPciHotPlugBus (\r
85 PCI_IO_DEVICE *PciIoDevice\r
86 )\r
ead42efc 87;\r
88\r
57076f45 89/**\r
90 Test whether device path is for root pci hot plug bus\r
91 \r
92 @param HpbdevicePath tested device path\r
93 @param HpIndex Return the index of root hot plug in global array.\r
94 \r
95 @retval TRUE device path is for root pci hot plug\r
96 @retval FALSE device path is not for root pci hot plug\r
97**/\r
ead42efc 98BOOLEAN\r
99IsRootPciHotPlugBus (\r
100 IN EFI_DEVICE_PATH_PROTOCOL *HpbDevicePath,\r
101 OUT UINTN *HpIndex\r
102 )\r
ead42efc 103;\r
104\r
57076f45 105/**\r
106 Test whether device path is for root pci hot plug controller\r
107 \r
108 @param HpbdevicePath tested device path\r
109 @param HpIndex Return the index of root hot plug in global array.\r
110 \r
111 @retval TRUE device path is for root pci hot plug controller\r
112 @retval FALSE device path is not for root pci hot plug controller\r
113**/\r
ead42efc 114BOOLEAN\r
115IsRootPciHotPlugController (\r
116 IN EFI_DEVICE_PATH_PROTOCOL *HpcDevicePath,\r
117 OUT UINTN *HpIndex\r
118 )\r
ead42efc 119;\r
120\r
57076f45 121/**\r
122 Wrapper for creating event object for HPC \r
123 \r
124 @param HpIndex index of hot plug device in global array\r
125 @param Event event object\r
126 \r
127 @return status of create event invoken\r
128**/\r
ead42efc 129EFI_STATUS\r
130CreateEventForHpc (\r
131 IN UINTN HpIndex,\r
132 OUT EFI_EVENT *Event\r
133 )\r
ead42efc 134;\r
135\r
57076f45 136/**\r
137 Wait for all root HPC initialized.\r
138 \r
139 @param TimeoutInMicroSeconds microseconds to wait for all root hpc's initialization\r
140**/\r
ead42efc 141EFI_STATUS\r
142AllRootHPCInitialized (\r
143 IN UINTN TimeoutInMicroSeconds\r
144 )\r
ead42efc 145;\r
146\r
57076f45 147/**\r
148 Check HPC capability register block\r
149 \r
150 @param PciIoDevice PCI device instance\r
151 \r
152 @retval EFI_SUCCESS PCI device is HPC\r
153 @retval EFI_NOT_FOUND PCI device is not HPC\r
154**/\r
ead42efc 155EFI_STATUS\r
156IsSHPC (\r
157 PCI_IO_DEVICE *PciIoDevice\r
158 )\r
ead42efc 159;\r
160\r
57076f45 161/**\r
162 Get resource padding for hot plug bus\r
163 \r
164 @param PciIoDevice PCI device instance\r
165 \r
166 @retval EFI_SUCCESS success get padding and set it into PCI device instance\r
167 @retval EFI_NOT_FOUND PCI device is not a hot plug bus.\r
168**/\r
ead42efc 169EFI_STATUS\r
170GetResourcePaddingForHpb (\r
171 IN PCI_IO_DEVICE *PciIoDevice\r
172 )\r
ead42efc 173;\r
174\r
175#endif\r