]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Pi/PiDxeCis.h
Update PI Service Table Versions per PI 1.2 Errata C.
[mirror_edk2.git] / MdePkg / Include / Pi / PiDxeCis.h
CommitLineData
959ccb23 1/** @file\r
2 Include file matches things in PI.\r
3\r
53e6937c 4Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
af2dc6a7 5This program and the accompanying materials are licensed and made available under \r
6the terms and conditions of the BSD License that accompanies this distribution. \r
7The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php. \r
959ccb23 9\r
af2dc6a7 10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11WITHOUT 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 27typedef 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 57typedef 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 79typedef 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 111typedef 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 162typedef 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
231typedef\r
232EFI_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
270typedef\r
271EFI_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
300typedef\r
301EFI_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
328typedef\r
329EFI_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
347typedef\r
348EFI_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
959ccb23 372\r
373**/\r
374typedef\r
959ccb23 375EFI_STATUS\r
dc53faa3 376(EFIAPI *EFI_SET_MEMORY_SPACE_ATTRIBUTES)(\r
959ccb23 377 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
378 IN UINT64 Length,\r
379 IN UINT64 Attributes\r
ed66e1bc 380 );\r
959ccb23 381\r
382/**\r
383 Returns a map of the memory resources in the global coherency domain of the\r
384 processor.\r
385\r
4ba967e7 386 @param NumberOfDescriptors A pointer to number of descriptors returned in the MemorySpaceMap buffer.\r
387 @param MemorySpaceMap A pointer to the array of EFI_GCD_MEMORY_SPACE_DESCRIPTORs.\r
959ccb23 388\r
4ba967e7 389 @retval EFI_SUCCESS The memory space map was returned in the MemorySpaceMap\r
390 buffer, and the number of descriptors in MemorySpaceMap was\r
391 returned in NumberOfDescriptors.\r
392 @retval EFI_INVALID_PARAMETER NumberOfDescriptors is NULL.\r
393 @retval EFI_INVALID_PARAMETER MemorySpaceMap is NULL.\r
394 @retval EFI_OUT_OF_RESOURCES There are not enough resources to allocate MemorySpaceMap.\r
959ccb23 395\r
396**/\r
397typedef\r
398EFI_STATUS\r
dc53faa3 399(EFIAPI *EFI_GET_MEMORY_SPACE_MAP)(\r
959ccb23 400 OUT UINTN *NumberOfDescriptors,\r
401 OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR **MemorySpaceMap\r
ed66e1bc 402 );\r
959ccb23 403\r
404/**\r
405 Adds reserved I/O or I/O resources to the global coherency domain of the processor.\r
406\r
4ba967e7 407 @param GcdIoType The type of I/O resource being added.\r
408 @param BaseAddress The physical address that is the start address of the I/O resource being added.\r
409 @param Length The size in bytes of the I/O resource that is being added.\r
410\r
411 @retval EFI_SUCCESS The I/O resource was added to the global coherency domain of\r
412 the processor.\r
413 @retval EFI_INVALID_PARAMETER GcdIoType is invalid.\r
414 @retval EFI_INVALID_PARAMETER Length is zero.\r
415 @retval EFI_OUT_OF_RESOURCES There are not enough system resources to add the I/O resource to\r
416 the global coherency domain of the processor.\r
417 @retval EFI_UNSUPPORTED The processor does not support one or more bytes of the I/O\r
418 resource range specified by BaseAddress and Length.\r
419 @retval EFI_ACCESS_DENIED One or more bytes of the I/O resource range specified by\r
420 BaseAddress and Length conflicts with an I/O resource\r
421 range that was previously added to the global coherency domain\r
422 of the processor.\r
423 @retval EFI_ACCESS_DENIED One or more bytes of the I/O resource range specified by\r
424 BaseAddress and Length was allocated in a prior call to\r
425 AllocateIoSpace().\r
959ccb23 426\r
427**/\r
428typedef\r
429EFI_STATUS\r
dc53faa3 430(EFIAPI *EFI_ADD_IO_SPACE)(\r
959ccb23 431 IN EFI_GCD_IO_TYPE GcdIoType,\r
432 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
433 IN UINT64 Length\r
ed66e1bc 434 );\r
959ccb23 435\r
436/**\r
437 Allocates nonexistent I/O, reserved I/O, or I/O resources from the global coherency\r
438 domain of the processor.\r
439\r
4ba967e7 440 @param GcdAllocateType The type of allocation to perform.\r
441 @param GcdIoType The type of I/O resource being allocated.\r
442 @param Alignment The log base 2 of the boundary that BaseAddress must be aligned on output.\r
443 @param Length The size in bytes of the I/O resource range that is being allocated.\r
444 @param BaseAddress A pointer to a physical address.\r
445 @param Imagehandle The image handle of the agent that is allocating the I/O resource.\r
446 @param DeviceHandle The device handle for which the I/O resource is being allocated.\r
447\r
448 @retval EFI_SUCCESS The I/O resource was allocated from the global coherency domain\r
449 of the processor.\r
450 @retval EFI_INVALID_PARAMETER GcdAllocateType is invalid.\r
451 @retval EFI_INVALID_PARAMETER GcdIoType is invalid.\r
452 @retval EFI_INVALID_PARAMETER Length is zero.\r
453 @retval EFI_INVALID_PARAMETER BaseAddress is NULL.\r
454 @retval EFI_INVALID_PARAMETER ImageHandle is NULL.\r
455 @retval EFI_OUT_OF_RESOURCES There are not enough system resources to allocate the I/O\r
456 resource from the global coherency domain of the processor.\r
457 @retval EFI_NOT_FOUND The I/O resource request could not be satisfied.\r
959ccb23 458\r
459**/\r
460typedef\r
461EFI_STATUS\r
dc53faa3 462(EFIAPI *EFI_ALLOCATE_IO_SPACE)(\r
959ccb23 463 IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType,\r
464 IN EFI_GCD_IO_TYPE GcdIoType,\r
465 IN UINTN Alignment,\r
466 IN UINT64 Length,\r
467 IN OUT EFI_PHYSICAL_ADDRESS *BaseAddress,\r
468 IN EFI_HANDLE ImageHandle,\r
469 IN EFI_HANDLE DeviceHandle OPTIONAL\r
ed66e1bc 470 );\r
959ccb23 471\r
472/**\r
473 Frees nonexistent I/O, reserved I/O, or I/O resources from the global coherency\r
474 domain of the processor.\r
475\r
4ba967e7 476 @param BaseAddress The physical address that is the start address of the I/O resource being freed.\r
477 @param Length The size in bytes of the I/O resource range that is being freed.\r
959ccb23 478\r
4ba967e7 479 @retval EFI_SUCCESS The I/O resource was freed from the global coherency domain of the\r
480 processor.\r
481 @retval EFI_INVALID_PARAMETER Length is zero.\r
482 @retval EFI_UNSUPPORTED The processor does not support one or more bytes of the I/O resource\r
483 range specified by BaseAddress and Length.\r
484 @retval EFI_NOT_FOUND The I/O resource range specified by BaseAddress and Length\r
485 was not allocated with previous calls to AllocateIoSpace().\r
486 @retval EFI_OUT_OF_RESOURCES There are not enough system resources to free the I/O resource from\r
487 the global coherency domain of the processor.\r
959ccb23 488\r
489**/\r
490typedef\r
491EFI_STATUS\r
dc53faa3 492(EFIAPI *EFI_FREE_IO_SPACE)(\r
959ccb23 493 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
494 IN UINT64 Length\r
ed66e1bc 495 );\r
959ccb23 496\r
497/**\r
498 Removes reserved I/O or I/O resources from the global coherency domain of the\r
499 processor.\r
500\r
4ba967e7 501 @param BaseAddress A pointer to a physical address that is the start address of the I/O resource being\r
502 removed.\r
503 @param Length The size in bytes of the I/O resource that is being removed.\r
504\r
505 @retval EFI_SUCCESS The I/O resource was removed from the global coherency domain\r
506 of the processor.\r
507 @retval EFI_INVALID_PARAMETER Length is zero.\r
508 @retval EFI_UNSUPPORTED The processor does not support one or more bytes of the I/O\r
509 resource range specified by BaseAddress and Length.\r
510 @retval EFI_NOT_FOUND One or more bytes of the I/O resource range specified by\r
511 BaseAddress and Length was not added with previous\r
512 calls to AddIoSpace().\r
513 @retval EFI_ACCESS_DENIED One or more bytes of the I/O resource range specified by\r
514 BaseAddress and Length has been allocated with\r
515 AllocateIoSpace().\r
516 @retval EFI_OUT_OF_RESOURCES There are not enough system resources to remove the I/O\r
517 resource from the global coherency domain of the processor.\r
959ccb23 518\r
519**/\r
520typedef\r
521EFI_STATUS\r
dc53faa3 522(EFIAPI *EFI_REMOVE_IO_SPACE)(\r
959ccb23 523 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
524 IN UINT64 Length\r
ed66e1bc 525 );\r
959ccb23 526\r
527/**\r
528 Retrieves the descriptor for an I/O region containing a specified address.\r
529\r
4ba967e7 530 @param BaseAddress The physical address that is the start address of an I/O region.\r
531 @param Descriptor A pointer to a caller allocated descriptor.\r
959ccb23 532\r
4ba967e7 533 @retval EFI_SUCCESS The descriptor for the I/O resource region containing\r
534 BaseAddress was returned in Descriptor.\r
959ccb23 535 @retval EFI_INVALID_PARAMETER Descriptor is NULL.\r
4ba967e7 536 @retval EFI_NOT_FOUND An I/O resource range containing BaseAddress was not found.\r
959ccb23 537\r
538**/\r
539typedef\r
540EFI_STATUS\r
dc53faa3 541(EFIAPI *EFI_GET_IO_SPACE_DESCRIPTOR)(\r
959ccb23 542 IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
543 OUT EFI_GCD_IO_SPACE_DESCRIPTOR *Descriptor\r
ed66e1bc 544 );\r
959ccb23 545\r
546/**\r
547 Returns a map of the I/O resources in the global coherency domain of the processor.\r
548\r
4ba967e7 549 @param NumberOfDescriptors A pointer to number of descriptors returned in the IoSpaceMap buffer.\r
550 @param MemorySpaceMap A pointer to the array of EFI_GCD_IO_SPACE_DESCRIPTORs.\r
551\r
552 @retval EFI_SUCCESS The I/O space map was returned in the IoSpaceMap buffer, and\r
553 the number of descriptors in IoSpaceMap was returned in\r
554 NumberOfDescriptors.\r
555 @retval EFI_INVALID_PARAMETER NumberOfDescriptors is NULL.\r
556 @retval EFI_INVALID_PARAMETER IoSpaceMap is NULL.\r
557 @retval EFI_OUT_OF_RESOURCES There are not enough resources to allocate IoSpaceMap.\r
959ccb23 558\r
959ccb23 559\r
560**/\r
561typedef\r
562EFI_STATUS\r
dc53faa3 563(EFIAPI *EFI_GET_IO_SPACE_MAP)(\r
959ccb23 564 OUT UINTN *NumberOfDescriptors,\r
565 OUT EFI_GCD_IO_SPACE_DESCRIPTOR **IoSpaceMap\r
ed66e1bc 566 );\r
959ccb23 567\r
568\r
569\r
570/**\r
571 Loads and executed DXE drivers from firmware volumes.\r
572\r
4ba967e7 573 The Dispatch() function searches for DXE drivers in firmware volumes that have been \r
574 installed since the last time the Dispatch() service was called. It then evaluates \r
575 the dependency expressions of all the DXE drivers and loads and executes those DXE\r
576 drivers whose dependency expression evaluate to TRUE. This service must interact with\r
577 the Security Architectural Protocol to authenticate DXE drivers before they are executed.\r
578 This process is continued until no more DXE drivers can be executed.\r
579\r
580 @retval EFI_SUCCESS One or more DXE driver were dispatched.\r
581 @retval EFI_NOT_FOUND No DXE drivers were dispatched.\r
582 @retval EFI_ALREADY_STARTED An attempt is being made to start the DXE Dispatcher recursively.\r
af2dc6a7 583 Thus, no action was taken.\r
959ccb23 584\r
585**/\r
586typedef\r
587EFI_STATUS\r
dc53faa3 588(EFIAPI *EFI_DISPATCH)(\r
00edb218 589 VOID\r
ed66e1bc 590 );\r
959ccb23 591\r
592/**\r
593 Clears the Schedule on Request (SOR) flag for a component that is stored in a firmware volume.\r
594\r
595 @param FirmwareVolumeHandle The handle of the firmware volume that contains the file specified by FileName.\r
4ba967e7 596 @param FileName A pointer to the name of the file in a firmware volume.\r
959ccb23 597\r
4ba967e7 598 @retval EFI_SUCCESS The DXE driver was found and its SOR bit was cleared.\r
599 @retval EFI_NOT_FOUND The DXE driver does not exist, or the DXE driver exists and its SOR\r
600 bit is not set.\r
959ccb23 601\r
602**/\r
603typedef\r
604EFI_STATUS\r
dc53faa3 605(EFIAPI *EFI_SCHEDULE)(\r
959ccb23 606 IN EFI_HANDLE FirmwareVolumeHandle,\r
4ba967e7 607 IN CONST EFI_GUID *FileName\r
ed66e1bc 608 );\r
959ccb23 609\r
610/**\r
611 Promotes a file stored in a firmware volume from the untrusted to the trusted state.\r
612\r
613 @param FirmwareVolumeHandle The handle of the firmware volume that contains the file specified by FileName.\r
614 @param DriverName A pointer to the name of the file in a firmware volume.\r
615\r
373b5cf9 616 @return Status of promoting FFS from untrusted to trusted\r
617 state.\r
4ba967e7 618 @retval EFI_NOT_FOUND The file was not found in the untrusted state.\r
959ccb23 619\r
620**/\r
621typedef\r
622EFI_STATUS\r
dc53faa3 623(EFIAPI *EFI_TRUST)(\r
959ccb23 624 IN EFI_HANDLE FirmwareVolumeHandle,\r
4ba967e7 625 IN CONST EFI_GUID *FileName\r
ed66e1bc 626 );\r
959ccb23 627\r
628/**\r
629 Creates a firmware volume handle for a firmware volume that is present in system memory.\r
630\r
631 @param FirmwareVolumeHeader A pointer to the header of the firmware volume.\r
632 @param Size The size, in bytes, of the firmware volume.\r
633 @param FirmwareVolumeHandle On output, a pointer to the created handle.\r
634\r
4ba967e7 635 @retval EFI_SUCCESS The EFI_FIRMWARE_VOLUME_PROTOCOL and\r
636 EFI_DEVICE_PATH_PROTOCOL were installed onto\r
637 FirmwareVolumeHandle for the firmware volume described\r
638 by FirmwareVolumeHeader and Size.\r
639 @retval EFI_VOLUME_CORRUPTED The firmware volume described by FirmwareVolumeHeader\r
640 and Size is corrupted.\r
641 @retval EFI_OUT_OF_RESOURCES There are not enough system resources available to produce the\r
642 EFI_FIRMWARE_VOLUME_PROTOCOL and EFI_DEVICE_PATH_PROTOCOL \r
643 for the firmware volume described by FirmwareVolumeHeader and Size.\r
959ccb23 644\r
645**/\r
646typedef\r
647EFI_STATUS\r
dc53faa3 648(EFIAPI *EFI_PROCESS_FIRMWARE_VOLUME)(\r
4ba967e7 649 IN CONST VOID *FirmwareVolumeHeader,\r
959ccb23 650 IN UINTN Size,\r
651 OUT EFI_HANDLE *FirmwareVolumeHandle\r
ed66e1bc 652 );\r
959ccb23 653\r
654//\r
655// DXE Services Table\r
656//\r
53e6937c 657#define DXE_SERVICES_SIGNATURE 0x565245535f455844ULL\r
658#define DXE_SPECIFICATION_MAJOR_REVISION 1\r
659#define DXE_SPECIFICATION_MINOR_REVISION 20\r
660#define DXE_SERVICES_REVISION ((DXE_SPECIFICATION_MAJOR_REVISION<<16) | (DXE_SPECIFICATION_MINOR_REVISION))\r
959ccb23 661\r
662typedef struct {\r
1bf79370
LG
663 ///\r
664 /// The table header for the DXE Services Table.\r
665 /// This header contains the DXE_SERVICES_SIGNATURE and DXE_SERVICES_REVISION values.\r
666 ///\r
959ccb23 667 EFI_TABLE_HEADER Hdr;\r
668\r
669 //\r
670 // Global Coherency Domain Services\r
671 //\r
672 EFI_ADD_MEMORY_SPACE AddMemorySpace;\r
673 EFI_ALLOCATE_MEMORY_SPACE AllocateMemorySpace;\r
674 EFI_FREE_MEMORY_SPACE FreeMemorySpace;\r
675 EFI_REMOVE_MEMORY_SPACE RemoveMemorySpace;\r
676 EFI_GET_MEMORY_SPACE_DESCRIPTOR GetMemorySpaceDescriptor;\r
677 EFI_SET_MEMORY_SPACE_ATTRIBUTES SetMemorySpaceAttributes;\r
678 EFI_GET_MEMORY_SPACE_MAP GetMemorySpaceMap;\r
679 EFI_ADD_IO_SPACE AddIoSpace;\r
680 EFI_ALLOCATE_IO_SPACE AllocateIoSpace;\r
681 EFI_FREE_IO_SPACE FreeIoSpace;\r
682 EFI_REMOVE_IO_SPACE RemoveIoSpace;\r
683 EFI_GET_IO_SPACE_DESCRIPTOR GetIoSpaceDescriptor;\r
684 EFI_GET_IO_SPACE_MAP GetIoSpaceMap;\r
685\r
686 //\r
687 // Dispatcher Services\r
688 //\r
689 EFI_DISPATCH Dispatch;\r
690 EFI_SCHEDULE Schedule;\r
691 EFI_TRUST Trust;\r
692 //\r
693 // Service to process a single firmware volume found in a capsule\r
694 //\r
695 EFI_PROCESS_FIRMWARE_VOLUME ProcessFirmwareVolume;\r
696} DXE_SERVICES;\r
697\r
698typedef DXE_SERVICES EFI_DXE_SERVICES;\r
699\r
a32c6dcf 700\r
701/**\r
af2dc6a7 702 The function prototype for invoking a function on an Application Processor.\r
a32c6dcf 703\r
704 This definition is used by the UEFI MP Serices Protocol, and the\r
705 PI SMM System Table.\r
706\r
af2dc6a7 707 @param[in,out] Buffer The pointer to private data buffer.\r
a32c6dcf 708**/\r
709typedef\r
710VOID\r
711(EFIAPI *EFI_AP_PROCEDURE)(\r
712 IN OUT VOID *Buffer\r
713 );\r
714\r
959ccb23 715#endif\r