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