]>
Commit | Line | Data |
---|---|---|
959ccb23 | 1 | /** @file\r |
2 | Include file matches things in PI.\r | |
3 | \r | |
7b1bf9f6 | 4 | Copyright (c) 2006 - 2008, Intel Corporation \r |
959ccb23 | 5 | All rights reserved. This program and the accompanying materials \r |
6 | are licensed and made available under the terms and conditions of the BSD License \r | |
7 | which accompanies this distribution. The full text of the license may be found at \r | |
8 | http://opensource.org/licenses/bsd-license.php \r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
12 | \r | |
959ccb23 | 13 | @par Revision Reference:\r |
14 | Version 1.0.\r | |
15 | \r | |
16 | **/\r | |
17 | \r | |
18 | #ifndef __PI_DXECIS_H__\r | |
19 | #define __PI_DXECIS_H__\r | |
20 | \r | |
21 | #include <Pi/PiMultiPhase.h>\r | |
22 | \r | |
dc53faa3 | 23 | ///\r |
24 | /// Global Coherencey Domain types - Memory type\r | |
25 | ///\r | |
959ccb23 | 26 | typedef enum {\r |
27 | EfiGcdMemoryTypeNonExistent,\r | |
28 | EfiGcdMemoryTypeReserved,\r | |
29 | EfiGcdMemoryTypeSystemMemory,\r | |
30 | EfiGcdMemoryTypeMemoryMappedIo,\r | |
31 | EfiGcdMemoryTypeMaximum\r | |
32 | } EFI_GCD_MEMORY_TYPE;\r | |
33 | \r | |
dc53faa3 | 34 | ///\r |
35 | /// Global Coherencey Domain types - IO type\r | |
36 | ///\r | |
959ccb23 | 37 | typedef enum {\r |
38 | EfiGcdIoTypeNonExistent,\r | |
39 | EfiGcdIoTypeReserved,\r | |
40 | EfiGcdIoTypeIo,\r | |
41 | EfiGcdIoTypeMaximum\r | |
42 | } EFI_GCD_IO_TYPE;\r | |
43 | \r | |
dc53faa3 | 44 | ///\r |
45 | /// The type of allocation to perform.\r | |
46 | /// \r | |
959ccb23 | 47 | typedef enum {\r |
48 | EfiGcdAllocateAnySearchBottomUp,\r | |
49 | EfiGcdAllocateMaxAddressSearchBottomUp,\r | |
50 | EfiGcdAllocateAddress,\r | |
51 | EfiGcdAllocateAnySearchTopDown,\r | |
52 | EfiGcdAllocateMaxAddressSearchTopDown,\r | |
53 | EfiGcdMaxAllocateType\r | |
54 | } EFI_GCD_ALLOCATE_TYPE;\r | |
55 | \r | |
dc53faa3 | 56 | ///\r |
57 | /// EFI_GCD_MEMORY_SPACE_DESCRIPTOR\r | |
58 | /// \r | |
959ccb23 | 59 | typedef struct {\r |
dc53faa3 | 60 | ///\r |
61 | /// The physical address of the first byte in the memory region. Type\r | |
62 | /// EFI_PHYSICAL_ADDRESS is defined in the AllocatePages() function\r | |
63 | /// description in the UEFI 2.0 specification\r | |
64 | /// \r | |
959ccb23 | 65 | EFI_PHYSICAL_ADDRESS BaseAddress;\r |
dc53faa3 | 66 | \r |
67 | ///\r | |
68 | /// The number of bytes in the memory region.\r | |
69 | /// \r | |
959ccb23 | 70 | UINT64 Length;\r |
dc53faa3 | 71 | \r |
72 | ///\r | |
73 | /// The bit mask of attributes that the memory region is capable of supporting. The bit\r | |
74 | /// mask of available attributes is defined in the GetMemoryMap() function description\r | |
75 | /// in the UEFI 2.0 specification.\r | |
76 | /// \r | |
959ccb23 | 77 | UINT64 Capabilities;\r |
dc53faa3 | 78 | ///\r |
79 | /// The bit mask of attributes that the memory region is currently using. The bit mask of\r | |
80 | /// available attributes is defined in GetMemoryMap().\r | |
81 | /// \r | |
959ccb23 | 82 | UINT64 Attributes;\r |
dc53faa3 | 83 | ///\r |
84 | /// Type of the memory region. Type EFI_GCD_MEMORY_TYPE is defined in the\r | |
85 | /// AddMemorySpace() function description\r | |
86 | /// \r | |
959ccb23 | 87 | EFI_GCD_MEMORY_TYPE GcdMemoryType;\r |
dc53faa3 | 88 | \r |
89 | ///\r | |
90 | /// The image handle of the agent that allocated the memory resource described by\r | |
91 | /// PhysicalStart and NumberOfBytes. If this field is NULL, then the memory\r | |
92 | /// resource is not currently allocated. Type EFI_HANDLE is defined in\r | |
93 | /// InstallProtocolInterface() in the UEFI 2.0 specification.\r | |
94 | /// \r | |
959ccb23 | 95 | EFI_HANDLE ImageHandle;\r |
dc53faa3 | 96 | \r |
97 | ///\r | |
98 | /// The device handle for which the memory resource has been allocated. If\r | |
99 | /// ImageHandle is NULL, then the memory resource is not currently allocated. If this\r | |
100 | /// field is NULL, then the memory resource is not associated with a device that is\r | |
101 | /// described by a device handle. Type EFI_HANDLE is defined in\r | |
102 | /// InstallProtocolInterface() in the UEFI 2.0 specification.\r | |
103 | /// \r | |
959ccb23 | 104 | EFI_HANDLE DeviceHandle;\r |
105 | } EFI_GCD_MEMORY_SPACE_DESCRIPTOR;\r | |
106 | \r | |
dc53faa3 | 107 | ///\r |
108 | /// EFI_GCD_IO_SPACE_DESCRIPTOR\r | |
109 | /// \r | |
959ccb23 | 110 | typedef struct {\r |
dc53faa3 | 111 | ///\r |
112 | /// Physical address of the first byte in the I/O region. Type\r | |
113 | /// EFI_PHYSICAL_ADDRESS is defined in the AllocatePages() function\r | |
114 | /// description in the UEFI 2.0 specification.\r | |
115 | /// \r | |
959ccb23 | 116 | EFI_PHYSICAL_ADDRESS BaseAddress;\r |
dc53faa3 | 117 | \r |
4ba967e7 | 118 | ///\r |
dc53faa3 | 119 | /// Number of bytes in the I/O region.\r |
4ba967e7 | 120 | ///\r |
959ccb23 | 121 | UINT64 Length;\r |
dc53faa3 | 122 | \r |
123 | /// \r | |
124 | /// Type of the I/O region. Type EFI_GCD_IO_TYPE is defined in the\r | |
125 | /// AddIoSpace() function description.\r | |
126 | /// \r | |
959ccb23 | 127 | EFI_GCD_IO_TYPE GcdIoType;\r |
dc53faa3 | 128 | \r |
129 | /// \r | |
130 | /// The image handle of the agent that allocated the I/O resource described by\r | |
131 | /// PhysicalStart and NumberOfBytes. If this field is NULL, then the I/O\r | |
132 | /// resource is not currently allocated. Type EFI_HANDLE is defined in\r | |
133 | /// InstallProtocolInterface() in the UEFI 2.0 specification.\r | |
134 | /// \r | |
959ccb23 | 135 | EFI_HANDLE ImageHandle;\r |
dc53faa3 | 136 | \r |
137 | ///\r | |
138 | /// The device handle for which the I/O resource has been allocated. If ImageHandle\r | |
139 | /// is NULL, then the I/O resource is not currently allocated. If this field is NULL, then\r | |
140 | /// the I/O resource is not associated with a device that is described by a device handle.\r | |
141 | /// Type EFI_HANDLE is defined in InstallProtocolInterface() in the UEFI\r | |
142 | /// 2.0 specification.\r | |
143 | /// \r | |
959ccb23 | 144 | EFI_HANDLE DeviceHandle;\r |
145 | } EFI_GCD_IO_SPACE_DESCRIPTOR;\r | |
146 | \r | |
147 | \r | |
148 | /**\r | |
149 | Adds reserved memory, system memory, or memory-mapped I/O resources to the\r | |
150 | global coherency domain of the processor.\r | |
151 | \r | |
4ba967e7 | 152 | @param GcdMemoryType The type of memory resource being added.\r |
153 | @param BaseAddress The physical address that is the start address\r | |
154 | of the memory resource being added.\r | |
155 | @param Length The size, in bytes, of the memory resource that\r | |
156 | is being added.\r | |
157 | @param Capabilities The bit mask of attributes that the memory \r | |
158 | resource region supports.\r | |
159 | \r | |
160 | @retval EFI_SUCCESS The memory resource was added to the global\r | |
161 | coherency domain of the processor.\r | |
162 | @retval EFI_INVALID_PARAMETER GcdMemoryType is invalid.\r | |
163 | @retval EFI_INVALID_PARAMETER Length is zero.\r | |
164 | @retval EFI_OUT_OF_RESOURCES There are not enough system resources to add\r | |
165 | the memory resource to the global coherency \r | |
166 | domain of the processor.\r | |
167 | @retval EFI_UNSUPPORTED The processor does not support one or more bytes\r | |
168 | of the memory resource range specified by \r | |
169 | BaseAddress and Length.\r | |
170 | @retval EFI_ACCESS_DENIED One or more bytes of the memory resource range\r | |
171 | specified by BaseAddress and Length conflicts \r | |
172 | with a memory resource range that was previously\r | |
173 | added to the global coherency domain of the processor.\r | |
174 | @retval EFI_ACCESS_DENIED One or more bytes of the memory resource range\r | |
175 | specified by BaseAddress and Length was allocated\r | |
176 | in a prior call to AllocateMemorySpace()..\r | |
959ccb23 | 177 | \r |
178 | **/\r | |
179 | typedef\r | |
180 | EFI_STATUS\r | |
dc53faa3 | 181 | (EFIAPI *EFI_ADD_MEMORY_SPACE)(\r |
959ccb23 | 182 | IN EFI_GCD_MEMORY_TYPE GcdMemoryType,\r |
183 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
184 | IN UINT64 Length,\r | |
185 | IN UINT64 Capabilities\r | |
186 | )\r | |
187 | ;\r | |
188 | \r | |
189 | /**\r | |
190 | Allocates nonexistent memory, reserved memory, system memory, or memorymapped\r | |
191 | I/O resources from the global coherency domain of the processor.\r | |
192 | \r | |
4ba967e7 | 193 | @param GcdAllocateType The type of allocation to perform.\r |
194 | @param GcdMemoryType The type of memory resource being allocated.\r | |
195 | @param Alignment The log base 2 of the boundary that BaseAddress must\r | |
196 | be aligned on output. Align with 2^Alignment.\r | |
197 | @param Length The size in bytes of the memory resource range that\r | |
198 | is being allocated.\r | |
199 | @param BaseAddress A pointer to a physical address to allocate.\r | |
200 | @param Imagehandle The image handle of the agent that is allocating \r | |
201 | the memory resource.\r | |
202 | @param DeviceHandle The device handle for which the memory resource\r | |
203 | is being allocated.\r | |
204 | \r | |
205 | @retval EFI_INVALID_PARAMETER GcdAllocateType is invalid.\r | |
206 | @retval EFI_INVALID_PARAMETER GcdMemoryType is invalid.\r | |
207 | @retval EFI_INVALID_PARAMETER Length is zero.\r | |
208 | @retval EFI_INVALID_PARAMETER BaseAddress is NULL.\r | |
209 | @retval EFI_INVALID_PARAMETER ImageHandle is NULL.\r | |
210 | @retval EFI_NOT_FOUND The memory resource request could not be satisfied.\r | |
211 | No descriptor contains the desired space.\r | |
212 | @retval EFI_OUT_OF_RESOURCES There are not enough system resources to allocate the memory\r | |
213 | resource from the global coherency domain of the processor.\r | |
214 | @retval EFI_SUCCESS The memory resource was allocated from the global coherency\r | |
215 | domain of the processor.\r | |
959ccb23 | 216 | \r |
959ccb23 | 217 | \r |
218 | **/\r | |
219 | typedef\r | |
220 | EFI_STATUS\r | |
dc53faa3 | 221 | (EFIAPI *EFI_ALLOCATE_MEMORY_SPACE)(\r |
959ccb23 | 222 | IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType,\r |
223 | IN EFI_GCD_MEMORY_TYPE GcdMemoryType,\r | |
224 | IN UINTN Alignment,\r | |
225 | IN UINT64 Length,\r | |
226 | IN OUT EFI_PHYSICAL_ADDRESS *BaseAddress,\r | |
227 | IN EFI_HANDLE ImageHandle,\r | |
228 | IN EFI_HANDLE DeviceHandle OPTIONAL\r | |
229 | )\r | |
230 | ;\r | |
231 | \r | |
232 | /**\r | |
233 | Frees nonexistent memory, reserved memory, system memory, or memory-mapped\r | |
234 | I/O resources from the global coherency domain of the processor.\r | |
235 | \r | |
4ba967e7 | 236 | @param BaseAddress The physical address that is the start address of the memory resource being freed.\r |
237 | @param Length The size in bytes of the memory resource range that is being freed.\r | |
959ccb23 | 238 | \r |
4ba967e7 | 239 | @retval EFI_SUCCESS The memory resource was freed from the global coherency domain of\r |
240 | the processor.\r | |
241 | @retval EFI_INVALID_PARAMETER Length is zero. \r | |
242 | @retval EFI_UNSUPPORTED The processor does not support one or more bytes of the memory\r | |
243 | resource range specified by BaseAddress and Length.\r | |
244 | @retval EFI_NOT_FOUND The memory resource range specified by BaseAddress and\r | |
245 | Length was not allocated with previous calls to AllocateMemorySpace().\r | |
246 | @retval EFI_OUT_OF_RESOURCES There are not enough system resources to free the memory resource\r | |
247 | from the global coherency domain of the processor.\r | |
959ccb23 | 248 | \r |
249 | **/\r | |
250 | typedef\r | |
251 | EFI_STATUS\r | |
dc53faa3 | 252 | (EFIAPI *EFI_FREE_MEMORY_SPACE)(\r |
959ccb23 | 253 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r |
254 | IN UINT64 Length\r | |
255 | )\r | |
256 | ;\r | |
257 | \r | |
258 | /**\r | |
259 | Removes reserved memory, system memory, or memory-mapped I/O resources from\r | |
260 | the global coherency domain of the processor.\r | |
261 | \r | |
4ba967e7 | 262 | @param BaseAddress The physical address that is the start address of the memory resource being removed.\r |
263 | @param Length The size in bytes of the memory resource that is being removed.\r | |
264 | \r | |
265 | @retval EFI_SUCCESS The memory resource was removed from the global coherency\r | |
266 | domain of the processor.\r | |
267 | @retval EFI_INVALID_PARAMETER Length is zero. \r | |
268 | @retval EFI_UNSUPPORTED The processor does not support one or more bytes of the memory\r | |
269 | resource range specified by BaseAddress and Length.\r | |
270 | @retval EFI_NOT_FOUND One or more bytes of the memory resource range specified by\r | |
271 | BaseAddress and Length was not added with previous calls to\r | |
272 | AddMemorySpace().\r | |
273 | @retval EFI_ACCESS_DEFINED One or more bytes of the memory resource range specified by\r | |
274 | BaseAddress and Length has been allocated with AllocateMemorySpace().\r | |
275 | @retval EFI_OUT_OF_RESOURCES There are not enough system resources to remove the memory\r | |
276 | resource from the global coherency domain of the processor.\r | |
959ccb23 | 277 | \r |
278 | **/\r | |
279 | typedef\r | |
280 | EFI_STATUS\r | |
dc53faa3 | 281 | (EFIAPI *EFI_REMOVE_MEMORY_SPACE)(\r |
959ccb23 | 282 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r |
283 | IN UINT64 Length\r | |
284 | )\r | |
285 | ;\r | |
286 | \r | |
287 | /**\r | |
288 | Retrieves the descriptor for a memory region containing a specified address.\r | |
289 | \r | |
4ba967e7 | 290 | @param BaseAddress The physical address that is the start address of a memory region.\r |
291 | @param Descriptor A pointer to a caller allocated descriptor.\r | |
959ccb23 | 292 | \r |
4ba967e7 | 293 | @retval EFI_SUCCESS The descriptor for the memory resource region containing\r |
294 | BaseAddress was returned in Descriptor.\r | |
295 | @retval EFI_INVALID_PARAMETER Descriptor is NULL.\r | |
296 | @retval EFI_NOT_FOUND A memory resource range containing BaseAddress was not found.\r | |
959ccb23 | 297 | \r |
298 | **/\r | |
299 | typedef\r | |
300 | EFI_STATUS\r | |
dc53faa3 | 301 | (EFIAPI *EFI_GET_MEMORY_SPACE_DESCRIPTOR)(\r |
959ccb23 | 302 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r |
303 | OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR *Descriptor\r | |
304 | )\r | |
305 | ;\r | |
306 | \r | |
307 | /**\r | |
308 | Modifies the attributes for a memory region in the global coherency domain of the\r | |
309 | processor.\r | |
310 | \r | |
4ba967e7 | 311 | @param BaseAddress The physical address that is the start address of a memory region.\r |
312 | @param Length The size in bytes of the memory region.\r | |
313 | @param Attributes The bit mask of attributes to set for the memory region.\r | |
314 | \r | |
315 | @retval EFI_SUCCESS The attributes were set for the memory region.\r | |
316 | @retval EFI_INVALID_PARAMETER Length is zero. \r | |
317 | @retval EFI_UNSUPPORTED The processor does not support one or more bytes of the memory\r | |
318 | resource range specified by BaseAddress and Length.\r | |
319 | @retval EFI_UNSUPPORTED The bit mask of attributes is not support for the memory resource\r | |
320 | range specified by BaseAddress and Length.\r | |
321 | @retval EFI_ACCESS_DEFINED The attributes for the memory resource range specified by\r | |
322 | BaseAddress and Length cannot be modified.\r | |
323 | @retval EFI_OUT_OF_RESOURCES There are not enough system resources to modify the attributes of\r | |
324 | the memory resource range.\r | |
959ccb23 | 325 | \r |
326 | **/\r | |
327 | typedef\r | |
959ccb23 | 328 | EFI_STATUS\r |
dc53faa3 | 329 | (EFIAPI *EFI_SET_MEMORY_SPACE_ATTRIBUTES)(\r |
959ccb23 | 330 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r |
331 | IN UINT64 Length,\r | |
332 | IN UINT64 Attributes\r | |
333 | )\r | |
334 | ;\r | |
335 | \r | |
336 | /**\r | |
337 | Returns a map of the memory resources in the global coherency domain of the\r | |
338 | processor.\r | |
339 | \r | |
4ba967e7 | 340 | @param NumberOfDescriptors A pointer to number of descriptors returned in the MemorySpaceMap buffer.\r |
341 | @param MemorySpaceMap A pointer to the array of EFI_GCD_MEMORY_SPACE_DESCRIPTORs.\r | |
959ccb23 | 342 | \r |
4ba967e7 | 343 | @retval EFI_SUCCESS The memory space map was returned in the MemorySpaceMap\r |
344 | buffer, and the number of descriptors in MemorySpaceMap was\r | |
345 | returned in NumberOfDescriptors.\r | |
346 | @retval EFI_INVALID_PARAMETER NumberOfDescriptors is NULL.\r | |
347 | @retval EFI_INVALID_PARAMETER MemorySpaceMap is NULL.\r | |
348 | @retval EFI_OUT_OF_RESOURCES There are not enough resources to allocate MemorySpaceMap.\r | |
959ccb23 | 349 | \r |
350 | **/\r | |
351 | typedef\r | |
352 | EFI_STATUS\r | |
dc53faa3 | 353 | (EFIAPI *EFI_GET_MEMORY_SPACE_MAP)(\r |
959ccb23 | 354 | OUT UINTN *NumberOfDescriptors,\r |
355 | OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR **MemorySpaceMap\r | |
356 | )\r | |
357 | ;\r | |
358 | \r | |
359 | /**\r | |
360 | Adds reserved I/O or I/O resources to the global coherency domain of the processor.\r | |
361 | \r | |
4ba967e7 | 362 | @param GcdIoType The type of I/O resource being added.\r |
363 | @param BaseAddress The physical address that is the start address of the I/O resource being added.\r | |
364 | @param Length The size in bytes of the I/O resource that is being added.\r | |
365 | \r | |
366 | @retval EFI_SUCCESS The I/O resource was added to the global coherency domain of\r | |
367 | the processor.\r | |
368 | @retval EFI_INVALID_PARAMETER GcdIoType is invalid.\r | |
369 | @retval EFI_INVALID_PARAMETER Length is zero.\r | |
370 | @retval EFI_OUT_OF_RESOURCES There are not enough system resources to add the I/O resource to\r | |
371 | the global coherency domain of the processor.\r | |
372 | @retval EFI_UNSUPPORTED The processor does not support one or more bytes of the I/O\r | |
373 | resource range specified by BaseAddress and Length.\r | |
374 | @retval EFI_ACCESS_DENIED One or more bytes of the I/O resource range specified by\r | |
375 | BaseAddress and Length conflicts with an I/O resource\r | |
376 | range that was previously added to the global coherency domain\r | |
377 | of the processor.\r | |
378 | @retval EFI_ACCESS_DENIED One or more bytes of the I/O resource range specified by\r | |
379 | BaseAddress and Length was allocated in a prior call to\r | |
380 | AllocateIoSpace().\r | |
959ccb23 | 381 | \r |
382 | **/\r | |
383 | typedef\r | |
384 | EFI_STATUS\r | |
dc53faa3 | 385 | (EFIAPI *EFI_ADD_IO_SPACE)(\r |
959ccb23 | 386 | IN EFI_GCD_IO_TYPE GcdIoType,\r |
387 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
388 | IN UINT64 Length\r | |
389 | )\r | |
390 | ;\r | |
391 | \r | |
392 | /**\r | |
393 | Allocates nonexistent I/O, reserved I/O, or I/O resources from the global coherency\r | |
394 | domain of the processor.\r | |
395 | \r | |
4ba967e7 | 396 | @param GcdAllocateType The type of allocation to perform.\r |
397 | @param GcdIoType The type of I/O resource being allocated.\r | |
398 | @param Alignment The log base 2 of the boundary that BaseAddress must be aligned on output.\r | |
399 | @param Length The size in bytes of the I/O resource range that is being allocated.\r | |
400 | @param BaseAddress A pointer to a physical address.\r | |
401 | @param Imagehandle The image handle of the agent that is allocating the I/O resource.\r | |
402 | @param DeviceHandle The device handle for which the I/O resource is being allocated.\r | |
403 | \r | |
404 | @retval EFI_SUCCESS The I/O resource was allocated from the global coherency domain\r | |
405 | of the processor.\r | |
406 | @retval EFI_INVALID_PARAMETER GcdAllocateType is invalid.\r | |
407 | @retval EFI_INVALID_PARAMETER GcdIoType is invalid.\r | |
408 | @retval EFI_INVALID_PARAMETER Length is zero.\r | |
409 | @retval EFI_INVALID_PARAMETER BaseAddress is NULL.\r | |
410 | @retval EFI_INVALID_PARAMETER ImageHandle is NULL.\r | |
411 | @retval EFI_OUT_OF_RESOURCES There are not enough system resources to allocate the I/O\r | |
412 | resource from the global coherency domain of the processor.\r | |
413 | @retval EFI_NOT_FOUND The I/O resource request could not be satisfied.\r | |
959ccb23 | 414 | \r |
415 | **/\r | |
416 | typedef\r | |
417 | EFI_STATUS\r | |
dc53faa3 | 418 | (EFIAPI *EFI_ALLOCATE_IO_SPACE)(\r |
959ccb23 | 419 | IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType,\r |
420 | IN EFI_GCD_IO_TYPE GcdIoType,\r | |
421 | IN UINTN Alignment,\r | |
422 | IN UINT64 Length,\r | |
423 | IN OUT EFI_PHYSICAL_ADDRESS *BaseAddress,\r | |
424 | IN EFI_HANDLE ImageHandle,\r | |
425 | IN EFI_HANDLE DeviceHandle OPTIONAL\r | |
426 | )\r | |
427 | ;\r | |
428 | \r | |
429 | /**\r | |
430 | Frees nonexistent I/O, reserved I/O, or I/O resources from the global coherency\r | |
431 | domain of the processor.\r | |
432 | \r | |
4ba967e7 | 433 | @param BaseAddress The physical address that is the start address of the I/O resource being freed.\r |
434 | @param Length The size in bytes of the I/O resource range that is being freed.\r | |
959ccb23 | 435 | \r |
4ba967e7 | 436 | @retval EFI_SUCCESS The I/O resource was freed from the global coherency domain of the\r |
437 | processor.\r | |
438 | @retval EFI_INVALID_PARAMETER Length is zero.\r | |
439 | @retval EFI_UNSUPPORTED The processor does not support one or more bytes of the I/O resource\r | |
440 | range specified by BaseAddress and Length.\r | |
441 | @retval EFI_NOT_FOUND The I/O resource range specified by BaseAddress and Length\r | |
442 | was not allocated with previous calls to AllocateIoSpace().\r | |
443 | @retval EFI_OUT_OF_RESOURCES There are not enough system resources to free the I/O resource from\r | |
444 | the global coherency domain of the processor.\r | |
959ccb23 | 445 | \r |
446 | **/\r | |
447 | typedef\r | |
448 | EFI_STATUS\r | |
dc53faa3 | 449 | (EFIAPI *EFI_FREE_IO_SPACE)(\r |
959ccb23 | 450 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r |
451 | IN UINT64 Length\r | |
452 | )\r | |
453 | ;\r | |
454 | \r | |
455 | /**\r | |
456 | Removes reserved I/O or I/O resources from the global coherency domain of the\r | |
457 | processor.\r | |
458 | \r | |
4ba967e7 | 459 | @param BaseAddress A pointer to a physical address that is the start address of the I/O resource being\r |
460 | removed.\r | |
461 | @param Length The size in bytes of the I/O resource that is being removed.\r | |
462 | \r | |
463 | @retval EFI_SUCCESS The I/O resource was removed from the global coherency domain\r | |
464 | of the processor.\r | |
465 | @retval EFI_INVALID_PARAMETER Length is zero.\r | |
466 | @retval EFI_UNSUPPORTED The processor does not support one or more bytes of the I/O\r | |
467 | resource range specified by BaseAddress and Length.\r | |
468 | @retval EFI_NOT_FOUND One or more bytes of the I/O resource range specified by\r | |
469 | BaseAddress and Length was not added with previous\r | |
470 | calls to AddIoSpace().\r | |
471 | @retval EFI_ACCESS_DENIED One or more bytes of the I/O resource range specified by\r | |
472 | BaseAddress and Length has been allocated with\r | |
473 | AllocateIoSpace().\r | |
474 | @retval EFI_OUT_OF_RESOURCES There are not enough system resources to remove the I/O\r | |
475 | resource from the global coherency domain of the processor.\r | |
959ccb23 | 476 | \r |
477 | **/\r | |
478 | typedef\r | |
479 | EFI_STATUS\r | |
dc53faa3 | 480 | (EFIAPI *EFI_REMOVE_IO_SPACE)(\r |
959ccb23 | 481 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r |
482 | IN UINT64 Length\r | |
483 | )\r | |
484 | ;\r | |
485 | \r | |
486 | /**\r | |
487 | Retrieves the descriptor for an I/O region containing a specified address.\r | |
488 | \r | |
4ba967e7 | 489 | @param BaseAddress The physical address that is the start address of an I/O region.\r |
490 | @param Descriptor A pointer to a caller allocated descriptor.\r | |
959ccb23 | 491 | \r |
4ba967e7 | 492 | @retval EFI_SUCCESS The descriptor for the I/O resource region containing\r |
493 | BaseAddress was returned in Descriptor.\r | |
959ccb23 | 494 | @retval EFI_INVALID_PARAMETER Descriptor is NULL.\r |
4ba967e7 | 495 | @retval EFI_NOT_FOUND An I/O resource range containing BaseAddress was not found.\r |
959ccb23 | 496 | \r |
497 | **/\r | |
498 | typedef\r | |
499 | EFI_STATUS\r | |
dc53faa3 | 500 | (EFIAPI *EFI_GET_IO_SPACE_DESCRIPTOR)(\r |
959ccb23 | 501 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r |
502 | OUT EFI_GCD_IO_SPACE_DESCRIPTOR *Descriptor\r | |
503 | )\r | |
504 | ;\r | |
505 | \r | |
506 | /**\r | |
507 | Returns a map of the I/O resources in the global coherency domain of the processor.\r | |
508 | \r | |
4ba967e7 | 509 | @param NumberOfDescriptors A pointer to number of descriptors returned in the IoSpaceMap buffer.\r |
510 | @param MemorySpaceMap A pointer to the array of EFI_GCD_IO_SPACE_DESCRIPTORs.\r | |
511 | \r | |
512 | @retval EFI_SUCCESS The I/O space map was returned in the IoSpaceMap buffer, and\r | |
513 | the number of descriptors in IoSpaceMap was returned in\r | |
514 | NumberOfDescriptors.\r | |
515 | @retval EFI_INVALID_PARAMETER NumberOfDescriptors is NULL.\r | |
516 | @retval EFI_INVALID_PARAMETER IoSpaceMap is NULL.\r | |
517 | @retval EFI_OUT_OF_RESOURCES There are not enough resources to allocate IoSpaceMap.\r | |
959ccb23 | 518 | \r |
959ccb23 | 519 | \r |
520 | **/\r | |
521 | typedef\r | |
522 | EFI_STATUS\r | |
dc53faa3 | 523 | (EFIAPI *EFI_GET_IO_SPACE_MAP)(\r |
959ccb23 | 524 | OUT UINTN *NumberOfDescriptors,\r |
525 | OUT EFI_GCD_IO_SPACE_DESCRIPTOR **IoSpaceMap\r | |
526 | )\r | |
527 | ;\r | |
528 | \r | |
529 | \r | |
530 | \r | |
531 | /**\r | |
532 | Loads and executed DXE drivers from firmware volumes.\r | |
533 | \r | |
4ba967e7 | 534 | The Dispatch() function searches for DXE drivers in firmware volumes that have been \r |
535 | installed since the last time the Dispatch() service was called. It then evaluates \r | |
536 | the dependency expressions of all the DXE drivers and loads and executes those DXE\r | |
537 | drivers whose dependency expression evaluate to TRUE. This service must interact with\r | |
538 | the Security Architectural Protocol to authenticate DXE drivers before they are executed.\r | |
539 | This process is continued until no more DXE drivers can be executed.\r | |
540 | \r | |
541 | @retval EFI_SUCCESS One or more DXE driver were dispatched.\r | |
542 | @retval EFI_NOT_FOUND No DXE drivers were dispatched.\r | |
543 | @retval EFI_ALREADY_STARTED An attempt is being made to start the DXE Dispatcher recursively.\r | |
544 | Thus no action was taken.\r | |
959ccb23 | 545 | \r |
546 | **/\r | |
547 | typedef\r | |
548 | EFI_STATUS\r | |
dc53faa3 | 549 | (EFIAPI *EFI_DISPATCH)(\r |
00edb218 A |
550 | VOID\r |
551 | )\r | |
959ccb23 | 552 | ;\r |
553 | \r | |
554 | /**\r | |
555 | Clears the Schedule on Request (SOR) flag for a component that is stored in a firmware volume.\r | |
556 | \r | |
557 | @param FirmwareVolumeHandle The handle of the firmware volume that contains the file specified by FileName.\r | |
4ba967e7 | 558 | @param FileName A pointer to the name of the file in a firmware volume.\r |
959ccb23 | 559 | \r |
4ba967e7 | 560 | @retval EFI_SUCCESS The DXE driver was found and its SOR bit was cleared.\r |
561 | @retval EFI_NOT_FOUND The DXE driver does not exist, or the DXE driver exists and its SOR\r | |
562 | bit is not set.\r | |
959ccb23 | 563 | \r |
564 | **/\r | |
565 | typedef\r | |
566 | EFI_STATUS\r | |
dc53faa3 | 567 | (EFIAPI *EFI_SCHEDULE)(\r |
959ccb23 | 568 | IN EFI_HANDLE FirmwareVolumeHandle,\r |
4ba967e7 | 569 | IN CONST EFI_GUID *FileName\r |
959ccb23 | 570 | )\r |
571 | ;\r | |
572 | \r | |
573 | /**\r | |
574 | Promotes a file stored in a firmware volume from the untrusted to the trusted state.\r | |
575 | \r | |
576 | @param FirmwareVolumeHandle The handle of the firmware volume that contains the file specified by FileName.\r | |
577 | @param DriverName A pointer to the name of the file in a firmware volume.\r | |
578 | \r | |
373b5cf9 | 579 | @return Status of promoting FFS from untrusted to trusted\r |
580 | state.\r | |
4ba967e7 | 581 | @retval EFI_NOT_FOUND The file was not found in the untrusted state.\r |
959ccb23 | 582 | \r |
583 | **/\r | |
584 | typedef\r | |
585 | EFI_STATUS\r | |
dc53faa3 | 586 | (EFIAPI *EFI_TRUST)(\r |
959ccb23 | 587 | IN EFI_HANDLE FirmwareVolumeHandle,\r |
4ba967e7 | 588 | IN CONST EFI_GUID *FileName\r |
959ccb23 | 589 | )\r |
590 | ;\r | |
591 | \r | |
592 | /**\r | |
593 | Creates a firmware volume handle for a firmware volume that is present in system memory.\r | |
594 | \r | |
595 | @param FirmwareVolumeHeader A pointer to the header of the firmware volume.\r | |
596 | @param Size The size, in bytes, of the firmware volume.\r | |
597 | @param FirmwareVolumeHandle On output, a pointer to the created handle.\r | |
598 | \r | |
4ba967e7 | 599 | @retval EFI_SUCCESS The EFI_FIRMWARE_VOLUME_PROTOCOL and\r |
600 | EFI_DEVICE_PATH_PROTOCOL were installed onto\r | |
601 | FirmwareVolumeHandle for the firmware volume described\r | |
602 | by FirmwareVolumeHeader and Size.\r | |
603 | @retval EFI_VOLUME_CORRUPTED The firmware volume described by FirmwareVolumeHeader\r | |
604 | and Size is corrupted.\r | |
605 | @retval EFI_OUT_OF_RESOURCES There are not enough system resources available to produce the\r | |
606 | EFI_FIRMWARE_VOLUME_PROTOCOL and EFI_DEVICE_PATH_PROTOCOL \r | |
607 | for the firmware volume described by FirmwareVolumeHeader and Size.\r | |
959ccb23 | 608 | \r |
609 | **/\r | |
610 | typedef\r | |
611 | EFI_STATUS\r | |
dc53faa3 | 612 | (EFIAPI *EFI_PROCESS_FIRMWARE_VOLUME)(\r |
4ba967e7 | 613 | IN CONST VOID *FirmwareVolumeHeader,\r |
959ccb23 | 614 | IN UINTN Size,\r |
615 | OUT EFI_HANDLE *FirmwareVolumeHandle\r | |
616 | )\r | |
617 | ;\r | |
618 | \r | |
619 | //\r | |
620 | // DXE Services Table\r | |
621 | //\r | |
f490a61d | 622 | #define DXE_SERVICES_SIGNATURE 0x565245535f455844ULL\r |
01c25cb2 | 623 | #define DXE_SERVICES_REVISION ((1<<16) | (00))\r |
959ccb23 | 624 | \r |
625 | typedef struct {\r | |
626 | EFI_TABLE_HEADER Hdr;\r | |
627 | \r | |
628 | //\r | |
629 | // Global Coherency Domain Services\r | |
630 | //\r | |
631 | EFI_ADD_MEMORY_SPACE AddMemorySpace;\r | |
632 | EFI_ALLOCATE_MEMORY_SPACE AllocateMemorySpace;\r | |
633 | EFI_FREE_MEMORY_SPACE FreeMemorySpace;\r | |
634 | EFI_REMOVE_MEMORY_SPACE RemoveMemorySpace;\r | |
635 | EFI_GET_MEMORY_SPACE_DESCRIPTOR GetMemorySpaceDescriptor;\r | |
636 | EFI_SET_MEMORY_SPACE_ATTRIBUTES SetMemorySpaceAttributes;\r | |
637 | EFI_GET_MEMORY_SPACE_MAP GetMemorySpaceMap;\r | |
638 | EFI_ADD_IO_SPACE AddIoSpace;\r | |
639 | EFI_ALLOCATE_IO_SPACE AllocateIoSpace;\r | |
640 | EFI_FREE_IO_SPACE FreeIoSpace;\r | |
641 | EFI_REMOVE_IO_SPACE RemoveIoSpace;\r | |
642 | EFI_GET_IO_SPACE_DESCRIPTOR GetIoSpaceDescriptor;\r | |
643 | EFI_GET_IO_SPACE_MAP GetIoSpaceMap;\r | |
644 | \r | |
645 | //\r | |
646 | // Dispatcher Services\r | |
647 | //\r | |
648 | EFI_DISPATCH Dispatch;\r | |
649 | EFI_SCHEDULE Schedule;\r | |
650 | EFI_TRUST Trust;\r | |
651 | //\r | |
652 | // Service to process a single firmware volume found in a capsule\r | |
653 | //\r | |
654 | EFI_PROCESS_FIRMWARE_VOLUME ProcessFirmwareVolume;\r | |
655 | } DXE_SERVICES;\r | |
656 | \r | |
657 | typedef DXE_SERVICES EFI_DXE_SERVICES;\r | |
658 | \r | |
659 | #endif\r |