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