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