]>
Commit | Line | Data |
---|---|---|
79964ac8 | 1 | /** @file\r |
9ca1b12e | 2 | This file declares EFI PCI Hot Plug Init Protocol.\r |
8411f1c0 | 3 | This protocol provides the necessary functionality to initialize the Hot Plug Controllers (HPCs) and\r |
4 | the buses that they control. This protocol also provides information regarding resource padding.\r | |
79964ac8 | 5 | \r |
2bbaeb0d | 6 | Copyright (c) 2007 - 2009, Intel Corporation\r |
79964ac8 | 7 | All rights reserved. This program and the accompanying materials\r |
8 | are licensed and made available under the terms and conditions of the BSD License\r | |
9 | which accompanies this distribution. The full text of the license may be found at\r | |
10 | http://opensource.org/licenses/bsd-license.php\r | |
11 | \r | |
12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
14 | \r | |
79964ac8 | 15 | @par Revision Reference:\r |
16 | This protocol is defined in Framework of EFI Hot Plug Pci Initialization Protocol Spec\r | |
17 | Version 0.9\r | |
18 | \r | |
19 | **/\r | |
20 | \r | |
21 | #ifndef _EFI_PCI_HOT_PLUG_INIT_H_\r | |
22 | #define _EFI_PCI_HOT_PLUG_INIT_H_\r | |
23 | \r | |
b80fbe85 | 24 | #include <PiDxe.h>\r |
25 | \r | |
9ca1b12e | 26 | ///\r |
27 | /// Global ID for the PCI Hot Plug Protocol\r | |
28 | ///\r | |
79964ac8 | 29 | #define EFI_PCI_HOT_PLUG_INIT_PROTOCOL_GUID \\r |
30 | { 0xaa0e8bc1, 0xdabc, 0x46b0, {0xa8, 0x44, 0x37, 0xb8, 0x16, 0x9b, 0x2b, 0xea } }\r | |
31 | \r | |
32 | \r | |
33 | typedef struct _EFI_PCI_HOT_PLUG_INIT_PROTOCOL EFI_PCI_HOT_PLUG_INIT_PROTOCOL;\r | |
34 | \r | |
9ca1b12e | 35 | ///\r |
36 | /// Current state of an HPC\r | |
37 | ///\r | |
79964ac8 | 38 | typedef UINT16 EFI_HPC_STATE;\r |
39 | \r | |
9ca1b12e | 40 | ///\r |
41 | /// The HPC initialization function was called and the HPC completed \r | |
42 | /// initialization, but it was not enabled for some reason. The HPC may be \r | |
43 | /// disabled in hardware, or it may be disabled due to user preferences, \r | |
44 | /// hardware failure, or other reasons. No resource padding is required.\r | |
45 | ///\r | |
46 | #define EFI_HPC_STATE_INITIALIZED 0x01\r | |
79964ac8 | 47 | \r |
9ca1b12e | 48 | ///\r |
49 | /// The HPC initialization function was called, the HPC completed \r | |
50 | /// initialization, and it was enabled. Resource padding is required.\r | |
51 | ///\r | |
52 | #define EFI_HPC_STATE_ENABLED 0x02\r | |
53 | \r | |
54 | ///\r | |
55 | /// Location definition for PCI Hot Plug Controller\r | |
56 | ///\r | |
79964ac8 | 57 | typedef struct{\r |
9ca1b12e | 58 | ///\r |
59 | /// The device path to the Root HPC\r | |
60 | ///\r | |
79964ac8 | 61 | EFI_DEVICE_PATH_PROTOCOL *HpcDevicePath;\r |
9ca1b12e | 62 | ///\r |
63 | /// The device path to the Hot Plug Bus (HPB) that is controlled by \r | |
64 | /// the root HPC.\r | |
65 | ///\r | |
79964ac8 | 66 | EFI_DEVICE_PATH_PROTOCOL *HpbDevicePath;\r |
67 | } EFI_HPC_LOCATION;\r | |
68 | \r | |
69 | \r | |
70 | typedef enum{\r | |
71 | EfiPaddingPciBus,\r | |
72 | EfiPaddingPciRootBridge\r | |
73 | } EFI_HPC_PADDING_ATTRIBUTES;\r | |
74 | \r | |
75 | /**\r | |
76 | Returns a list of root Hot Plug Controllers (HPCs) that require initialization\r | |
77 | during the boot process.\r | |
78 | \r | |
79 | @param This Pointer to the EFI_PCI_HOT_PLUG_INIT_PROTOCOL instance.\r | |
80 | @param HpcCount The number of root HPCs that were returned.\r | |
81 | @param HpcList The list of root HPCs. HpcCount defines the number of\r | |
82 | elements in this list.\r | |
83 | \r | |
84 | @retval EFI_SUCCESS HpcList was returned.\r | |
85 | @retval EFI_OUT_OF_RESOURCES HpcList was not returned due to insufficient resources.\r | |
86 | @retval EFI_INVALID_PARAMETER HpcCount is NULL or HpcList is NULL.\r | |
87 | \r | |
88 | **/\r | |
89 | typedef\r | |
90 | EFI_STATUS\r | |
69686d56 | 91 | (EFIAPI *EFI_GET_ROOT_HPC_LIST)(\r |
79964ac8 | 92 | IN EFI_PCI_HOT_PLUG_INIT_PROTOCOL *This,\r |
93 | OUT UINTN *HpcCount,\r | |
94 | OUT EFI_HPC_LOCATION **HpcList\r | |
95 | );\r | |
96 | \r | |
97 | /**\r | |
98 | Initializes one root Hot Plug Controller (HPC). This process may causes\r | |
99 | initialization of its subordinate buses.\r | |
100 | \r | |
101 | @param This Pointer to the EFI_PCI_HOT_PLUG_INIT_PROTOCOL instance.\r | |
102 | @param HpcDevicePath The device path to the HPC that is being initialized.\r | |
103 | @param HpcPciAddress The address of the HPC function on the PCI bus.\r | |
104 | @param Event The event that should be signaled when the HPC initialization\r | |
105 | is complete.\r | |
106 | @param HpcState The state of the HPC hardware.\r | |
107 | \r | |
108 | @retval EFI_SUCCESS If Event is NULL, the specific HPC was successfully\r | |
109 | initialized. If Event is not NULL, Event will be signaled at a later time\r | |
110 | when initialization is complete.\r | |
111 | @retval EFI_UNSUPPORTED This instance of EFI_PCI_HOT_PLUG_INIT_PROTOCOL\r | |
112 | does not support the specified HPC.\r | |
113 | @retval EFI_OUT_OF_RESOURCES Initialization failed due to insufficient\r | |
114 | resources.\r | |
115 | @retval EFI_INVALID_PARAMETER HpcState is NULL.\r | |
116 | \r | |
117 | **/\r | |
118 | typedef\r | |
119 | EFI_STATUS\r | |
69686d56 | 120 | (EFIAPI *EFI_INITIALIZE_ROOT_HPC)(\r |
79964ac8 | 121 | IN EFI_PCI_HOT_PLUG_INIT_PROTOCOL *This,\r |
122 | IN EFI_DEVICE_PATH_PROTOCOL *HpcDevicePath,\r | |
123 | IN UINT64 HpcPciAddress,\r | |
124 | IN EFI_EVENT Event, OPTIONAL\r | |
125 | OUT EFI_HPC_STATE *HpcState\r | |
126 | );\r | |
127 | \r | |
128 | /**\r | |
129 | Returns the resource padding that is required by the PCI bus that is controlled\r | |
130 | by the specified Hot Plug Controller (HPC).\r | |
131 | \r | |
132 | @param This Pointer to the EFI_PCI_HOT_PLUG_INIT_PROTOCOL instance.\r | |
133 | @param HpcDevicePath The device path to the HPC.\r | |
134 | @param HpcPciAddress The address of the HPC function on the PCI bus.\r | |
135 | @param HpcState The state of the HPC hardware.\r | |
136 | @param Padding The amount of resource padding that is required by the\r | |
137 | PCI bus under the control of the specified HPC.\r | |
138 | @param Attributes Describes how padding is accounted for. The padding\r | |
139 | is returned in the form of ACPI 2.0 resource descriptors.\r | |
140 | \r | |
141 | @retval EFI_SUCCESS The resource padding was successfully returned.\r | |
142 | @retval EFI_UNSUPPORTED This instance of the EFI_PCI_HOT_PLUG_INIT_PROTOCOL\r | |
143 | does not support the specified HPC.\r | |
144 | @retval EFI_NOT_READY This function was called before HPC initialization is complete.\r | |
145 | @retval EFI_INVALID_PARAMETER HpcState or Padding or Attributes is NULL.\r | |
146 | @retval EFI_OUT_OF_RESOURCES ACPI 2.0 resource descriptors for Padding\r | |
147 | cannot be allocated due to insufficient resources.\r | |
148 | \r | |
149 | **/\r | |
150 | typedef\r | |
151 | EFI_STATUS\r | |
69686d56 | 152 | (EFIAPI *EFI_GET_PCI_HOT_PLUG_PADDING)(\r |
79964ac8 | 153 | IN EFI_PCI_HOT_PLUG_INIT_PROTOCOL *This,\r |
154 | IN EFI_DEVICE_PATH_PROTOCOL *HpcDevicePath,\r | |
155 | IN UINT64 HpcPciAddress,\r | |
156 | OUT EFI_HPC_STATE *HpcState,\r | |
157 | OUT VOID **Padding,\r | |
158 | OUT EFI_HPC_PADDING_ATTRIBUTES *Attributes\r | |
159 | );\r | |
160 | \r | |
161 | \r | |
162 | //\r | |
163 | // Prototypes for the PCI Hot Plug Init Protocol\r | |
164 | //\r | |
165 | \r | |
9ca1b12e | 166 | ///\r |
167 | /// This protocol provides the necessary functionality to initialize the\r | |
168 | /// Hot Plug Controllers (HPCs) and the buses that they control. This protocol\r | |
169 | /// also provides information regarding resource padding.\r | |
170 | ///\r | |
79964ac8 | 171 | struct _EFI_PCI_HOT_PLUG_INIT_PROTOCOL {\r |
2bbaeb0d | 172 | ///\r |
173 | /// Returns a list of root HPCs and the buses that they control.\r | |
174 | ///\r | |
79964ac8 | 175 | EFI_GET_ROOT_HPC_LIST GetRootHpcList;\r |
2bbaeb0d | 176 | \r |
177 | ///\r | |
178 | /// Initializes the specified root HPC.\r | |
179 | ///\r | |
79964ac8 | 180 | EFI_INITIALIZE_ROOT_HPC InitializeRootHpc;\r |
2bbaeb0d | 181 | \r |
182 | ///\r | |
183 | /// Returns the resource padding that is required by the HPC.\r | |
184 | ///\r | |
79964ac8 | 185 | EFI_GET_PCI_HOT_PLUG_PADDING GetResourcePadding;\r |
186 | };\r | |
187 | \r | |
188 | extern EFI_GUID gEfiPciHotPlugInitProtocolGuid;\r | |
189 | \r | |
190 | #endif\r |