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 @par Revision Reference:
18 #ifndef __PI_DXECIS_H__
19 #define __PI_DXECIS_H__
21 #include <Pi/PiMultiPhase.h>
24 // Global Coherencey Domain types
27 EfiGcdMemoryTypeNonExistent
,
28 EfiGcdMemoryTypeReserved
,
29 EfiGcdMemoryTypeSystemMemory
,
30 EfiGcdMemoryTypeMemoryMappedIo
,
31 EfiGcdMemoryTypeMaximum
32 } EFI_GCD_MEMORY_TYPE
;
36 EfiGcdIoTypeNonExistent
,
44 EfiGcdAllocateAnySearchBottomUp
,
45 EfiGcdAllocateMaxAddressSearchBottomUp
,
46 EfiGcdAllocateAddress
,
47 EfiGcdAllocateAnySearchTopDown
,
48 EfiGcdAllocateMaxAddressSearchTopDown
,
50 } EFI_GCD_ALLOCATE_TYPE
;
54 EFI_PHYSICAL_ADDRESS BaseAddress
;
58 EFI_GCD_MEMORY_TYPE GcdMemoryType
;
59 EFI_HANDLE ImageHandle
;
60 EFI_HANDLE DeviceHandle
;
61 } EFI_GCD_MEMORY_SPACE_DESCRIPTOR
;
65 EFI_PHYSICAL_ADDRESS BaseAddress
;
67 EFI_GCD_IO_TYPE GcdIoType
;
68 EFI_HANDLE ImageHandle
;
69 EFI_HANDLE DeviceHandle
;
70 } EFI_GCD_IO_SPACE_DESCRIPTOR
;
74 Adds reserved memory, system memory, or memory-mapped I/O resources to the
75 global coherency domain of the processor.
77 @param GcdMemoryType Memory type of the memory space.
78 @param BaseAddress Base address of the memory space.
79 @param Length Length of the memory space.
80 @param Capabilities alterable attributes of the memory space.
82 @retval EFI_SUCCESS Merged this memory space into GCD map.
87 (EFIAPI
*EFI_ADD_MEMORY_SPACE
) (
88 IN EFI_GCD_MEMORY_TYPE GcdMemoryType
,
89 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
91 IN UINT64 Capabilities
96 Allocates nonexistent memory, reserved memory, system memory, or memorymapped
97 I/O resources from the global coherency domain of the processor.
99 @param GcdAllocateType The type of allocate operation
100 @param GcdMemoryType The desired memory type
101 @param Alignment Align with 2^Alignment
102 @param Length Length to allocate
103 @param BaseAddress Base address to allocate
104 @param Imagehandle The image handle consume the allocated space.
105 @param DeviceHandle The device handle consume the allocated space.
107 @retval EFI_INVALID_PARAMETER Invalid parameter.
108 @retval EFI_NOT_FOUND No descriptor contains the desired space.
109 @retval EFI_SUCCESS Memory space successfully allocated.
114 (EFIAPI
*EFI_ALLOCATE_MEMORY_SPACE
) (
115 IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType
,
116 IN EFI_GCD_MEMORY_TYPE GcdMemoryType
,
119 IN OUT EFI_PHYSICAL_ADDRESS
*BaseAddress
,
120 IN EFI_HANDLE ImageHandle
,
121 IN EFI_HANDLE DeviceHandle OPTIONAL
126 Frees nonexistent memory, reserved memory, system memory, or memory-mapped
127 I/O resources from the global coherency domain of the processor.
129 @param BaseAddress Base address of the segment.
130 @param Length Length of the segment.
132 @retval EFI_SUCCESS Space successfully freed.
137 (EFIAPI
*EFI_FREE_MEMORY_SPACE
) (
138 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
144 Removes reserved memory, system memory, or memory-mapped I/O resources from
145 the global coherency domain of the processor.
147 @param BaseAddress Base address of the memory space.
148 @param Length Length of the memory space.
150 @retval EFI_SUCCESS Successfully remove a segment of memory space.
155 (EFIAPI
*EFI_REMOVE_MEMORY_SPACE
) (
156 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
162 Retrieves the descriptor for a memory region containing a specified address.
164 @param BaseAddress Specified start address
165 @param Descriptor Specified length
167 @retval EFI_INVALID_PARAMETER Invalid parameter
168 @retval EFI_SUCCESS Successfully get memory space descriptor.
173 (EFIAPI
*EFI_GET_MEMORY_SPACE_DESCRIPTOR
) (
174 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
175 OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR
*Descriptor
180 Modifies the attributes for a memory region in the global coherency domain of the
183 @param BaseAddress Specified start address
184 @param Length Specified length
185 @param Attributes Specified attributes
187 @retval EFI_SUCCESS Successfully set attribute of a segment of memory space.
192 (EFIAPI
*EFI_SET_MEMORY_SPACE_ATTRIBUTES
) (
193 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
200 Returns a map of the memory resources in the global coherency domain of the
203 @param NumberOfDescriptors Number of descriptors.
204 @param MemorySpaceMap Descriptor array
206 @retval EFI_INVALID_PARAMETER Invalid parameter
207 @retval EFI_OUT_OF_RESOURCES No enough buffer to allocate
208 @retval EFI_SUCCESS Successfully get memory space map.
213 (EFIAPI
*EFI_GET_MEMORY_SPACE_MAP
) (
214 OUT UINTN
*NumberOfDescriptors
,
215 OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR
**MemorySpaceMap
220 Adds reserved I/O or I/O resources to the global coherency domain of the processor.
222 @param GcdIoType IO type of the segment.
223 @param BaseAddress Base address of the segment.
224 @param Length Length of the segment.
226 @retval EFI_SUCCESS Merged this segment into GCD map.
231 (EFIAPI
*EFI_ADD_IO_SPACE
) (
232 IN EFI_GCD_IO_TYPE GcdIoType
,
233 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
239 Allocates nonexistent I/O, reserved I/O, or I/O resources from the global coherency
240 domain of the processor.
242 @param GcdAllocateType The type of allocate operation
243 @param GcdIoType The desired IO type
244 @param Alignment Align with 2^Alignment
245 @param Length Length to allocate
246 @param BaseAddress Base address to allocate
247 @param Imagehandle The image handle consume the allocated space.
248 @param DeviceHandle The device handle consume the allocated space.
250 @retval EFI_INVALID_PARAMETER Invalid parameter.
251 @retval EFI_NOT_FOUND No descriptor contains the desired space.
252 @retval EFI_SUCCESS IO space successfully allocated.
257 (EFIAPI
*EFI_ALLOCATE_IO_SPACE
) (
258 IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType
,
259 IN EFI_GCD_IO_TYPE GcdIoType
,
262 IN OUT EFI_PHYSICAL_ADDRESS
*BaseAddress
,
263 IN EFI_HANDLE ImageHandle
,
264 IN EFI_HANDLE DeviceHandle OPTIONAL
269 Frees nonexistent I/O, reserved I/O, or I/O resources from the global coherency
270 domain of the processor.
272 @param BaseAddress Base address of the segment.
273 @param Length Length of the segment.
275 @retval EFI_SUCCESS Space successfully freed.
280 (EFIAPI
*EFI_FREE_IO_SPACE
) (
281 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
287 Removes reserved I/O or I/O resources from the global coherency domain of the
290 @param BaseAddress Base address of the segment.
291 @param Length Length of the segment.
293 @retval EFI_SUCCESS Successfully removed a segment of IO space.
298 (EFIAPI
*EFI_REMOVE_IO_SPACE
) (
299 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
305 Retrieves the descriptor for an I/O region containing a specified address.
307 @param BaseAddress Specified start address
308 @param Descriptor Specified length
310 @retval EFI_INVALID_PARAMETER Descriptor is NULL.
311 @retval EFI_SUCCESS Successfully get the IO space descriptor.
316 (EFIAPI
*EFI_GET_IO_SPACE_DESCRIPTOR
) (
317 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
318 OUT EFI_GCD_IO_SPACE_DESCRIPTOR
*Descriptor
323 Returns a map of the I/O resources in the global coherency domain of the processor.
325 @param NumberOfDescriptors Number of descriptors.
326 @param MemorySpaceMap Descriptor array
328 @retval EFI_INVALID_PARAMETER Invalid parameter
329 @retval EFI_OUT_OF_RESOURCES No enough buffer to allocate
330 @retval EFI_SUCCESS Successfully get IO space map.
335 (EFIAPI
*EFI_GET_IO_SPACE_MAP
) (
336 OUT UINTN
*NumberOfDescriptors
,
337 OUT EFI_GCD_IO_SPACE_DESCRIPTOR
**IoSpaceMap
344 Loads and executed DXE drivers from firmware volumes.
351 (EFIAPI
*EFI_DISPATCH
) (
357 Clears the Schedule on Request (SOR) flag for a component that is stored in a firmware volume.
359 @param FirmwareVolumeHandle The handle of the firmware volume that contains the file specified by FileName.
360 @param DriverName A pointer to the name of the file in a firmware volume.
367 (EFIAPI
*EFI_SCHEDULE
) (
368 IN EFI_HANDLE FirmwareVolumeHandle
,
369 IN EFI_GUID
*DriverName
374 Promotes a file stored in a firmware volume from the untrusted to the trusted state.
376 @param FirmwareVolumeHandle The handle of the firmware volume that contains the file specified by FileName.
377 @param DriverName A pointer to the name of the file in a firmware volume.
384 (EFIAPI
*EFI_TRUST
) (
385 IN EFI_HANDLE FirmwareVolumeHandle
,
386 IN EFI_GUID
*DriverName
391 Creates a firmware volume handle for a firmware volume that is present in system memory.
393 @param FirmwareVolumeHeader A pointer to the header of the firmware volume.
394 @param Size The size, in bytes, of the firmware volume.
395 @param FirmwareVolumeHandle On output, a pointer to the created handle.
402 (EFIAPI
*EFI_PROCESS_FIRMWARE_VOLUME
) (
405 OUT EFI_HANDLE
*FirmwareVolumeHandle
410 // DXE Services Table
412 #define DXE_SERVICES_SIGNATURE 0x565245535f455844ULL
413 #define DXE_SERVICES_REVISION ((1<<16) | (00))
416 EFI_TABLE_HEADER Hdr
;
419 // Global Coherency Domain Services
421 EFI_ADD_MEMORY_SPACE AddMemorySpace
;
422 EFI_ALLOCATE_MEMORY_SPACE AllocateMemorySpace
;
423 EFI_FREE_MEMORY_SPACE FreeMemorySpace
;
424 EFI_REMOVE_MEMORY_SPACE RemoveMemorySpace
;
425 EFI_GET_MEMORY_SPACE_DESCRIPTOR GetMemorySpaceDescriptor
;
426 EFI_SET_MEMORY_SPACE_ATTRIBUTES SetMemorySpaceAttributes
;
427 EFI_GET_MEMORY_SPACE_MAP GetMemorySpaceMap
;
428 EFI_ADD_IO_SPACE AddIoSpace
;
429 EFI_ALLOCATE_IO_SPACE AllocateIoSpace
;
430 EFI_FREE_IO_SPACE FreeIoSpace
;
431 EFI_REMOVE_IO_SPACE RemoveIoSpace
;
432 EFI_GET_IO_SPACE_DESCRIPTOR GetIoSpaceDescriptor
;
433 EFI_GET_IO_SPACE_MAP GetIoSpaceMap
;
436 // Dispatcher Services
438 EFI_DISPATCH Dispatch
;
439 EFI_SCHEDULE Schedule
;
442 // Service to process a single firmware volume found in a capsule
444 EFI_PROCESS_FIRMWARE_VOLUME ProcessFirmwareVolume
;
447 typedef DXE_SERVICES EFI_DXE_SERVICES
;