2 Include file matches things in PI.
4 Copyright (c) 2006 - 2007, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 Module Name: PiDxeCis.h
15 @par Revision Reference:
20 #ifndef __PI_DXECIS_H__
21 #define __PI_DXECIS_H__
23 #include <Pi/PiMultiPhase.h>
26 // Global Coherencey Domain types
29 EfiGcdMemoryTypeNonExistent
,
30 EfiGcdMemoryTypeReserved
,
31 EfiGcdMemoryTypeSystemMemory
,
32 EfiGcdMemoryTypeMemoryMappedIo
,
33 EfiGcdMemoryTypeMaximum
34 } EFI_GCD_MEMORY_TYPE
;
38 EfiGcdIoTypeNonExistent
,
46 EfiGcdAllocateAnySearchBottomUp
,
47 EfiGcdAllocateMaxAddressSearchBottomUp
,
48 EfiGcdAllocateAddress
,
49 EfiGcdAllocateAnySearchTopDown
,
50 EfiGcdAllocateMaxAddressSearchTopDown
,
52 } EFI_GCD_ALLOCATE_TYPE
;
56 EFI_PHYSICAL_ADDRESS BaseAddress
;
60 EFI_GCD_MEMORY_TYPE GcdMemoryType
;
61 EFI_HANDLE ImageHandle
;
62 EFI_HANDLE DeviceHandle
;
63 } EFI_GCD_MEMORY_SPACE_DESCRIPTOR
;
67 EFI_PHYSICAL_ADDRESS BaseAddress
;
69 EFI_GCD_IO_TYPE GcdIoType
;
70 EFI_HANDLE ImageHandle
;
71 EFI_HANDLE DeviceHandle
;
72 } EFI_GCD_IO_SPACE_DESCRIPTOR
;
76 Adds reserved memory, system memory, or memory-mapped I/O resources to the
77 global coherency domain of the processor.
79 @param GcdMemoryType Memory type of the memory space.
80 @param BaseAddress Base address of the memory space.
81 @param Length Length of the memory space.
82 @param Capabilities alterable attributes of the memory space.
84 @retval EFI_SUCCESS Merged this memory space into GCD map.
89 (EFIAPI
*EFI_ADD_MEMORY_SPACE
) (
90 IN EFI_GCD_MEMORY_TYPE GcdMemoryType
,
91 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
93 IN UINT64 Capabilities
98 Allocates nonexistent memory, reserved memory, system memory, or memorymapped
99 I/O resources from the global coherency domain of the processor.
101 @param GcdAllocateType The type of allocate operation
102 @param GcdMemoryType The desired memory type
103 @param Alignment Align with 2^Alignment
104 @param Length Length to allocate
105 @param BaseAddress Base address to allocate
106 @param Imagehandle The image handle consume the allocated space.
107 @param DeviceHandle The device handle consume the allocated space.
109 @retval EFI_INVALID_PARAMETER Invalid parameter.
110 @retval EFI_NOT_FOUND No descriptor contains the desired space.
111 @retval EFI_SUCCESS Memory space successfully allocated.
116 (EFIAPI
*EFI_ALLOCATE_MEMORY_SPACE
) (
117 IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType
,
118 IN EFI_GCD_MEMORY_TYPE GcdMemoryType
,
121 IN OUT EFI_PHYSICAL_ADDRESS
*BaseAddress
,
122 IN EFI_HANDLE ImageHandle
,
123 IN EFI_HANDLE DeviceHandle OPTIONAL
128 Frees nonexistent memory, reserved memory, system memory, or memory-mapped
129 I/O resources from the global coherency domain of the processor.
131 @param BaseAddress Base address of the segment.
132 @param Length Length of the segment.
134 @retval EFI_SUCCESS Space successfully freed.
139 (EFIAPI
*EFI_FREE_MEMORY_SPACE
) (
140 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
146 Removes reserved memory, system memory, or memory-mapped I/O resources from
147 the global coherency domain of the processor.
149 @param BaseAddress Base address of the memory space.
150 @param Length Length of the memory space.
152 @retval EFI_SUCCESS Successfully remove a segment of memory space.
157 (EFIAPI
*EFI_REMOVE_MEMORY_SPACE
) (
158 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
164 Retrieves the descriptor for a memory region containing a specified address.
166 @param BaseAddress Specified start address
167 @param Descriptor Specified length
169 @retval EFI_INVALID_PARAMETER Invalid parameter
170 @retval EFI_SUCCESS Successfully get memory space descriptor.
175 (EFIAPI
*EFI_GET_MEMORY_SPACE_DESCRIPTOR
) (
176 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
177 OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR
*Descriptor
182 Modifies the attributes for a memory region in the global coherency domain of the
185 @param BaseAddress Specified start address
186 @param Length Specified length
187 @param Attributes Specified attributes
189 @retval EFI_SUCCESS Successfully set attribute of a segment of memory space.
195 (EFIAPI
*EFI_SET_MEMORY_SPACE_ATTRIBUTES
) (
196 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
203 Returns a map of the memory resources in the global coherency domain of the
206 @param NumberOfDescriptors Number of descriptors.
207 @param MemorySpaceMap Descriptor array
209 @retval EFI_INVALID_PARAMETER Invalid parameter
210 @retval EFI_OUT_OF_RESOURCES No enough buffer to allocate
211 @retval EFI_SUCCESS Successfully get memory space map.
216 (EFIAPI
*EFI_GET_MEMORY_SPACE_MAP
) (
217 OUT UINTN
*NumberOfDescriptors
,
218 OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR
**MemorySpaceMap
223 Adds reserved I/O or I/O resources to the global coherency domain of the processor.
225 @param GcdIoType IO type of the segment.
226 @param BaseAddress Base address of the segment.
227 @param Length Length of the segment.
229 @retval EFI_SUCCESS Merged this segment into GCD map.
234 (EFIAPI
*EFI_ADD_IO_SPACE
) (
235 IN EFI_GCD_IO_TYPE GcdIoType
,
236 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
242 Allocates nonexistent I/O, reserved I/O, or I/O resources from the global coherency
243 domain of the processor.
245 @param GcdAllocateType The type of allocate operation
246 @param GcdIoType The desired IO type
247 @param Alignment Align with 2^Alignment
248 @param Length Length to allocate
249 @param BaseAddress Base address to allocate
250 @param Imagehandle The image handle consume the allocated space.
251 @param DeviceHandle The device handle consume the allocated space.
253 @retval EFI_INVALID_PARAMETER Invalid parameter.
254 @retval EFI_NOT_FOUND No descriptor contains the desired space.
255 @retval EFI_SUCCESS IO space successfully allocated.
260 (EFIAPI
*EFI_ALLOCATE_IO_SPACE
) (
261 IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType
,
262 IN EFI_GCD_IO_TYPE GcdIoType
,
265 IN OUT EFI_PHYSICAL_ADDRESS
*BaseAddress
,
266 IN EFI_HANDLE ImageHandle
,
267 IN EFI_HANDLE DeviceHandle OPTIONAL
272 Frees nonexistent I/O, reserved I/O, or I/O resources from the global coherency
273 domain of the processor.
275 @param BaseAddress Base address of the segment.
276 @param Length Length of the segment.
278 @retval EFI_SUCCESS Space successfully freed.
283 (EFIAPI
*EFI_FREE_IO_SPACE
) (
284 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
290 Removes reserved I/O or I/O resources from the global coherency domain of the
293 @param BaseAddress Base address of the segment.
294 @param Length Length of the segment.
296 @retval EFI_SUCCESS Successfully removed a segment of IO space.
301 (EFIAPI
*EFI_REMOVE_IO_SPACE
) (
302 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
308 Retrieves the descriptor for an I/O region containing a specified address.
310 @param BaseAddress Specified start address
311 @param Descriptor Specified length
313 @retval EFI_INVALID_PARAMETER Descriptor is NULL.
314 @retval EFI_SUCCESS Successfully get the IO space descriptor.
319 (EFIAPI
*EFI_GET_IO_SPACE_DESCRIPTOR
) (
320 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
321 OUT EFI_GCD_IO_SPACE_DESCRIPTOR
*Descriptor
326 Returns a map of the I/O resources in the global coherency domain of the processor.
328 @param NumberOfDescriptors Number of descriptors.
329 @param MemorySpaceMap Descriptor array
331 @retval EFI_INVALID_PARAMETER Invalid parameter
332 @retval EFI_OUT_OF_RESOURCES No enough buffer to allocate
333 @retval EFI_SUCCESS Successfully get IO space map.
338 (EFIAPI
*EFI_GET_IO_SPACE_MAP
) (
339 OUT UINTN
*NumberOfDescriptors
,
340 OUT EFI_GCD_IO_SPACE_DESCRIPTOR
**IoSpaceMap
347 Loads and executed DXE drivers from firmware volumes.
354 (EFIAPI
*EFI_DISPATCH
) (VOID
)
358 Clears the Schedule on Request (SOR) flag for a component that is stored in a firmware volume.
360 @param FirmwareVolumeHandle The handle of the firmware volume that contains the file specified by FileName.
361 @param DriverName A pointer to the name of the file in a firmware volume.
368 (EFIAPI
*EFI_SCHEDULE
) (
369 IN EFI_HANDLE FirmwareVolumeHandle
,
370 IN EFI_GUID
*DriverName
375 Promotes a file stored in a firmware volume from the untrusted to the trusted state.
377 @param FirmwareVolumeHandle The handle of the firmware volume that contains the file specified by FileName.
378 @param DriverName A pointer to the name of the file in a firmware volume.
385 (EFIAPI
*EFI_TRUST
) (
386 IN EFI_HANDLE FirmwareVolumeHandle
,
387 IN EFI_GUID
*DriverName
392 Creates a firmware volume handle for a firmware volume that is present in system memory.
394 @param FirmwareVolumeHeader A pointer to the header of the firmware volume.
395 @param Size The size, in bytes, of the firmware volume.
396 @param FirmwareVolumeHandle On output, a pointer to the created handle.
403 (EFIAPI
*EFI_PROCESS_FIRMWARE_VOLUME
) (
406 OUT EFI_HANDLE
*FirmwareVolumeHandle
411 // DXE Services Table
413 #define DXE_SERVICES_SIGNATURE 0x565245535f455844
414 #define DXE_SERVICES_REVISION ((1<<16) | (00)
417 EFI_TABLE_HEADER Hdr
;
420 // Global Coherency Domain Services
422 EFI_ADD_MEMORY_SPACE AddMemorySpace
;
423 EFI_ALLOCATE_MEMORY_SPACE AllocateMemorySpace
;
424 EFI_FREE_MEMORY_SPACE FreeMemorySpace
;
425 EFI_REMOVE_MEMORY_SPACE RemoveMemorySpace
;
426 EFI_GET_MEMORY_SPACE_DESCRIPTOR GetMemorySpaceDescriptor
;
427 EFI_SET_MEMORY_SPACE_ATTRIBUTES SetMemorySpaceAttributes
;
428 EFI_GET_MEMORY_SPACE_MAP GetMemorySpaceMap
;
429 EFI_ADD_IO_SPACE AddIoSpace
;
430 EFI_ALLOCATE_IO_SPACE AllocateIoSpace
;
431 EFI_FREE_IO_SPACE FreeIoSpace
;
432 EFI_REMOVE_IO_SPACE RemoveIoSpace
;
433 EFI_GET_IO_SPACE_DESCRIPTOR GetIoSpaceDescriptor
;
434 EFI_GET_IO_SPACE_MAP GetIoSpaceMap
;
437 // Dispatcher Services
439 EFI_DISPATCH Dispatch
;
440 EFI_SCHEDULE Schedule
;
443 // Service to process a single firmware volume found in a capsule
445 EFI_PROCESS_FIRMWARE_VOLUME ProcessFirmwareVolume
;
448 typedef DXE_SERVICES EFI_DXE_SERVICES
;