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