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.
194 (EFIAPI
*EFI_SET_MEMORY_SPACE_ATTRIBUTES
) (
195 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
202 Returns a map of the memory resources in the global coherency domain of the
205 @param NumberOfDescriptors Number of descriptors.
206 @param MemorySpaceMap Descriptor array
208 @retval EFI_INVALID_PARAMETER Invalid parameter
209 @retval EFI_OUT_OF_RESOURCES No enough buffer to allocate
210 @retval EFI_SUCCESS Successfully get memory space map.
215 (EFIAPI
*EFI_GET_MEMORY_SPACE_MAP
) (
216 OUT UINTN
*NumberOfDescriptors
,
217 OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR
**MemorySpaceMap
222 Adds reserved I/O or I/O resources to the global coherency domain of the processor.
224 @param GcdIoType IO type of the segment.
225 @param BaseAddress Base address of the segment.
226 @param Length Length of the segment.
228 @retval EFI_SUCCESS Merged this segment into GCD map.
233 (EFIAPI
*EFI_ADD_IO_SPACE
) (
234 IN EFI_GCD_IO_TYPE GcdIoType
,
235 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
241 Allocates nonexistent I/O, reserved I/O, or I/O resources from the global coherency
242 domain of the processor.
244 @param GcdAllocateType The type of allocate operation
245 @param GcdIoType The desired IO type
246 @param Alignment Align with 2^Alignment
247 @param Length Length to allocate
248 @param BaseAddress Base address to allocate
249 @param Imagehandle The image handle consume the allocated space.
250 @param DeviceHandle The device handle consume the allocated space.
252 @retval EFI_INVALID_PARAMETER Invalid parameter.
253 @retval EFI_NOT_FOUND No descriptor contains the desired space.
254 @retval EFI_SUCCESS IO space successfully allocated.
259 (EFIAPI
*EFI_ALLOCATE_IO_SPACE
) (
260 IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType
,
261 IN EFI_GCD_IO_TYPE GcdIoType
,
264 IN OUT EFI_PHYSICAL_ADDRESS
*BaseAddress
,
265 IN EFI_HANDLE ImageHandle
,
266 IN EFI_HANDLE DeviceHandle OPTIONAL
271 Frees nonexistent I/O, reserved I/O, or I/O resources from the global coherency
272 domain of the processor.
274 @param BaseAddress Base address of the segment.
275 @param Length Length of the segment.
277 @retval EFI_SUCCESS Space successfully freed.
282 (EFIAPI
*EFI_FREE_IO_SPACE
) (
283 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
289 Removes reserved I/O or I/O resources from the global coherency domain of the
292 @param BaseAddress Base address of the segment.
293 @param Length Length of the segment.
295 @retval EFI_SUCCESS Successfully removed a segment of IO space.
300 (EFIAPI
*EFI_REMOVE_IO_SPACE
) (
301 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
307 Retrieves the descriptor for an I/O region containing a specified address.
309 @param BaseAddress Specified start address
310 @param Descriptor Specified length
312 @retval EFI_INVALID_PARAMETER Descriptor is NULL.
313 @retval EFI_SUCCESS Successfully get the IO space descriptor.
318 (EFIAPI
*EFI_GET_IO_SPACE_DESCRIPTOR
) (
319 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
320 OUT EFI_GCD_IO_SPACE_DESCRIPTOR
*Descriptor
325 Returns a map of the I/O resources in the global coherency domain of the processor.
327 @param NumberOfDescriptors Number of descriptors.
328 @param MemorySpaceMap Descriptor array
330 @retval EFI_INVALID_PARAMETER Invalid parameter
331 @retval EFI_OUT_OF_RESOURCES No enough buffer to allocate
332 @retval EFI_SUCCESS Successfully get IO space map.
337 (EFIAPI
*EFI_GET_IO_SPACE_MAP
) (
338 OUT UINTN
*NumberOfDescriptors
,
339 OUT EFI_GCD_IO_SPACE_DESCRIPTOR
**IoSpaceMap
346 Loads and executed DXE drivers from firmware volumes.
353 (EFIAPI
*EFI_DISPATCH
) (
359 Clears the Schedule on Request (SOR) flag for a component that is stored in a firmware volume.
361 @param FirmwareVolumeHandle The handle of the firmware volume that contains the file specified by FileName.
362 @param DriverName A pointer to the name of the file in a firmware volume.
369 (EFIAPI
*EFI_SCHEDULE
) (
370 IN EFI_HANDLE FirmwareVolumeHandle
,
371 IN EFI_GUID
*DriverName
376 Promotes a file stored in a firmware volume from the untrusted to the trusted state.
378 @param FirmwareVolumeHandle The handle of the firmware volume that contains the file specified by FileName.
379 @param DriverName A pointer to the name of the file in a firmware volume.
386 (EFIAPI
*EFI_TRUST
) (
387 IN EFI_HANDLE FirmwareVolumeHandle
,
388 IN EFI_GUID
*DriverName
393 Creates a firmware volume handle for a firmware volume that is present in system memory.
395 @param FirmwareVolumeHeader A pointer to the header of the firmware volume.
396 @param Size The size, in bytes, of the firmware volume.
397 @param FirmwareVolumeHandle On output, a pointer to the created handle.
404 (EFIAPI
*EFI_PROCESS_FIRMWARE_VOLUME
) (
407 OUT EFI_HANDLE
*FirmwareVolumeHandle
412 // DXE Services Table
414 #define DXE_SERVICES_SIGNATURE 0x565245535f455844
415 #define DXE_SERVICES_REVISION ((1<<16) | (00)
418 EFI_TABLE_HEADER Hdr
;
421 // Global Coherency Domain Services
423 EFI_ADD_MEMORY_SPACE AddMemorySpace
;
424 EFI_ALLOCATE_MEMORY_SPACE AllocateMemorySpace
;
425 EFI_FREE_MEMORY_SPACE FreeMemorySpace
;
426 EFI_REMOVE_MEMORY_SPACE RemoveMemorySpace
;
427 EFI_GET_MEMORY_SPACE_DESCRIPTOR GetMemorySpaceDescriptor
;
428 EFI_SET_MEMORY_SPACE_ATTRIBUTES SetMemorySpaceAttributes
;
429 EFI_GET_MEMORY_SPACE_MAP GetMemorySpaceMap
;
430 EFI_ADD_IO_SPACE AddIoSpace
;
431 EFI_ALLOCATE_IO_SPACE AllocateIoSpace
;
432 EFI_FREE_IO_SPACE FreeIoSpace
;
433 EFI_REMOVE_IO_SPACE RemoveIoSpace
;
434 EFI_GET_IO_SPACE_DESCRIPTOR GetIoSpaceDescriptor
;
435 EFI_GET_IO_SPACE_MAP GetIoSpaceMap
;
438 // Dispatcher Services
440 EFI_DISPATCH Dispatch
;
441 EFI_SCHEDULE Schedule
;
444 // Service to process a single firmware volume found in a capsule
446 EFI_PROCESS_FIRMWARE_VOLUME ProcessFirmwareVolume
;
449 typedef DXE_SERVICES EFI_DXE_SERVICES
;