3 Copyright (c) 2004 - 2007, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 Tiano intrinsic definitions in Tiano spec.
23 #ifndef _TIANO_SPEC_API_H_
24 #define _TIANO_SPEC_API_H_
27 #if ((TIANO_RELEASE_VERSION != 0) && (EFI_SPECIFICATION_VERSION < 0x00020000))
29 // Prior to UEFI 2.0 Tiano extended these enums. This was replaced by
30 // CreateEventEx() Event Groups in UEFI 2.0
32 #define EFI_EVENT_NOTIFY_SIGNAL_ALL 0x00000400
34 #define EFI_EVENT_SIGNAL_READY_TO_BOOT 0x00000203
35 #define EFI_EVENT_SIGNAL_LEGACY_BOOT 0x00000204
41 (EFIAPI
*EFI_ADD_MEMORY_SPACE
) (
42 IN EFI_GCD_MEMORY_TYPE GcdMemoryType
,
43 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
45 IN UINT64 Capabilities
51 Adds reserved memory, system memory, or memory-mapped I/O resources to the
52 global coherency domain of the processor.
56 GcdMemoryType - Memory type of the memory space.
58 BaseAddress - Base address of the memory space.
60 Length - Length of the memory space.
62 Capabilities - alterable attributes of the memory space.
66 EFI_SUCCESS - Merged this memory space into GCD map.
74 (EFIAPI
*EFI_ALLOCATE_MEMORY_SPACE
) (
75 IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType
,
76 IN EFI_GCD_MEMORY_TYPE GcdMemoryType
,
79 IN OUT EFI_PHYSICAL_ADDRESS
* BaseAddress
,
80 IN EFI_HANDLE ImageHandle
,
81 IN EFI_HANDLE DeviceHandle OPTIONAL
87 Allocates nonexistent memory, reserved memory, system memory, or memorymapped
88 I/O resources from the global coherency domain of the processor.
92 GcdAllocateType - The type of allocate operation
94 GcdMemoryType - The desired memory type
96 Alignment - Align with 2^Alignment
98 Length - Length to allocate
100 BaseAddress - Base address to allocate
102 Imagehandle - The image handle consume the allocated space.
104 DeviceHandle - The device handle consume the allocated space.
108 EFI_INVALID_PARAMETER - Invalid parameter.
110 EFI_NOT_FOUND - No descriptor contains the desired space.
112 EFI_SUCCESS - Memory space successfully allocated.
120 (EFIAPI
*EFI_FREE_MEMORY_SPACE
) (
121 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
126 Routine Description:Routine Description:
128 Frees nonexistent memory, reserved memory, system memory, or memory-mapped
129 I/O resources from the global coherency domain of the processor.
133 BaseAddress - Base address of the segment.
135 Length - Length of the segment.
139 EFI_SUCCESS - Space successfully freed.
147 (EFIAPI
*EFI_REMOVE_MEMORY_SPACE
) (
148 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
153 Routine Description:Routine Description:
155 Removes reserved memory, system memory, or memory-mapped I/O resources from
156 the global coherency domain of the processor.
160 BaseAddress - Base address of the memory space.
162 Length - Length of the memory space.
166 EFI_SUCCESS - Successfully remove a segment of memory space.
174 (EFIAPI
*EFI_GET_MEMORY_SPACE_DESCRIPTOR
) (
175 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
176 OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR
* Descriptor
182 Retrieves the descriptor for a memory region containing a specified address.
186 BaseAddress - Specified start address
188 Descriptor - Specified length
192 EFI_INVALID_PARAMETER - Invalid parameter
194 EFI_SUCCESS - Successfully get memory space descriptor.
202 (EFIAPI
*EFI_SET_MEMORY_SPACE_ATTRIBUTES
) (
203 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
211 Modifies the attributes for a memory region in the global coherency domain of the
216 BaseAddress - Specified start address
218 Length - Specified length
220 Attributes - Specified attributes
224 EFI_SUCCESS - Successfully set attribute of a segment of memory space.
232 (EFIAPI
*EFI_GET_MEMORY_SPACE_MAP
) (
233 OUT UINTN
*NumberOfDescriptors
,
234 OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR
**MemorySpaceMap
240 Returns a map of the memory resources in the global coherency domain of the
245 NumberOfDescriptors - Number of descriptors.
247 MemorySpaceMap - Descriptor array
251 EFI_INVALID_PARAMETER - Invalid parameter
253 EFI_OUT_OF_RESOURCES - No enough buffer to allocate
255 EFI_SUCCESS - Successfully get memory space map.
263 (EFIAPI
*EFI_ADD_IO_SPACE
) (
264 IN EFI_GCD_IO_TYPE GcdIoType
,
265 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
272 Adds reserved I/O or I/O resources to the global coherency domain of the processor.
276 GcdIoType - IO type of the segment.
278 BaseAddress - Base address of the segment.
280 Length - Length of the segment.
284 EFI_SUCCESS - Merged this segment into GCD map.
292 (EFIAPI
*EFI_ALLOCATE_IO_SPACE
) (
293 IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType
,
294 IN EFI_GCD_IO_TYPE GcdIoType
,
297 IN OUT EFI_PHYSICAL_ADDRESS
* BaseAddress
,
298 IN EFI_HANDLE ImageHandle
,
299 IN EFI_HANDLE DeviceHandle OPTIONAL
305 Allocates nonexistent I/O, reserved I/O, or I/O resources from the global coherency
306 domain of the processor.
310 GcdAllocateType - The type of allocate operation
312 GcdIoType - The desired IO type
314 Alignment - Align with 2^Alignment
316 Length - Length to allocate
318 BaseAddress - Base address to allocate
320 Imagehandle - The image handle consume the allocated space.
322 DeviceHandle - The device handle consume the allocated space.
326 EFI_INVALID_PARAMETER - Invalid parameter.
328 EFI_NOT_FOUND - No descriptor contains the desired space.
330 EFI_SUCCESS - IO space successfully allocated.
338 (EFIAPI
*EFI_FREE_IO_SPACE
) (
339 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
344 Routine Description:Routine Description:
346 Frees nonexistent I/O, reserved I/O, or I/O resources from the global coherency
347 domain of the processor.
351 BaseAddress - Base address of the segment.
353 Length - Length of the segment.
357 EFI_SUCCESS - Space successfully freed.
365 (EFIAPI
*EFI_REMOVE_IO_SPACE
) (
366 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
371 Routine Description:Routine Description:
373 Removes reserved I/O or I/O resources from the global coherency domain of the
378 BaseAddress - Base address of the segment.
380 Length - Length of the segment.
384 EFI_SUCCESS - Successfully removed a segment of IO space.
392 (EFIAPI
*EFI_GET_IO_SPACE_DESCRIPTOR
) (
393 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
394 OUT EFI_GCD_IO_SPACE_DESCRIPTOR
* Descriptor
400 Retrieves the descriptor for an I/O region containing a specified address.
404 BaseAddress - Specified start address
406 Descriptor - Specified length
410 EFI_INVALID_PARAMETER - Descriptor is NULL.
412 EFI_SUCCESS - Successfully get the IO space descriptor.
420 (EFIAPI
*EFI_GET_IO_SPACE_MAP
) (
421 OUT UINTN
*NumberOfDescriptors
,
422 OUT EFI_GCD_IO_SPACE_DESCRIPTOR
**IoSpaceMap
428 Returns a map of the I/O resources in the global coherency domain of the processor.
432 NumberOfDescriptors - Number of descriptors.
434 MemorySpaceMap - Descriptor array
438 EFI_INVALID_PARAMETER - Invalid parameter
440 EFI_OUT_OF_RESOURCES - No enough buffer to allocate
442 EFI_SUCCESS - Successfully get IO space map.
450 (EFIAPI
*EFI_DISPATCH
) (VOID
)
455 Loads and executed DXE drivers from firmware volumes.
471 (EFIAPI
*EFI_SCHEDULE
) (
472 IN EFI_HANDLE FirmwareVolumeHandle
,
473 IN EFI_GUID
* DriverName
479 Clears the Schedule on Request (SOR) flag for a component that is stored in a firmware volume.
483 FirmwareVolumeHandle - The handle of the firmware volume that contains the file specified by FileName.
485 DriverName - A pointer to the name of the file in a firmware volume.
497 (EFIAPI
*EFI_TRUST
) (
498 IN EFI_HANDLE FirmwareVolumeHandle
,
499 IN EFI_GUID
* DriverName
505 Promotes a file stored in a firmware volume from the untrusted to the trusted state.
509 FirmwareVolumeHandle - The handle of the firmware volume that contains the file specified by FileName.
511 DriverName - A pointer to the name of the file in a firmware volume.
523 (EFIAPI
*EFI_PROCESS_FIRMWARE_VOLUME
) (
526 OUT EFI_HANDLE
* FirmwareVolumeHandle
532 Creates a firmware volume handle for a firmware volume that is present in system memory.
536 FirmwareVolumeHeader - A pointer to the header of the firmware volume.
537 Size - The size, in bytes, of the firmware volume.
538 FirmwareVolumeHandle - On output, a pointer to the created handle.
548 // DXE Services Table
550 #define EFI_DXE_SERVICES_SIGNATURE 0x565245535f455844
551 #if (PI_SPECIFICATION_VERSION < 0x00010000)
552 #define EFI_DXE_SERVICES_REVISION ((0 << 16) | (90))
554 #define EFI_DXE_SERVICES_REVISION ((1 << 16) | (00))
558 EFI_TABLE_HEADER Hdr
;
561 // Global Coherency Domain Services
563 EFI_ADD_MEMORY_SPACE AddMemorySpace
;
564 EFI_ALLOCATE_MEMORY_SPACE AllocateMemorySpace
;
565 EFI_FREE_MEMORY_SPACE FreeMemorySpace
;
566 EFI_REMOVE_MEMORY_SPACE RemoveMemorySpace
;
567 EFI_GET_MEMORY_SPACE_DESCRIPTOR GetMemorySpaceDescriptor
;
568 EFI_SET_MEMORY_SPACE_ATTRIBUTES SetMemorySpaceAttributes
;
569 EFI_GET_MEMORY_SPACE_MAP GetMemorySpaceMap
;
570 EFI_ADD_IO_SPACE AddIoSpace
;
571 EFI_ALLOCATE_IO_SPACE AllocateIoSpace
;
572 EFI_FREE_IO_SPACE FreeIoSpace
;
573 EFI_REMOVE_IO_SPACE RemoveIoSpace
;
574 EFI_GET_IO_SPACE_DESCRIPTOR GetIoSpaceDescriptor
;
575 EFI_GET_IO_SPACE_MAP GetIoSpaceMap
;
578 // Dispatcher Services
580 EFI_DISPATCH Dispatch
;
581 EFI_SCHEDULE Schedule
;
584 // Service to process a single firmware volume found in a capsule
586 EFI_PROCESS_FIRMWARE_VOLUME ProcessFirmwareVolume
;