]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciHotPlugSupport.h
clean up the un-suitable ';' location when declaring the functions.
[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
ed66e1bc 46 );\r
ead42efc 47\r
57076f45 48/**\r
49 Compare two device path\r
50 \r
51 @param DevicePath1 the first device path want to be compared\r
52 @param DevicePath2 the first device path want to be compared\r
53 \r
54 @retval TRUE equal\r
55 @retval FALSE different\r
56**/\r
ead42efc 57BOOLEAN\r
58EfiCompareDevicePath (\r
59 IN EFI_DEVICE_PATH_PROTOCOL *DevicePath1,\r
60 IN EFI_DEVICE_PATH_PROTOCOL *DevicePath2\r
ed66e1bc 61 );\r
ead42efc 62\r
57076f45 63/**\r
64 Init hot plug support and root hot plug private data.\r
65 \r
66**/\r
ead42efc 67EFI_STATUS\r
68InitializeHotPlugSupport (\r
69 VOID\r
ed66e1bc 70 );\r
ead42efc 71\r
57076f45 72/**\r
73 Test whether PCI device is hot plug bus.\r
74 \r
75 @param PciIoDevice PCI device instance\r
76 \r
77 @retval EFI_SUCCESS PCI device is hot plug bus\r
78 @retval EFI_NOT_FOUND PCI device is not hot plug bus\r
79**/\r
ead42efc 80EFI_STATUS\r
81IsPciHotPlugBus (\r
82 PCI_IO_DEVICE *PciIoDevice\r
ed66e1bc 83 );\r
ead42efc 84\r
57076f45 85/**\r
86 Test whether device path is for root pci hot plug bus\r
87 \r
88 @param HpbdevicePath tested device path\r
89 @param HpIndex Return the index of root hot plug in global array.\r
90 \r
91 @retval TRUE device path is for root pci hot plug\r
92 @retval FALSE device path is not for root pci hot plug\r
93**/\r
ead42efc 94BOOLEAN\r
95IsRootPciHotPlugBus (\r
96 IN EFI_DEVICE_PATH_PROTOCOL *HpbDevicePath,\r
97 OUT UINTN *HpIndex\r
ed66e1bc 98 );\r
ead42efc 99\r
57076f45 100/**\r
101 Test whether device path is for root pci hot plug controller\r
102 \r
103 @param HpbdevicePath tested device path\r
104 @param HpIndex Return the index of root hot plug in global array.\r
105 \r
106 @retval TRUE device path is for root pci hot plug controller\r
107 @retval FALSE device path is not for root pci hot plug controller\r
108**/\r
ead42efc 109BOOLEAN\r
110IsRootPciHotPlugController (\r
111 IN EFI_DEVICE_PATH_PROTOCOL *HpcDevicePath,\r
112 OUT UINTN *HpIndex\r
ed66e1bc 113 );\r
ead42efc 114\r
57076f45 115/**\r
116 Wrapper for creating event object for HPC \r
117 \r
118 @param HpIndex index of hot plug device in global array\r
119 @param Event event object\r
120 \r
121 @return status of create event invoken\r
122**/\r
ead42efc 123EFI_STATUS\r
124CreateEventForHpc (\r
125 IN UINTN HpIndex,\r
126 OUT EFI_EVENT *Event\r
ed66e1bc 127 );\r
ead42efc 128\r
57076f45 129/**\r
130 Wait for all root HPC initialized.\r
131 \r
132 @param TimeoutInMicroSeconds microseconds to wait for all root hpc's initialization\r
133**/\r
ead42efc 134EFI_STATUS\r
135AllRootHPCInitialized (\r
136 IN UINTN TimeoutInMicroSeconds\r
ed66e1bc 137 );\r
ead42efc 138\r
57076f45 139/**\r
140 Check HPC capability register block\r
141 \r
142 @param PciIoDevice PCI device instance\r
143 \r
144 @retval EFI_SUCCESS PCI device is HPC\r
145 @retval EFI_NOT_FOUND PCI device is not HPC\r
146**/\r
ead42efc 147EFI_STATUS\r
148IsSHPC (\r
149 PCI_IO_DEVICE *PciIoDevice\r
ed66e1bc 150 );\r
ead42efc 151\r
57076f45 152/**\r
153 Get resource padding for hot plug bus\r
154 \r
155 @param PciIoDevice PCI device instance\r
156 \r
157 @retval EFI_SUCCESS success get padding and set it into PCI device instance\r
158 @retval EFI_NOT_FOUND PCI device is not a hot plug bus.\r
159**/\r
ead42efc 160EFI_STATUS\r
161GetResourcePaddingForHpb (\r
162 IN PCI_IO_DEVICE *PciIoDevice\r
ed66e1bc 163 );\r
ead42efc 164\r
165#endif\r