2007-06-08 13:31:52 +02:00
|
|
|
/** @file
|
|
|
|
Include file matches things in PI.
|
|
|
|
|
2009-05-18 11:13:49 +02:00
|
|
|
Copyright (c) 2006 - 2009, Intel Corporation
|
2007-06-08 13:31:52 +02:00
|
|
|
All rights reserved. This program and the accompanying materials
|
|
|
|
are licensed and made available under the terms and conditions of the BSD License
|
|
|
|
which accompanies this distribution. The full text of the license may be found at
|
|
|
|
http://opensource.org/licenses/bsd-license.php
|
|
|
|
|
|
|
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
|
|
|
|
@par Revision Reference:
|
2008-10-28 14:04:40 +01:00
|
|
|
PI Version 1.0
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
|
|
|
|
#ifndef __PI_DXECIS_H__
|
|
|
|
#define __PI_DXECIS_H__
|
|
|
|
|
2009-05-18 11:13:49 +02:00
|
|
|
#include <Uefi/UefiMultiPhase.h>
|
2007-06-08 13:31:52 +02:00
|
|
|
#include <Pi/PiMultiPhase.h>
|
|
|
|
|
2008-06-24 06:37:24 +02:00
|
|
|
///
|
|
|
|
/// Global Coherencey Domain types - Memory type
|
|
|
|
///
|
2007-06-08 13:31:52 +02:00
|
|
|
typedef enum {
|
2008-12-10 09:22:03 +01:00
|
|
|
///
|
|
|
|
/// A memory region that is visible to the boot processor. However, there are no system
|
|
|
|
/// components that are currently decoding this memory region.
|
|
|
|
///
|
2007-06-08 13:31:52 +02:00
|
|
|
EfiGcdMemoryTypeNonExistent,
|
2008-12-10 09:22:03 +01:00
|
|
|
///
|
|
|
|
/// A memory region that is visible to the boot processor. This memory region is being
|
|
|
|
/// decoded by a system component, but the memory region is not considered to be either
|
|
|
|
/// system memory or memory-mapped I/O.
|
|
|
|
///
|
2007-06-08 13:31:52 +02:00
|
|
|
EfiGcdMemoryTypeReserved,
|
2008-12-10 09:22:03 +01:00
|
|
|
///
|
|
|
|
/// A memory region that is visible to the boot processor. A memory controller is
|
|
|
|
/// currently decoding this memory region and the memory controller is producing a
|
|
|
|
/// tested system memory region that is available to the memory services.
|
|
|
|
///
|
2007-06-08 13:31:52 +02:00
|
|
|
EfiGcdMemoryTypeSystemMemory,
|
2008-12-10 09:22:03 +01:00
|
|
|
///
|
|
|
|
/// A memory region that is visible to the boot processor. This memory region is
|
|
|
|
/// currently being decoded by a component as memory-mapped I/O that can be used to
|
|
|
|
/// access I/O devices in the platform.
|
|
|
|
///
|
2007-06-08 13:31:52 +02:00
|
|
|
EfiGcdMemoryTypeMemoryMappedIo,
|
|
|
|
EfiGcdMemoryTypeMaximum
|
|
|
|
} EFI_GCD_MEMORY_TYPE;
|
|
|
|
|
2008-06-24 06:37:24 +02:00
|
|
|
///
|
|
|
|
/// Global Coherencey Domain types - IO type
|
|
|
|
///
|
2007-06-08 13:31:52 +02:00
|
|
|
typedef enum {
|
2008-12-10 09:22:03 +01:00
|
|
|
///
|
|
|
|
/// An I/O region that is visible to the boot processor. However, there are no system
|
|
|
|
/// components that are currently decoding this I/O region.
|
|
|
|
///
|
2007-06-08 13:31:52 +02:00
|
|
|
EfiGcdIoTypeNonExistent,
|
2008-12-10 09:22:03 +01:00
|
|
|
///
|
|
|
|
/// An I/O region that is visible to the boot processor. This I/O region is currently being
|
|
|
|
/// decoded by a system component, but the I/O region cannot be used to access I/O devices.
|
|
|
|
///
|
2007-06-08 13:31:52 +02:00
|
|
|
EfiGcdIoTypeReserved,
|
2008-12-10 09:22:03 +01:00
|
|
|
///
|
|
|
|
/// An I/O region that is visible to the boot processor. This I/O region is currently being
|
|
|
|
/// decoded by a system component that is producing I/O ports that can be used to access I/O devices.
|
|
|
|
///
|
2007-06-08 13:31:52 +02:00
|
|
|
EfiGcdIoTypeIo,
|
|
|
|
EfiGcdIoTypeMaximum
|
|
|
|
} EFI_GCD_IO_TYPE;
|
|
|
|
|
2008-06-24 06:37:24 +02:00
|
|
|
///
|
|
|
|
/// The type of allocation to perform.
|
|
|
|
///
|
2007-06-08 13:31:52 +02:00
|
|
|
typedef enum {
|
2008-12-10 09:22:03 +01:00
|
|
|
///
|
|
|
|
/// The GCD memory space map is searched from the lowest address up to the highest address
|
|
|
|
/// looking for unallocated memory ranges.
|
|
|
|
///
|
2007-06-08 13:31:52 +02:00
|
|
|
EfiGcdAllocateAnySearchBottomUp,
|
2008-12-10 09:22:03 +01:00
|
|
|
///
|
|
|
|
/// The GCD memory space map is searched from the lowest address up
|
|
|
|
/// to the specified MaxAddress looking for unallocated memory ranges.
|
|
|
|
///
|
2007-06-08 13:31:52 +02:00
|
|
|
EfiGcdAllocateMaxAddressSearchBottomUp,
|
2008-12-10 09:22:03 +01:00
|
|
|
///
|
|
|
|
/// The GCD memory space map is checked to see if the memory range starting
|
|
|
|
/// at the specified Address is available.
|
|
|
|
///
|
2007-06-08 13:31:52 +02:00
|
|
|
EfiGcdAllocateAddress,
|
2008-12-10 09:22:03 +01:00
|
|
|
///
|
|
|
|
/// The GCD memory space map is searched from the highest address down to the lowest address
|
|
|
|
/// looking for unallocated memory ranges.
|
|
|
|
///
|
2007-06-08 13:31:52 +02:00
|
|
|
EfiGcdAllocateAnySearchTopDown,
|
2008-12-10 09:22:03 +01:00
|
|
|
///
|
|
|
|
/// The GCD memory space map is searched from the specified MaxAddress
|
|
|
|
/// down to the lowest address looking for unallocated memory ranges.
|
|
|
|
///
|
2007-06-08 13:31:52 +02:00
|
|
|
EfiGcdAllocateMaxAddressSearchTopDown,
|
|
|
|
EfiGcdMaxAllocateType
|
|
|
|
} EFI_GCD_ALLOCATE_TYPE;
|
|
|
|
|
2008-06-24 06:37:24 +02:00
|
|
|
///
|
|
|
|
/// EFI_GCD_MEMORY_SPACE_DESCRIPTOR
|
|
|
|
///
|
2007-06-08 13:31:52 +02:00
|
|
|
typedef struct {
|
2008-06-24 06:37:24 +02:00
|
|
|
///
|
|
|
|
/// The physical address of the first byte in the memory region. Type
|
|
|
|
/// EFI_PHYSICAL_ADDRESS is defined in the AllocatePages() function
|
|
|
|
/// description in the UEFI 2.0 specification
|
|
|
|
///
|
2007-06-08 13:31:52 +02:00
|
|
|
EFI_PHYSICAL_ADDRESS BaseAddress;
|
2008-06-24 06:37:24 +02:00
|
|
|
|
|
|
|
///
|
|
|
|
/// The number of bytes in the memory region.
|
|
|
|
///
|
2007-06-08 13:31:52 +02:00
|
|
|
UINT64 Length;
|
2008-06-24 06:37:24 +02:00
|
|
|
|
|
|
|
///
|
|
|
|
/// The bit mask of attributes that the memory region is capable of supporting. The bit
|
|
|
|
/// mask of available attributes is defined in the GetMemoryMap() function description
|
|
|
|
/// in the UEFI 2.0 specification.
|
|
|
|
///
|
2007-06-08 13:31:52 +02:00
|
|
|
UINT64 Capabilities;
|
2008-06-24 06:37:24 +02:00
|
|
|
///
|
|
|
|
/// The bit mask of attributes that the memory region is currently using. The bit mask of
|
|
|
|
/// available attributes is defined in GetMemoryMap().
|
|
|
|
///
|
2007-06-08 13:31:52 +02:00
|
|
|
UINT64 Attributes;
|
2008-06-24 06:37:24 +02:00
|
|
|
///
|
|
|
|
/// Type of the memory region. Type EFI_GCD_MEMORY_TYPE is defined in the
|
|
|
|
/// AddMemorySpace() function description
|
|
|
|
///
|
2007-06-08 13:31:52 +02:00
|
|
|
EFI_GCD_MEMORY_TYPE GcdMemoryType;
|
2008-06-24 06:37:24 +02:00
|
|
|
|
|
|
|
///
|
|
|
|
/// The image handle of the agent that allocated the memory resource described by
|
|
|
|
/// PhysicalStart and NumberOfBytes. If this field is NULL, then the memory
|
|
|
|
/// resource is not currently allocated. Type EFI_HANDLE is defined in
|
|
|
|
/// InstallProtocolInterface() in the UEFI 2.0 specification.
|
|
|
|
///
|
2007-06-08 13:31:52 +02:00
|
|
|
EFI_HANDLE ImageHandle;
|
2008-06-24 06:37:24 +02:00
|
|
|
|
|
|
|
///
|
|
|
|
/// The device handle for which the memory resource has been allocated. If
|
|
|
|
/// ImageHandle is NULL, then the memory resource is not currently allocated. If this
|
|
|
|
/// field is NULL, then the memory resource is not associated with a device that is
|
|
|
|
/// described by a device handle. Type EFI_HANDLE is defined in
|
|
|
|
/// InstallProtocolInterface() in the UEFI 2.0 specification.
|
|
|
|
///
|
2007-06-08 13:31:52 +02:00
|
|
|
EFI_HANDLE DeviceHandle;
|
|
|
|
} EFI_GCD_MEMORY_SPACE_DESCRIPTOR;
|
|
|
|
|
2008-06-24 06:37:24 +02:00
|
|
|
///
|
|
|
|
/// EFI_GCD_IO_SPACE_DESCRIPTOR
|
|
|
|
///
|
2007-06-08 13:31:52 +02:00
|
|
|
typedef struct {
|
2008-06-24 06:37:24 +02:00
|
|
|
///
|
|
|
|
/// Physical address of the first byte in the I/O region. Type
|
|
|
|
/// EFI_PHYSICAL_ADDRESS is defined in the AllocatePages() function
|
|
|
|
/// description in the UEFI 2.0 specification.
|
|
|
|
///
|
2007-06-08 13:31:52 +02:00
|
|
|
EFI_PHYSICAL_ADDRESS BaseAddress;
|
2008-06-24 06:37:24 +02:00
|
|
|
|
2008-09-03 10:34:34 +02:00
|
|
|
///
|
2008-06-24 06:37:24 +02:00
|
|
|
/// Number of bytes in the I/O region.
|
2008-09-03 10:34:34 +02:00
|
|
|
///
|
2007-06-08 13:31:52 +02:00
|
|
|
UINT64 Length;
|
2008-06-24 06:37:24 +02:00
|
|
|
|
|
|
|
///
|
|
|
|
/// Type of the I/O region. Type EFI_GCD_IO_TYPE is defined in the
|
|
|
|
/// AddIoSpace() function description.
|
|
|
|
///
|
2007-06-08 13:31:52 +02:00
|
|
|
EFI_GCD_IO_TYPE GcdIoType;
|
2008-06-24 06:37:24 +02:00
|
|
|
|
|
|
|
///
|
|
|
|
/// The image handle of the agent that allocated the I/O resource described by
|
|
|
|
/// PhysicalStart and NumberOfBytes. If this field is NULL, then the I/O
|
|
|
|
/// resource is not currently allocated. Type EFI_HANDLE is defined in
|
|
|
|
/// InstallProtocolInterface() in the UEFI 2.0 specification.
|
|
|
|
///
|
2007-06-08 13:31:52 +02:00
|
|
|
EFI_HANDLE ImageHandle;
|
2008-06-24 06:37:24 +02:00
|
|
|
|
|
|
|
///
|
|
|
|
/// The device handle for which the I/O resource has been allocated. If ImageHandle
|
|
|
|
/// is NULL, then the I/O resource is not currently allocated. If this field is NULL, then
|
|
|
|
/// the I/O resource is not associated with a device that is described by a device handle.
|
|
|
|
/// Type EFI_HANDLE is defined in InstallProtocolInterface() in the UEFI
|
|
|
|
/// 2.0 specification.
|
|
|
|
///
|
2007-06-08 13:31:52 +02:00
|
|
|
EFI_HANDLE DeviceHandle;
|
|
|
|
} EFI_GCD_IO_SPACE_DESCRIPTOR;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
Adds reserved memory, system memory, or memory-mapped I/O resources to the
|
|
|
|
global coherency domain of the processor.
|
|
|
|
|
2008-09-03 10:34:34 +02:00
|
|
|
@param GcdMemoryType The type of memory resource being added.
|
|
|
|
@param BaseAddress The physical address that is the start address
|
|
|
|
of the memory resource being added.
|
|
|
|
@param Length The size, in bytes, of the memory resource that
|
|
|
|
is being added.
|
|
|
|
@param Capabilities The bit mask of attributes that the memory
|
|
|
|
resource region supports.
|
|
|
|
|
|
|
|
@retval EFI_SUCCESS The memory resource was added to the global
|
|
|
|
coherency domain of the processor.
|
|
|
|
@retval EFI_INVALID_PARAMETER GcdMemoryType is invalid.
|
|
|
|
@retval EFI_INVALID_PARAMETER Length is zero.
|
|
|
|
@retval EFI_OUT_OF_RESOURCES There are not enough system resources to add
|
|
|
|
the memory resource to the global coherency
|
|
|
|
domain of the processor.
|
|
|
|
@retval EFI_UNSUPPORTED The processor does not support one or more bytes
|
|
|
|
of the memory resource range specified by
|
|
|
|
BaseAddress and Length.
|
|
|
|
@retval EFI_ACCESS_DENIED One or more bytes of the memory resource range
|
|
|
|
specified by BaseAddress and Length conflicts
|
|
|
|
with a memory resource range that was previously
|
|
|
|
added to the global coherency domain of the processor.
|
|
|
|
@retval EFI_ACCESS_DENIED One or more bytes of the memory resource range
|
|
|
|
specified by BaseAddress and Length was allocated
|
|
|
|
in a prior call to AllocateMemorySpace()..
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-06-24 06:37:24 +02:00
|
|
|
(EFIAPI *EFI_ADD_MEMORY_SPACE)(
|
2007-06-08 13:31:52 +02:00
|
|
|
IN EFI_GCD_MEMORY_TYPE GcdMemoryType,
|
|
|
|
IN EFI_PHYSICAL_ADDRESS BaseAddress,
|
|
|
|
IN UINT64 Length,
|
|
|
|
IN UINT64 Capabilities
|
2008-09-04 11:37:28 +02:00
|
|
|
);
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
Allocates nonexistent memory, reserved memory, system memory, or memorymapped
|
|
|
|
I/O resources from the global coherency domain of the processor.
|
|
|
|
|
2008-09-03 10:34:34 +02:00
|
|
|
@param GcdAllocateType The type of allocation to perform.
|
|
|
|
@param GcdMemoryType The type of memory resource being allocated.
|
|
|
|
@param Alignment The log base 2 of the boundary that BaseAddress must
|
|
|
|
be aligned on output. Align with 2^Alignment.
|
|
|
|
@param Length The size in bytes of the memory resource range that
|
|
|
|
is being allocated.
|
|
|
|
@param BaseAddress A pointer to a physical address to allocate.
|
|
|
|
@param Imagehandle The image handle of the agent that is allocating
|
|
|
|
the memory resource.
|
|
|
|
@param DeviceHandle The device handle for which the memory resource
|
|
|
|
is being allocated.
|
|
|
|
|
|
|
|
@retval EFI_INVALID_PARAMETER GcdAllocateType is invalid.
|
|
|
|
@retval EFI_INVALID_PARAMETER GcdMemoryType is invalid.
|
|
|
|
@retval EFI_INVALID_PARAMETER Length is zero.
|
|
|
|
@retval EFI_INVALID_PARAMETER BaseAddress is NULL.
|
|
|
|
@retval EFI_INVALID_PARAMETER ImageHandle is NULL.
|
|
|
|
@retval EFI_NOT_FOUND The memory resource request could not be satisfied.
|
|
|
|
No descriptor contains the desired space.
|
|
|
|
@retval EFI_OUT_OF_RESOURCES There are not enough system resources to allocate the memory
|
|
|
|
resource from the global coherency domain of the processor.
|
|
|
|
@retval EFI_SUCCESS The memory resource was allocated from the global coherency
|
|
|
|
domain of the processor.
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-06-24 06:37:24 +02:00
|
|
|
(EFIAPI *EFI_ALLOCATE_MEMORY_SPACE)(
|
2007-06-08 13:31:52 +02:00
|
|
|
IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType,
|
|
|
|
IN EFI_GCD_MEMORY_TYPE GcdMemoryType,
|
|
|
|
IN UINTN Alignment,
|
|
|
|
IN UINT64 Length,
|
|
|
|
IN OUT EFI_PHYSICAL_ADDRESS *BaseAddress,
|
|
|
|
IN EFI_HANDLE ImageHandle,
|
|
|
|
IN EFI_HANDLE DeviceHandle OPTIONAL
|
2008-09-04 11:37:28 +02:00
|
|
|
);
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
Frees nonexistent memory, reserved memory, system memory, or memory-mapped
|
|
|
|
I/O resources from the global coherency domain of the processor.
|
|
|
|
|
2008-09-03 10:34:34 +02:00
|
|
|
@param BaseAddress The physical address that is the start address of the memory resource being freed.
|
|
|
|
@param Length The size in bytes of the memory resource range that is being freed.
|
2007-06-08 13:31:52 +02:00
|
|
|
|
2008-09-03 10:34:34 +02:00
|
|
|
@retval EFI_SUCCESS The memory resource was freed from the global coherency domain of
|
|
|
|
the processor.
|
|
|
|
@retval EFI_INVALID_PARAMETER Length is zero.
|
|
|
|
@retval EFI_UNSUPPORTED The processor does not support one or more bytes of the memory
|
|
|
|
resource range specified by BaseAddress and Length.
|
|
|
|
@retval EFI_NOT_FOUND The memory resource range specified by BaseAddress and
|
|
|
|
Length was not allocated with previous calls to AllocateMemorySpace().
|
|
|
|
@retval EFI_OUT_OF_RESOURCES There are not enough system resources to free the memory resource
|
|
|
|
from the global coherency domain of the processor.
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-06-24 06:37:24 +02:00
|
|
|
(EFIAPI *EFI_FREE_MEMORY_SPACE)(
|
2007-06-08 13:31:52 +02:00
|
|
|
IN EFI_PHYSICAL_ADDRESS BaseAddress,
|
|
|
|
IN UINT64 Length
|
2008-09-04 11:37:28 +02:00
|
|
|
);
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
Removes reserved memory, system memory, or memory-mapped I/O resources from
|
|
|
|
the global coherency domain of the processor.
|
|
|
|
|
2008-09-03 10:34:34 +02:00
|
|
|
@param BaseAddress The physical address that is the start address of the memory resource being removed.
|
|
|
|
@param Length The size in bytes of the memory resource that is being removed.
|
|
|
|
|
|
|
|
@retval EFI_SUCCESS The memory resource was removed from the global coherency
|
|
|
|
domain of the processor.
|
|
|
|
@retval EFI_INVALID_PARAMETER Length is zero.
|
|
|
|
@retval EFI_UNSUPPORTED The processor does not support one or more bytes of the memory
|
|
|
|
resource range specified by BaseAddress and Length.
|
|
|
|
@retval EFI_NOT_FOUND One or more bytes of the memory resource range specified by
|
|
|
|
BaseAddress and Length was not added with previous calls to
|
|
|
|
AddMemorySpace().
|
|
|
|
@retval EFI_ACCESS_DEFINED One or more bytes of the memory resource range specified by
|
|
|
|
BaseAddress and Length has been allocated with AllocateMemorySpace().
|
|
|
|
@retval EFI_OUT_OF_RESOURCES There are not enough system resources to remove the memory
|
|
|
|
resource from the global coherency domain of the processor.
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-06-24 06:37:24 +02:00
|
|
|
(EFIAPI *EFI_REMOVE_MEMORY_SPACE)(
|
2007-06-08 13:31:52 +02:00
|
|
|
IN EFI_PHYSICAL_ADDRESS BaseAddress,
|
|
|
|
IN UINT64 Length
|
2008-09-04 11:37:28 +02:00
|
|
|
);
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
Retrieves the descriptor for a memory region containing a specified address.
|
|
|
|
|
2008-09-03 10:34:34 +02:00
|
|
|
@param BaseAddress The physical address that is the start address of a memory region.
|
|
|
|
@param Descriptor A pointer to a caller allocated descriptor.
|
2007-06-08 13:31:52 +02:00
|
|
|
|
2008-09-03 10:34:34 +02:00
|
|
|
@retval EFI_SUCCESS The descriptor for the memory resource region containing
|
|
|
|
BaseAddress was returned in Descriptor.
|
|
|
|
@retval EFI_INVALID_PARAMETER Descriptor is NULL.
|
|
|
|
@retval EFI_NOT_FOUND A memory resource range containing BaseAddress was not found.
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-06-24 06:37:24 +02:00
|
|
|
(EFIAPI *EFI_GET_MEMORY_SPACE_DESCRIPTOR)(
|
2007-06-08 13:31:52 +02:00
|
|
|
IN EFI_PHYSICAL_ADDRESS BaseAddress,
|
|
|
|
OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR *Descriptor
|
2008-09-04 11:37:28 +02:00
|
|
|
);
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
Modifies the attributes for a memory region in the global coherency domain of the
|
|
|
|
processor.
|
|
|
|
|
2008-09-03 10:34:34 +02:00
|
|
|
@param BaseAddress The physical address that is the start address of a memory region.
|
|
|
|
@param Length The size in bytes of the memory region.
|
|
|
|
@param Attributes The bit mask of attributes to set for the memory region.
|
|
|
|
|
|
|
|
@retval EFI_SUCCESS The attributes were set for the memory region.
|
|
|
|
@retval EFI_INVALID_PARAMETER Length is zero.
|
|
|
|
@retval EFI_UNSUPPORTED The processor does not support one or more bytes of the memory
|
|
|
|
resource range specified by BaseAddress and Length.
|
|
|
|
@retval EFI_UNSUPPORTED The bit mask of attributes is not support for the memory resource
|
|
|
|
range specified by BaseAddress and Length.
|
|
|
|
@retval EFI_ACCESS_DEFINED The attributes for the memory resource range specified by
|
|
|
|
BaseAddress and Length cannot be modified.
|
|
|
|
@retval EFI_OUT_OF_RESOURCES There are not enough system resources to modify the attributes of
|
|
|
|
the memory resource range.
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-06-24 06:37:24 +02:00
|
|
|
(EFIAPI *EFI_SET_MEMORY_SPACE_ATTRIBUTES)(
|
2007-06-08 13:31:52 +02:00
|
|
|
IN EFI_PHYSICAL_ADDRESS BaseAddress,
|
|
|
|
IN UINT64 Length,
|
|
|
|
IN UINT64 Attributes
|
2008-09-04 11:37:28 +02:00
|
|
|
);
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns a map of the memory resources in the global coherency domain of the
|
|
|
|
processor.
|
|
|
|
|
2008-09-03 10:34:34 +02:00
|
|
|
@param NumberOfDescriptors A pointer to number of descriptors returned in the MemorySpaceMap buffer.
|
|
|
|
@param MemorySpaceMap A pointer to the array of EFI_GCD_MEMORY_SPACE_DESCRIPTORs.
|
2007-06-08 13:31:52 +02:00
|
|
|
|
2008-09-03 10:34:34 +02:00
|
|
|
@retval EFI_SUCCESS The memory space map was returned in the MemorySpaceMap
|
|
|
|
buffer, and the number of descriptors in MemorySpaceMap was
|
|
|
|
returned in NumberOfDescriptors.
|
|
|
|
@retval EFI_INVALID_PARAMETER NumberOfDescriptors is NULL.
|
|
|
|
@retval EFI_INVALID_PARAMETER MemorySpaceMap is NULL.
|
|
|
|
@retval EFI_OUT_OF_RESOURCES There are not enough resources to allocate MemorySpaceMap.
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-06-24 06:37:24 +02:00
|
|
|
(EFIAPI *EFI_GET_MEMORY_SPACE_MAP)(
|
2007-06-08 13:31:52 +02:00
|
|
|
OUT UINTN *NumberOfDescriptors,
|
|
|
|
OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR **MemorySpaceMap
|
2008-09-04 11:37:28 +02:00
|
|
|
);
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
Adds reserved I/O or I/O resources to the global coherency domain of the processor.
|
|
|
|
|
2008-09-03 10:34:34 +02:00
|
|
|
@param GcdIoType The type of I/O resource being added.
|
|
|
|
@param BaseAddress The physical address that is the start address of the I/O resource being added.
|
|
|
|
@param Length The size in bytes of the I/O resource that is being added.
|
|
|
|
|
|
|
|
@retval EFI_SUCCESS The I/O resource was added to the global coherency domain of
|
|
|
|
the processor.
|
|
|
|
@retval EFI_INVALID_PARAMETER GcdIoType is invalid.
|
|
|
|
@retval EFI_INVALID_PARAMETER Length is zero.
|
|
|
|
@retval EFI_OUT_OF_RESOURCES There are not enough system resources to add the I/O resource to
|
|
|
|
the global coherency domain of the processor.
|
|
|
|
@retval EFI_UNSUPPORTED The processor does not support one or more bytes of the I/O
|
|
|
|
resource range specified by BaseAddress and Length.
|
|
|
|
@retval EFI_ACCESS_DENIED One or more bytes of the I/O resource range specified by
|
|
|
|
BaseAddress and Length conflicts with an I/O resource
|
|
|
|
range that was previously added to the global coherency domain
|
|
|
|
of the processor.
|
|
|
|
@retval EFI_ACCESS_DENIED One or more bytes of the I/O resource range specified by
|
|
|
|
BaseAddress and Length was allocated in a prior call to
|
|
|
|
AllocateIoSpace().
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-06-24 06:37:24 +02:00
|
|
|
(EFIAPI *EFI_ADD_IO_SPACE)(
|
2007-06-08 13:31:52 +02:00
|
|
|
IN EFI_GCD_IO_TYPE GcdIoType,
|
|
|
|
IN EFI_PHYSICAL_ADDRESS BaseAddress,
|
|
|
|
IN UINT64 Length
|
2008-09-04 11:37:28 +02:00
|
|
|
);
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
Allocates nonexistent I/O, reserved I/O, or I/O resources from the global coherency
|
|
|
|
domain of the processor.
|
|
|
|
|
2008-09-03 10:34:34 +02:00
|
|
|
@param GcdAllocateType The type of allocation to perform.
|
|
|
|
@param GcdIoType The type of I/O resource being allocated.
|
|
|
|
@param Alignment The log base 2 of the boundary that BaseAddress must be aligned on output.
|
|
|
|
@param Length The size in bytes of the I/O resource range that is being allocated.
|
|
|
|
@param BaseAddress A pointer to a physical address.
|
|
|
|
@param Imagehandle The image handle of the agent that is allocating the I/O resource.
|
|
|
|
@param DeviceHandle The device handle for which the I/O resource is being allocated.
|
|
|
|
|
|
|
|
@retval EFI_SUCCESS The I/O resource was allocated from the global coherency domain
|
|
|
|
of the processor.
|
|
|
|
@retval EFI_INVALID_PARAMETER GcdAllocateType is invalid.
|
|
|
|
@retval EFI_INVALID_PARAMETER GcdIoType is invalid.
|
|
|
|
@retval EFI_INVALID_PARAMETER Length is zero.
|
|
|
|
@retval EFI_INVALID_PARAMETER BaseAddress is NULL.
|
|
|
|
@retval EFI_INVALID_PARAMETER ImageHandle is NULL.
|
|
|
|
@retval EFI_OUT_OF_RESOURCES There are not enough system resources to allocate the I/O
|
|
|
|
resource from the global coherency domain of the processor.
|
|
|
|
@retval EFI_NOT_FOUND The I/O resource request could not be satisfied.
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-06-24 06:37:24 +02:00
|
|
|
(EFIAPI *EFI_ALLOCATE_IO_SPACE)(
|
2007-06-08 13:31:52 +02:00
|
|
|
IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType,
|
|
|
|
IN EFI_GCD_IO_TYPE GcdIoType,
|
|
|
|
IN UINTN Alignment,
|
|
|
|
IN UINT64 Length,
|
|
|
|
IN OUT EFI_PHYSICAL_ADDRESS *BaseAddress,
|
|
|
|
IN EFI_HANDLE ImageHandle,
|
|
|
|
IN EFI_HANDLE DeviceHandle OPTIONAL
|
2008-09-04 11:37:28 +02:00
|
|
|
);
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
Frees nonexistent I/O, reserved I/O, or I/O resources from the global coherency
|
|
|
|
domain of the processor.
|
|
|
|
|
2008-09-03 10:34:34 +02:00
|
|
|
@param BaseAddress The physical address that is the start address of the I/O resource being freed.
|
|
|
|
@param Length The size in bytes of the I/O resource range that is being freed.
|
2007-06-08 13:31:52 +02:00
|
|
|
|
2008-09-03 10:34:34 +02:00
|
|
|
@retval EFI_SUCCESS The I/O resource was freed from the global coherency domain of the
|
|
|
|
processor.
|
|
|
|
@retval EFI_INVALID_PARAMETER Length is zero.
|
|
|
|
@retval EFI_UNSUPPORTED The processor does not support one or more bytes of the I/O resource
|
|
|
|
range specified by BaseAddress and Length.
|
|
|
|
@retval EFI_NOT_FOUND The I/O resource range specified by BaseAddress and Length
|
|
|
|
was not allocated with previous calls to AllocateIoSpace().
|
|
|
|
@retval EFI_OUT_OF_RESOURCES There are not enough system resources to free the I/O resource from
|
|
|
|
the global coherency domain of the processor.
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-06-24 06:37:24 +02:00
|
|
|
(EFIAPI *EFI_FREE_IO_SPACE)(
|
2007-06-08 13:31:52 +02:00
|
|
|
IN EFI_PHYSICAL_ADDRESS BaseAddress,
|
|
|
|
IN UINT64 Length
|
2008-09-04 11:37:28 +02:00
|
|
|
);
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
Removes reserved I/O or I/O resources from the global coherency domain of the
|
|
|
|
processor.
|
|
|
|
|
2008-09-03 10:34:34 +02:00
|
|
|
@param BaseAddress A pointer to a physical address that is the start address of the I/O resource being
|
|
|
|
removed.
|
|
|
|
@param Length The size in bytes of the I/O resource that is being removed.
|
|
|
|
|
|
|
|
@retval EFI_SUCCESS The I/O resource was removed from the global coherency domain
|
|
|
|
of the processor.
|
|
|
|
@retval EFI_INVALID_PARAMETER Length is zero.
|
|
|
|
@retval EFI_UNSUPPORTED The processor does not support one or more bytes of the I/O
|
|
|
|
resource range specified by BaseAddress and Length.
|
|
|
|
@retval EFI_NOT_FOUND One or more bytes of the I/O resource range specified by
|
|
|
|
BaseAddress and Length was not added with previous
|
|
|
|
calls to AddIoSpace().
|
|
|
|
@retval EFI_ACCESS_DENIED One or more bytes of the I/O resource range specified by
|
|
|
|
BaseAddress and Length has been allocated with
|
|
|
|
AllocateIoSpace().
|
|
|
|
@retval EFI_OUT_OF_RESOURCES There are not enough system resources to remove the I/O
|
|
|
|
resource from the global coherency domain of the processor.
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-06-24 06:37:24 +02:00
|
|
|
(EFIAPI *EFI_REMOVE_IO_SPACE)(
|
2007-06-08 13:31:52 +02:00
|
|
|
IN EFI_PHYSICAL_ADDRESS BaseAddress,
|
|
|
|
IN UINT64 Length
|
2008-09-04 11:37:28 +02:00
|
|
|
);
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
Retrieves the descriptor for an I/O region containing a specified address.
|
|
|
|
|
2008-09-03 10:34:34 +02:00
|
|
|
@param BaseAddress The physical address that is the start address of an I/O region.
|
|
|
|
@param Descriptor A pointer to a caller allocated descriptor.
|
2007-06-08 13:31:52 +02:00
|
|
|
|
2008-09-03 10:34:34 +02:00
|
|
|
@retval EFI_SUCCESS The descriptor for the I/O resource region containing
|
|
|
|
BaseAddress was returned in Descriptor.
|
2007-06-08 13:31:52 +02:00
|
|
|
@retval EFI_INVALID_PARAMETER Descriptor is NULL.
|
2008-09-03 10:34:34 +02:00
|
|
|
@retval EFI_NOT_FOUND An I/O resource range containing BaseAddress was not found.
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-06-24 06:37:24 +02:00
|
|
|
(EFIAPI *EFI_GET_IO_SPACE_DESCRIPTOR)(
|
2007-06-08 13:31:52 +02:00
|
|
|
IN EFI_PHYSICAL_ADDRESS BaseAddress,
|
|
|
|
OUT EFI_GCD_IO_SPACE_DESCRIPTOR *Descriptor
|
2008-09-04 11:37:28 +02:00
|
|
|
);
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns a map of the I/O resources in the global coherency domain of the processor.
|
|
|
|
|
2008-09-03 10:34:34 +02:00
|
|
|
@param NumberOfDescriptors A pointer to number of descriptors returned in the IoSpaceMap buffer.
|
|
|
|
@param MemorySpaceMap A pointer to the array of EFI_GCD_IO_SPACE_DESCRIPTORs.
|
|
|
|
|
|
|
|
@retval EFI_SUCCESS The I/O space map was returned in the IoSpaceMap buffer, and
|
|
|
|
the number of descriptors in IoSpaceMap was returned in
|
|
|
|
NumberOfDescriptors.
|
|
|
|
@retval EFI_INVALID_PARAMETER NumberOfDescriptors is NULL.
|
|
|
|
@retval EFI_INVALID_PARAMETER IoSpaceMap is NULL.
|
|
|
|
@retval EFI_OUT_OF_RESOURCES There are not enough resources to allocate IoSpaceMap.
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-06-24 06:37:24 +02:00
|
|
|
(EFIAPI *EFI_GET_IO_SPACE_MAP)(
|
2007-06-08 13:31:52 +02:00
|
|
|
OUT UINTN *NumberOfDescriptors,
|
|
|
|
OUT EFI_GCD_IO_SPACE_DESCRIPTOR **IoSpaceMap
|
2008-09-04 11:37:28 +02:00
|
|
|
);
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
Loads and executed DXE drivers from firmware volumes.
|
|
|
|
|
2008-09-03 10:34:34 +02:00
|
|
|
The Dispatch() function searches for DXE drivers in firmware volumes that have been
|
|
|
|
installed since the last time the Dispatch() service was called. It then evaluates
|
|
|
|
the dependency expressions of all the DXE drivers and loads and executes those DXE
|
|
|
|
drivers whose dependency expression evaluate to TRUE. This service must interact with
|
|
|
|
the Security Architectural Protocol to authenticate DXE drivers before they are executed.
|
|
|
|
This process is continued until no more DXE drivers can be executed.
|
|
|
|
|
|
|
|
@retval EFI_SUCCESS One or more DXE driver were dispatched.
|
|
|
|
@retval EFI_NOT_FOUND No DXE drivers were dispatched.
|
|
|
|
@retval EFI_ALREADY_STARTED An attempt is being made to start the DXE Dispatcher recursively.
|
|
|
|
Thus no action was taken.
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-06-24 06:37:24 +02:00
|
|
|
(EFIAPI *EFI_DISPATCH)(
|
2007-06-18 22:28:02 +02:00
|
|
|
VOID
|
2008-09-04 11:37:28 +02:00
|
|
|
);
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
Clears the Schedule on Request (SOR) flag for a component that is stored in a firmware volume.
|
|
|
|
|
|
|
|
@param FirmwareVolumeHandle The handle of the firmware volume that contains the file specified by FileName.
|
2008-09-03 10:34:34 +02:00
|
|
|
@param FileName A pointer to the name of the file in a firmware volume.
|
2007-06-08 13:31:52 +02:00
|
|
|
|
2008-09-03 10:34:34 +02:00
|
|
|
@retval EFI_SUCCESS The DXE driver was found and its SOR bit was cleared.
|
|
|
|
@retval EFI_NOT_FOUND The DXE driver does not exist, or the DXE driver exists and its SOR
|
|
|
|
bit is not set.
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-06-24 06:37:24 +02:00
|
|
|
(EFIAPI *EFI_SCHEDULE)(
|
2007-06-08 13:31:52 +02:00
|
|
|
IN EFI_HANDLE FirmwareVolumeHandle,
|
2008-09-03 10:34:34 +02:00
|
|
|
IN CONST EFI_GUID *FileName
|
2008-09-04 11:37:28 +02:00
|
|
|
);
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
Promotes a file stored in a firmware volume from the untrusted to the trusted state.
|
|
|
|
|
|
|
|
@param FirmwareVolumeHandle The handle of the firmware volume that contains the file specified by FileName.
|
|
|
|
@param DriverName A pointer to the name of the file in a firmware volume.
|
|
|
|
|
2008-07-16 08:31:22 +02:00
|
|
|
@return Status of promoting FFS from untrusted to trusted
|
|
|
|
state.
|
2008-09-03 10:34:34 +02:00
|
|
|
@retval EFI_NOT_FOUND The file was not found in the untrusted state.
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-06-24 06:37:24 +02:00
|
|
|
(EFIAPI *EFI_TRUST)(
|
2007-06-08 13:31:52 +02:00
|
|
|
IN EFI_HANDLE FirmwareVolumeHandle,
|
2008-09-03 10:34:34 +02:00
|
|
|
IN CONST EFI_GUID *FileName
|
2008-09-04 11:37:28 +02:00
|
|
|
);
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
Creates a firmware volume handle for a firmware volume that is present in system memory.
|
|
|
|
|
|
|
|
@param FirmwareVolumeHeader A pointer to the header of the firmware volume.
|
|
|
|
@param Size The size, in bytes, of the firmware volume.
|
|
|
|
@param FirmwareVolumeHandle On output, a pointer to the created handle.
|
|
|
|
|
2008-09-03 10:34:34 +02:00
|
|
|
@retval EFI_SUCCESS The EFI_FIRMWARE_VOLUME_PROTOCOL and
|
|
|
|
EFI_DEVICE_PATH_PROTOCOL were installed onto
|
|
|
|
FirmwareVolumeHandle for the firmware volume described
|
|
|
|
by FirmwareVolumeHeader and Size.
|
|
|
|
@retval EFI_VOLUME_CORRUPTED The firmware volume described by FirmwareVolumeHeader
|
|
|
|
and Size is corrupted.
|
|
|
|
@retval EFI_OUT_OF_RESOURCES There are not enough system resources available to produce the
|
|
|
|
EFI_FIRMWARE_VOLUME_PROTOCOL and EFI_DEVICE_PATH_PROTOCOL
|
|
|
|
for the firmware volume described by FirmwareVolumeHeader and Size.
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-06-24 06:37:24 +02:00
|
|
|
(EFIAPI *EFI_PROCESS_FIRMWARE_VOLUME)(
|
2008-09-03 10:34:34 +02:00
|
|
|
IN CONST VOID *FirmwareVolumeHeader,
|
2007-06-08 13:31:52 +02:00
|
|
|
IN UINTN Size,
|
|
|
|
OUT EFI_HANDLE *FirmwareVolumeHandle
|
2008-09-04 11:37:28 +02:00
|
|
|
);
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
//
|
|
|
|
// DXE Services Table
|
|
|
|
//
|
2007-08-27 05:02:57 +02:00
|
|
|
#define DXE_SERVICES_SIGNATURE 0x565245535f455844ULL
|
2009-12-04 04:10:28 +01:00
|
|
|
#define DXE_SERVICES_REVISION ((1<<16) | (20))
|
2007-06-08 13:31:52 +02:00
|
|
|
|
|
|
|
typedef struct {
|
2008-12-10 09:22:03 +01:00
|
|
|
///
|
|
|
|
/// The table header for the DXE Services Table.
|
|
|
|
/// This header contains the DXE_SERVICES_SIGNATURE and DXE_SERVICES_REVISION values.
|
|
|
|
///
|
2007-06-08 13:31:52 +02:00
|
|
|
EFI_TABLE_HEADER Hdr;
|
|
|
|
|
|
|
|
//
|
|
|
|
// Global Coherency Domain Services
|
|
|
|
//
|
|
|
|
EFI_ADD_MEMORY_SPACE AddMemorySpace;
|
|
|
|
EFI_ALLOCATE_MEMORY_SPACE AllocateMemorySpace;
|
|
|
|
EFI_FREE_MEMORY_SPACE FreeMemorySpace;
|
|
|
|
EFI_REMOVE_MEMORY_SPACE RemoveMemorySpace;
|
|
|
|
EFI_GET_MEMORY_SPACE_DESCRIPTOR GetMemorySpaceDescriptor;
|
|
|
|
EFI_SET_MEMORY_SPACE_ATTRIBUTES SetMemorySpaceAttributes;
|
|
|
|
EFI_GET_MEMORY_SPACE_MAP GetMemorySpaceMap;
|
|
|
|
EFI_ADD_IO_SPACE AddIoSpace;
|
|
|
|
EFI_ALLOCATE_IO_SPACE AllocateIoSpace;
|
|
|
|
EFI_FREE_IO_SPACE FreeIoSpace;
|
|
|
|
EFI_REMOVE_IO_SPACE RemoveIoSpace;
|
|
|
|
EFI_GET_IO_SPACE_DESCRIPTOR GetIoSpaceDescriptor;
|
|
|
|
EFI_GET_IO_SPACE_MAP GetIoSpaceMap;
|
|
|
|
|
|
|
|
//
|
|
|
|
// Dispatcher Services
|
|
|
|
//
|
|
|
|
EFI_DISPATCH Dispatch;
|
|
|
|
EFI_SCHEDULE Schedule;
|
|
|
|
EFI_TRUST Trust;
|
|
|
|
//
|
|
|
|
// Service to process a single firmware volume found in a capsule
|
|
|
|
//
|
|
|
|
EFI_PROCESS_FIRMWARE_VOLUME ProcessFirmwareVolume;
|
|
|
|
} DXE_SERVICES;
|
|
|
|
|
|
|
|
typedef DXE_SERVICES EFI_DXE_SERVICES;
|
|
|
|
|
2009-11-24 00:16:04 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
Function prototype for invoking a function on an Application Processor.
|
|
|
|
|
|
|
|
This definition is used by the UEFI MP Serices Protocol, and the
|
|
|
|
PI SMM System Table.
|
|
|
|
|
|
|
|
@param[in,out] Buffer Pointer to private data buffer.
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
VOID
|
|
|
|
(EFIAPI *EFI_AP_PROCEDURE)(
|
|
|
|
IN OUT VOID *Buffer
|
|
|
|
);
|
|
|
|
|
2007-06-08 13:31:52 +02:00
|
|
|
#endif
|