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