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