MdePkg[all]
1.08
|
Data Structures | |
struct | _EFI_PEI_TEMPORARY_RAM_DONE_PPI |
Macros | |
#define | EFI_PEI_TEMPORARY_RAM_DONE_PPI_GUID { 0xceab683c, 0xec56, 0x4a2d, { 0xa9, 0x6, 0x40, 0x53, 0xfa, 0x4e, 0x9c, 0x16 } } |
Typedefs | |
typedef struct _EFI_PEI_TEMPORARY_RAM_DONE_PPI | EFI_PEI_TEMPORARY_RAM_DONE_PPI |
Functions | |
typedef | EFI_STATUS (EFIAPI *EFI_PEI_TEMPORARY_RAM_DONE)(VOID) |
Variables | |
EFI_GUID | gEfiTemporaryRamDonePpiGuid |
This file declares Temporary RAM Done PPI. The PPI that provides a service to disable the use of Temporary RAM.
Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
#define EFI_PEI_TEMPORARY_RAM_DONE_PPI_GUID { 0xceab683c, 0xec56, 0x4a2d, { 0xa9, 0x6, 0x40, 0x53, 0xfa, 0x4e, 0x9c, 0x16 } } |
typedef struct _EFI_PEI_TEMPORARY_RAM_DONE_PPI EFI_PEI_TEMPORARY_RAM_DONE_PPI |
This is an optional PPI that may be produced by SEC or a PEIM. If present, it provide a service to disable the use of Temporary RAM. This service may only be called by the PEI Foundation after the transition from Temporary RAM to Permanent RAM is complete. This PPI provides an alternative to the Temporary RAM Migration PPI for system architectures that allow Temporary RAM and Permanent RAM to be enabled and accessed at the same time with no side effects.
typedef EFI_STATUS | ( | EFIAPI * | EFI_HII_CREATE_POPUP | ) |
TemporaryRamDone() disables the use of Temporary RAM. If present, this service is invoked by the PEI Foundation after the EFI_PEI_PERMANENT_MEMORY_INSTALLED_PPI is installed.
EFI_SUCCESS | Use of Temporary RAM was disabled. |
EFI_INVALID_PARAMETER | Temporary RAM could not be disabled. |
Frees memory pages.
[in] | PeiServices | An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation. |
[in] | Memory | The base physical address of the pages to be freed. |
[in] | Pages | The number of contiguous 4 KB pages to free. |
EFI_SUCCESS | The requested pages were freed. |
EFI_INVALID_PARAMETER | Memory is not a page-aligned address or Pages is invalid. |
EFI_NOT_FOUND | The requested memory pages were not allocated with AllocatePages(). |
Modifies the capabilities for a memory region in the global coherency domain of the processor.
BaseAddress | The physical address that is the start address of a memory region. |
Length | The size in bytes of the memory region. |
Capabilities | The bit mask of capabilities that the memory region supports. |
EFI_SUCCESS | The capabilities were set for the memory region. |
EFI_INVALID_PARAMETER | Length is zero. |
EFI_UNSUPPORTED | The capabilities specified by Capabilities do not include the memory region attributes currently in use. |
EFI_ACCESS_DENIED | The capabilities for the memory resource range specified by BaseAddress and Length cannot be modified. |
EFI_OUT_OF_RESOURCES | There are not enough system resources to modify the capabilities of the memory resource range. |
Return a pointer to a buffer containing zero or more HOBs that will be installed into the PEI HOB List.
This function returns a pointer to a pointer to zero or more HOBs, terminated with a HOB of type EFI_HOB_TYPE_END_OF_HOB_LIST. Note: The HobList must not contain a EFI_HOB_HANDOFF_INFO_TABLE HOB (PHIT) HOB.
[in] | This | Pointer to this PPI structure. |
[out] | HobList | A pointer to a returned pointer to zero or more HOBs. If no HOBs are to be returned, then the returned pointer is a pointer to a HOB of type EFI_HOB_TYPE_END_OF_HOB_LIST. |
EFI_SUCCESS | This function completed successfully. |
EFI_NOT_FOUND | No HOBS are available. |
Retrieve additional information associated with a PCD token in the default token space.
This includes information such as the type of value the TokenNumber is associated with as well as possible human readable name that is associated with the token.
[in] | TokenNumber | The PCD token number. |
[out] | PcdInfo | The returned information associated with the requested TokenNumber. |
EFI_SUCCESS | The PCD information was returned successfully |
EFI_NOT_FOUND | The PCD service could not find the requested token number. |
Retrieve additional information associated with a PCD token.
This includes information such as the type of value the TokenNumber is associated with as well as possible human readable name that is associated with the token.
[in] | Guid | The 128-bit unique value that designates the namespace from which to extract the value. |
[in] | TokenNumber | The PCD token number. |
[out] | PcdInfo | The returned information associated with the requested TokenNumber. |
EFI_SUCCESS | The PCD information was returned successfully |
EFI_NOT_FOUND | The PCD service could not find the requested token number. |
Open I/O aperture.
This function opens an I/O aperture in a ISA Host Controller for the I/O addresses specified by IoAddress to IoAddress + IoLength - 1. It is possible that more than one caller may be assigned to the same aperture. It may be possible that a single hardware aperture may be used for more than one device. This function tracks the number of times that each aperture is referenced, and does not close the hardware aperture (via CloseIoAperture()) until there are no more references to it.
This | A pointer to this instance of the EFI_ISA_HC_PPI. |
IoAddress | An unsigned integer that specifies the first byte of the I/O space required. |
IoLength | An unsigned integer that specifies the number of bytes of the I/O space required. |
IoApertureHandle | A pointer to the returned I/O aperture handle. This value can be used on subsequent calls to CloseIoAperture(). |
EFI_SUCCESS | The I/O aperture was opened successfully. |
EFI_UNSUPPORTED | The ISA Host Controller is a subtractive-decode controller. |
EFI_OUT_OF_RESOURCES | There is no available I/O aperture. |
Close I/O aperture.
This function closes a previously opened I/O aperture handle. If there are no more I/O aperture handles that refer to the hardware I/O aperture resource, then the hardware I/O aperture is closed. It may be possible that a single hardware aperture may be used for more than one device. This function tracks the number of times that each aperture is referenced, and does not close the hardware aperture (via CloseIoAperture()) until there are no more references to it.
This | A pointer to this instance of the EFI_ISA_HC_PPI. |
IoApertureHandle | The I/O aperture handle previously returned from a call to OpenIoAperture(). |
EFI_SUCCESS | The I/O aperture was closed successfully. |
Invokes PPI activation from the PI PEI environment.
PeiServices | An indirect pointer to the PEI Services Table published by the PEI Foundation. |
This | The PEI_MM_CONTROL_PPI instance. |
ArgumentBuffer | The value passed to the MMI handler. This value corresponds to the SwMmiInputValue in the RegisterContext parameter for the Register() function in the EFI_MM_SW_DISPATCH_PROTOCOL and in the Context parameter in the call to the DispatchFunction |
ArgumentBufferSize | The size of the data passed in ArgumentBuffer or NULL if ArgumentBuffer is NULL. |
Periodic | An optional mechanism to periodically repeat activation. |
ActivationInterval | An optional parameter to repeat at this period one time or, if the Periodic Boolean is set, periodically. |
EFI_SUCCESS | The MMI has been engendered. |
EFI_DEVICE_ERROR | The timing is unsupported. |
EFI_INVALID_PARAMETER | The activation period is unsupported. |
EFI_NOT_STARTED | The MM base service has not been initialized. |
Clears any system state that was created in response to the Trigger() call.
PeiServices | General purpose services available to every PEIM. |
This | The PEI_MM_CONTROL_PPI instance. |
Periodic | Optional parameter to repeat at this period one time or, if the Periodic Boolean is set, periodically. |
EFI_SUCCESS | The MMI has been engendered. |
EFI_DEVICE_ERROR | The source could not be cleared. |
EFI_INVALID_PARAMETER | The service did not support the Periodic input argument. |
Get the number of CPU's.
[in] | PeiServices | An indirect pointer to the PEI Services Table published by the PEI Foundation. |
[in] | This | Pointer to this instance of the PPI. |
[out] | NumberOfProcessors | Pointer to the total number of logical processors in the system, including the BSP and disabled APs. |
[out] | NumberOfEnabledProcessors | Number of processors in the system that are enabled. |
EFI_SUCCESS | The number of logical processors and enabled logical processors was retrieved. |
EFI_DEVICE_ERROR | The calling processor is an AP. |
EFI_INVALID_PARAMETER | NumberOfProcessors is NULL. NumberOfEnabledProcessors is NULL. |
Get information on a specific CPU.
[in] | PeiServices | An indirect pointer to the PEI Services Table published by the PEI Foundation. |
[in] | This | Pointer to this instance of the PPI. |
[in] | ProcessorNumber | Pointer to the total number of logical processors in the system, including the BSP and disabled APs. |
[out] | ProcessorInfoBuffer | Number of processors in the system that are enabled. |
EFI_SUCCESS | Processor information was returned. |
EFI_DEVICE_ERROR | The calling processor is an AP. |
EFI_INVALID_PARAMETER | ProcessorInfoBuffer is NULL. |
EFI_NOT_FOUND | The processor with the handle specified by ProcessorNumber does not exist in the platform. |
Activate all of the application processors.
[in] | PeiServices | An indirect pointer to the PEI Services Table published by the PEI Foundation. |
[in] | This | A pointer to the EFI_PEI_MP_SERVICES_PPI instance. |
[in] | Procedure | A pointer to the function to be run on enabled APs of the system. |
[in] | SingleThread | If TRUE, then all the enabled APs execute the function specified by Procedure one by one, in ascending order of processor handle number. If FALSE, then all the enabled APs execute the function specified by Procedure simultaneously. |
[in] | TimeoutInMicroSeconds | Indicates the time limit in microseconds for APs to return from Procedure, for blocking mode only. Zero means infinity. If the timeout expires before all APs return from Procedure, then Procedure on the failed APs is terminated. All enabled APs are available for next function assigned by EFI_PEI_MP_SERVICES_PPI.StartupAllAPs() or EFI_PEI_MP_SERVICES_PPI.StartupThisAP(). If the timeout expires in blocking mode, BSP returns EFI_TIMEOUT. |
[in] | ProcedureArgument | The parameter passed into Procedure for all APs. |
EFI_SUCCESS | In blocking mode, all APs have finished before the timeout expired. |
EFI_DEVICE_ERROR | Caller processor is AP. |
EFI_NOT_STARTED | No enabled APs exist in the system. |
EFI_NOT_READY | Any enabled APs are busy. |
EFI_TIMEOUT | In blocking mode, the timeout expired before all enabled APs have finished. |
EFI_INVALID_PARAMETER | Procedure is NULL. |
Activate a specific application processor.
[in] | PeiServices | An indirect pointer to the PEI Services Table published by the PEI Foundation. |
[in] | This | A pointer to the EFI_PEI_MP_SERVICES_PPI instance. |
[in] | Procedure | A pointer to the function to be run on enabled APs of the system. |
[in] | ProcessorNumber | The handle number of the AP. The range is from 0 to the total number of logical processors minus 1. The total number of logical processors can be retrieved by EFI_PEI_MP_SERVICES_PPI.GetNumberOfProcessors(). |
[in] | TimeoutInMicroSeconds | Indicates the time limit in microseconds for APs to return from Procedure, for blocking mode only. Zero means infinity. If the timeout expires before all APs return from Procedure, then Procedure on the failed APs is terminated. All enabled APs are available for next function assigned by EFI_PEI_MP_SERVICES_PPI.StartupAllAPs() or EFI_PEI_MP_SERVICES_PPI.StartupThisAP(). If the timeout expires in blocking mode, BSP returns EFI_TIMEOUT. |
[in] | ProcedureArgument | The parameter passed into Procedure for all APs. |
EFI_SUCCESS | In blocking mode, specified AP finished before the timeout expires. |
EFI_DEVICE_ERROR | The calling processor is an AP. |
EFI_TIMEOUT | In blocking mode, the timeout expired before the specified AP has finished. |
EFI_NOT_FOUND | The processor with the handle specified by ProcessorNumber does not exist. |
EFI_INVALID_PARAMETER | ProcessorNumber specifies the BSP or disabled AP. |
EFI_INVALID_PARAMETER | Procedure is NULL. |
Switch the boot strap processor.
[in] | PeiServices | An indirect pointer to the PEI Services Table published by the PEI Foundation. |
[in] | This | A pointer to the EFI_PEI_MP_SERVICES_PPI instance. |
[in] | ProcessorNumber | The handle number of the AP. The range is from 0 to the total number of logical processors minus 1. The total number of logical processors can be retrieved by EFI_PEI_MP_SERVICES_PPI.GetNumberOfProcessors(). |
[in] | EnableOldBSP | If TRUE, then the old BSP will be listed as an enabled AP. Otherwise, it will be disabled. |
EFI_SUCCESS | BSP successfully switched. |
EFI_UNSUPPORTED | Switching the BSP cannot be completed prior to this service returning. |
EFI_UNSUPPORTED | Switching the BSP is not supported. |
EFI_DEVICE_ERROR | The calling processor is an AP. |
EFI_NOT_FOUND | The processor with the handle specified by ProcessorNumber does not exist. |
EFI_INVALID_PARAMETER | ProcessorNumber specifies the current BSP or a disabled AP. |
EFI_NOT_READY | The specified AP is busy. |
Enable or disable an application processor.
[in] | PeiServices | An indirect pointer to the PEI Services Table published by the PEI Foundation. |
[in] | This | A pointer to the EFI_PEI_MP_SERVICES_PPI instance. |
[in] | ProcessorNumber | The handle number of the AP. The range is from 0 to the total number of logical processors minus 1. The total number of logical processors can be retrieved by EFI_PEI_MP_SERVICES_PPI.GetNumberOfProcessors(). |
[in] | EnableAP | Specifies the new state for the processor for enabled, FALSE for disabled. |
[in] | HealthFlag | If not NULL, a pointer to a value that specifies the new health status of the AP. This flag corresponds to StatusFlag defined in EFI_PEI_MP_SERVICES_PPI.GetProcessorInfo(). Only the PROCESSOR_HEALTH_STATUS_BIT is used. All other bits are ignored. If it is NULL, this parameter is ignored. |
EFI_SUCCESS | The specified AP was enabled or disabled successfully. |
EFI_UNSUPPORTED | Enabling or disabling an AP cannot be completed prior to this service returning. |
EFI_UNSUPPORTED | Enabling or disabling an AP is not supported. |
EFI_DEVICE_ERROR | The calling processor is an AP. |
EFI_NOT_FOUND | Processor with the handle specified by ProcessorNumber does not exist. |
EFI_INVALID_PARAMETER | ProcessorNumber specifies the BSP. |
Identify the currently executing processor.
[in] | PeiServices | An indirect pointer to the PEI Services Table published by the PEI Foundation. |
[in] | This | A pointer to the EFI_PEI_MP_SERVICES_PPI instance. |
[out] | ProcessorNumber | The handle number of the AP. The range is from 0 to the total number of logical processors minus 1. The total number of logical processors can be retrieved by EFI_PEI_MP_SERVICES_PPI.GetNumberOfProcessors(). |
EFI_SUCCESS | The current processor handle number was returned in ProcessorNumber. |
EFI_INVALID_PARAMETER | ProcessorNumber is NULL. |
Retrieve additional information associated with a PCD token.
This includes information such as the type of value the TokenNumber is associated with as well as possible human readable name that is associated with the token.
[in] | Guid | The 128-bit unique value that designates the namespace from which to extract the value. |
[in] | TokenNumber | The PCD token number. |
[out] | PcdInfo | The returned information associated with the requested TokenNumber. |
EFI_SUCCESS | The PCD information was returned successfully |
EFI_NOT_FOUND | The PCD service could not find the requested token number. |
This function registers the MM Foundation entry point with the processor code. This entry point will be invoked by the MM Processor entry code as defined in PI specification.
[in] | This | The EFI_PEI_MM_CONFIGURATION_PPI instance. |
[in] | MmEntryPoint | MM Foundation entry point. |
EFI_SUCCESS | The entry-point was successfully registered. |
Set the frequency for the I2C clock line.
This | Pointer to an EFI_PEI_I2C_MASTER_PPI structure. |
BusClockHertz | Pointer to the requested I2C bus clock frequency in Hertz. Upon return this value contains the actual frequency in use by the I2C controller. |
EFI_SUCCESS | The bus frequency was set successfully. |
EFI_INVALID_PARAMETER | BusClockHertz is NULL |
EFI_UNSUPPORTED | The controller does not support this frequency. |
Reset the I2C controller and configure it for use.
This | Pointer to an EFI_PEI_I2C_MASTER_PPI structure. |
EFI_SUCCESS | The reset completed successfully. |
EFI_DEVICE_ERROR | The reset operation failed. |
Start an I2C transaction on the host controller.
This | Pointer to an EFI_PEI_I2C_MASTER_PPI structure. |
SlaveAddress | Address of the device on the I2C bus. Set the I2C_ADDRESSING_10_BIT when using 10-bit addresses, clear this bit for 7-bit addressing. Bits 0-6 are used for 7-bit I2C slave addresses and bits 0-9 are used for 10-bit I2C slave addresses. |
RequestPacket | Pointer to an EFI_I2C_REQUEST_PACKET structure describing the I2C transaction. |
EFI_SUCCESS | The transaction completed successfully. |
EFI_BAD_BUFFER_SIZE | The RequestPacket->LengthInBytes value is too large. |
EFI_DEVICE_ERROR | There was an I2C error (NACK) during the transaction. |
EFI_INVALID_PARAMETER | RequestPacket is NULL |
EFI_NO_RESPONSE | The I2C device is not responding to the slave address. EFI_DEVICE_ERROR will be returned if the controller cannot distinguish when the NACK occurred. |
EFI_NOT_FOUND | Reserved bit set in the SlaveAddress parameter |
EFI_OUT_OF_RESOURCES | Insufficient memory for I2C transaction |
EFI_UNSUPPORTED | The controller does not support the requested transaction. |
Callback function that is invoked when the HTTP Boot driver is about to transmit or has received a packet.
This function is invoked when the HTTP Boot driver is about to transmit or has received packet. Parameters DataType and Received specify the type of event and the format of the buffer pointed to by Data. Due to the polling nature of UEFI device drivers, this callback function should not execute for more than 5 ms. The returned status code determines the behavior of the HTTP Boot driver.
[in] | This | Pointer to the EFI_HTTP_BOOT_CALLBACK_PROTOCOL instance. |
[in] | DataType | The event that occurs in the current state. |
[in] | Received | TRUE if the callback is being invoked due to a receive event. FALSE if the callback is being invoked due to a transmit event. |
[in] | DataLength | The length in bytes of the buffer pointed to by Data. |
[in] | Data | A pointer to the buffer of data, the data type is specified by DataType. |
EFI_SUCCESS | Tells the HTTP Boot driver to continue the HTTP Boot process. |
EFI_ABORTED | Tells the HTTP Boot driver to abort the current HTTP Boot process. |
Enable access to an I2C bus configuration.
This routine must be called at or below TPL_NOTIFY. For synchronous requests this routine must be called at or below TPL_CALLBACK.
Reconfigure the switches and multiplexers in the I2C bus to enable access to a specific I2C bus configuration. Also select the maximum clock frequency for this I2C bus configuration.
This routine uses the I2C Master protocol to perform I2C transactions on the local bus. This eliminates any recursion in the I2C stack for configuration transactions on the same I2C bus. This works because the local I2C bus is idle while the I2C bus configuration is being enabled.
If I2C transactions must be performed on other I2C busses, then the EFI_I2C_HOST_PROTOCOL, the EFI_I2C_IO_PROTCOL, or a third party I2C driver interface for a specific device must be used. This requirement is because the I2C host protocol controls the flow of requests to the I2C controller. Use the EFI_I2C_HOST_PROTOCOL when the I2C device is not enumerated by the EFI_I2C_ENUMERATE_PROTOCOL. Use a protocol produced by a third party driver when it is available or the EFI_I2C_IO_PROTOCOL when the third party driver is not available but the device is enumerated with the EFI_I2C_ENUMERATE_PROTOCOL.
When Event is NULL, EnableI2cBusConfiguration operates synchronously and returns the I2C completion status as its return value.
[in] | This | Pointer to an EFI_I2C_BUS_CONFIGURATION_MANAGEMENT_PROTOCOL structure. |
[in] | I2cBusConfiguration | Index of an I2C bus configuration. All values in the range of zero to N-1 are valid where N is the total number of I2C bus configurations for an I2C bus. |
[in] | Event | Event to signal when the transaction is complete |
[out] | I2cStatus | Buffer to receive the transaction status. |
EFI_SUCCESS | The asynchronous bus configuration request was successfully started when Event is not NULL. |
EFI_SUCCESS | The bus configuration request completed successfully when Event is NULL. |
EFI_DEVICE_ERROR | The bus configuration failed. |
EFI_NO_MAPPING | Invalid I2cBusConfiguration value |
This function retrieves the context driver.
The GetContextfunction returns the context of the protocol, the application identifiers supported by the protocol and the number and the CSN unique identifier of Smart Cards that are present and supported by protocol.
If AidTableSize, AidTable, CsnTableSize, CsnTable or VersionProtocol is NULL, the function does not fail but does not fill in such variables.
In case AidTableSize indicates a buffer too small to hold all the protocol AID table, only the first AidTableSize items of the table are returned in AidTable.
In case CsnTableSize indicates a buffer too small to hold the entire table of Smart Card CSN present, only the first CsnTableSize items of the table are returned in CsnTable.
VersionScEdgeProtocol returns the version of the EFI_SMART_CARD_EDGE_PROTOCOL this driver uses. For this protocol specification value is SMART_CARD_EDGE_PROTOCOL_VERSION_1.
In case of Smart Card removal the internal CSN list is immediately updated, even if a connection is opened with that Smart Card.
[in] | This | Indicates a pointer to the calling context. |
[out] | NumberAidSupported | Number of AIDs this protocol supports. |
[in,out] | AidTableSize | On input, number of items allocated for the AID table. On output, number of items returned by protocol. |
[out] | AidTable | Table of the AIDs supported by the protocol. |
[out] | NumberSCPresent | Number of currently present Smart Cards that are supported by protocol. |
[in,out] | CsnTableSize | On input, the number of items the buffer CSN table can contain. On output, the number of items returned by the protocol. |
[out] | CsnTable | Table of the CSN of the Smart Card present and supported by protocol. |
[out] | VersionScEdgeProtocol | EFI_SMART_CARD_EDGE_PROTOCOL version. |
EFI_SUCCESS | The requested command completed successfully. |
EFI_INVALID_PARAMETER | This is NULL. |
EFI_INVALID_PARAMETER | NumberSCPresent is NULL. |
This function establish a connection with a Smart Card the protocol support.
In case of success the SCardHandle can be used.
If the ScardCsn is NULL the connection is established with the first Smart Card the protocol finds in its table of Smart Card present and supported. Else it establish context with the Smart Card whose CSN given by ScardCsn.
If ScardAid is not NULL the function returns the Smart Card AID the protocol supports. After a successful connect the SCardHandle will remain existing even in case Smart Card removed from Smart Card reader, but all function invoking this SCardHandle will fail. SCardHandle is released only on Disconnect.
[in] | This | Indicates a pointer to the calling context. |
[out] | SCardHandle | Handle on Smart Card connection. |
[in] | ScardCsn | CSN of the Smart Card the connection has to be established. |
[out] | ScardAid | AID of the Smart Card the connection has been established. |
EFI_SUCCESS | The requested command completed successfully. |
EFI_INVALID_PARAMETER | This is NULL. |
EFI_INVALID_PARAMETER | SCardHandle is NULL. |
EFI_NO_MEDIA | No Smart Card supported by protocol is present, Smart Card with CSN ScardCsn or Reader has been removed. A Disconnect should be performed. |
This function releases a connection previously established by Connect.
The Disconnect function releases the connection previously established by a Connect. In case the Smart Card or the Smart Card reader has been removed before this call, this function returns EFI_SUCCESS.
[in] | This | Indicates a pointer to the calling context. |
[in] | SCardHandle | Handle on Smart Card connection to release. |
EFI_SUCCESS | The requested command completed successfully. |
EFI_INVALID_PARAMETER | This is NULL. |
EFI_INVALID_PARAMETER | No connection for SCardHandle value. |
This function returns the Smart Card serial number.
[in] | This | Indicates a pointer to the calling context. |
[in] | SCardHandle | Handle on Smart Card connection. |
[out] | Csn | The Card Serial number, 16 bytes array. |
EFI_SUCCESS | The requested command completed successfully. |
EFI_INVALID_PARAMETER | This is NULL. |
EFI_INVALID_PARAMETER | No connection for SCardHandle value. |
EFI_NO_MEDIA | Smart Card or Reader of SCardHandle connection has been removed. A Disconnect should be performed. |
This function returns the name of the Smart Card reader used for this connection.
[in] | This | Indicates a pointer to the calling context. |
[in] | SCardHandle | Handle on Smart Card connection. |
[in,out] | ReaderNameLength | On input, a pointer to the variable that holds the maximal size, in bytes, of ReaderName. On output, the required size, in bytes, for ReaderName. |
[out] | ReaderName | A pointer to a NULL terminated string that will contain the reader name. |
EFI_SUCCESS | The requested command completed successfully. |
EFI_INVALID_PARAMETER | This is NULL. |
EFI_INVALID_PARAMETER | No connection for SCardHandle value. |
EFI_INVALID_PARAMETER | ReaderNameLength is NULL. |
EFI_NO_MEDIA | Smart Card or Reader of SCardHandle connection has been removed. A Disconnect should be performed. |
This function authenticates a Smart Card user by presenting a PIN code.
The VerifyPinfunction presents a PIN code to the Smart Card.
If Smart Card found the PIN code correct the user is considered authenticated to current application, and the function returns TRUE.
Negative or null PinSize value rejected if PinCodeis not NULL.
A NULL PinCodebuffer means the application didn't know the PIN, in that case:
In PinCode buffer, the PIN value is always given in plaintext, in case of secure messaging the SMART_CARD_EDGE_PROTOCOL will be in charge of all intermediate treatments to build the correct Smart Card APDU.
[in] | This | Indicates a pointer to the calling context. |
[in] | SCardHandle | Handle on Smart Card connection. |
[in] | PinSize | PIN code buffer size. |
[in] | PinCode | PIN code to present to the Smart Card. |
[out] | PinResult | Result of PIN code presentation to the Smart Card. TRUE when Smard Card founds the PIN code correct. |
[out] | RemainingAttempts | Number of attempts still possible. |
EFI_SUCCESS | The requested command completed successfully. |
EFI_UNSUPPORTED | Pinsize < 0 and Secure PIN Entry functionality not supported. |
EFI_INVALID_PARAMETER | This is NULL. |
EFI_INVALID_PARAMETER | No connection for SCardHandle value. |
EFI_INVALID_PARAMETER | Bad value for PinSize: value not supported by Smart Card or, negative with PinCode not null. |
EFI_INVALID_PARAMETER | PinResult is NULL. |
EFI_NO_MEDIA | Smart Card or Reader of SCardHandle connection has been removed. A Disconnect should be performed. |
This function gives the remaining number of attempts for PIN code presentation.
The number of attempts to present a correct PIN is limited and depends on Smart Card and on PIN.
This function will retrieve the number of remaining possible attempts.
[in] | This | Indicates a pointer to the calling context. |
[in] | SCardHandle | Handle on Smart Card connection. |
[out] | RemainingAttempts | Number of attempts still possible. |
EFI_SUCCESS | The requested command completed successfully. |
EFI_INVALID_PARAMETER | This is NULL. |
EFI_INVALID_PARAMETER | No connection for SCardHandle value. |
EFI_INVALID_PARAMETER | RemainingAttempts is NULL. |
EFI_NO_MEDIA | Smart Card or Reader of SCardHandle connection has been removed. A Disconnect should be performed. |
This function returns a specific data from Smart Card.
The function is generic for any kind of data, but driver and application must share an EFI_GUID that identify the data.
[in] | This | Indicates a pointer to the calling context. |
[in] | SCardHandle | Handle on Smart Card connection. |
[in] | DataId | The type identifier of the data to get. |
[in,out] | DataSize | On input, in bytes, the size of Data. On output, in bytes, the size of buffer required to store the specified data. |
[out] | Data | The data buffer in which the data is returned. The type of the data buffer is associated with the DataId. Ignored if *DataSize is 0. |
EFI_SUCCESS | The requested command completed successfully. |
EFI_INVALID_PARAMETER | This is NULL. |
EFI_INVALID_PARAMETER | No connection for SCardHandle value. |
EFI_INVALID_PARAMETER | DataId is NULL. |
EFI_INVALID_PARAMETER | DataSize is NULL. |
EFI_INVALID_PARAMETER | Data is NULL, and *DataSize is not zero. |
EFI_NOT_FOUND | DataId unknown for this driver. |
EFI_BUFFER_TOO_SMALL | The size of Data is too small for the specified data and the required size is returned in DataSize. |
EFI_ACCESS_DENIED | Operation not performed, conditions not fulfilled. PIN not verified. |
EFI_NO_MEDIA | Smart Card or Reader of SCardHandle connection has been removed. A Disconnect should be performed. |
This function retrieve credentials store into the Smart Card.
The function returns a series of items in TLV (Tag Length Value) format.
First TLV item is the header item that gives the number of following containers (0x00, 0x01, Nb containers).
All these containers are a series of 4 TLV items:
[in] | This | Indicates a pointer to the calling context. |
[in] | SCardHandle | Handle on Smart Card connection. |
[in,out] | CredentialSize | On input, in bytes, the size of buffer to store the list of credential. On output, in bytes, the size of buffer required to store the entire list of credentials. |
[out] | CredentialList | List of credentials stored into the Smart Card. A list of TLV (Tag Length Value) elements organized in containers array. |
EFI_SUCCESS | The requested command completed successfully. |
EFI_INVALID_PARAMETER | This is NULL. |
EFI_INVALID_PARAMETER | No connection for SCardHandle value. |
EFI_INVALID_PARAMETER | CredentialSize is NULL. |
EFI_INVALID_PARAMETER | CredentialList is NULL, if CredentialSize is not zero. |
EFI_BUFFER_TOO_SMALL | The size of CredentialList is too small for the specified data and the required size is returned in CredentialSize. |
EFI_NO_MEDIA | Smart Card or Reader of SCardHandle connection has been removed. A Disconnect should be performed. |
This function signs an already hashed data with a Smart Card private key.
This function signs data, actually it is the hash of these data that is given to the function.
SignatureData buffer shall be big enough for signature. Signature size is function key size and key type.
[in] | This | Indicates a pointer to the calling context. |
[in] | SCardHandle | Handle on Smart Card connection. |
[in] | KeyId | Identifier of the key container, retrieved in a key index item of credentials. |
[in] | KeyType | The key type, retrieved in a key type item of credentials. |
[in] | HashAlgorithm | Hash algorithm used to hash the, one of:
|
[in] | PaddingMethod | Padding method used jointly with hash algorithm, one of:
|
[in] | HashedData | Hash of the data to sign. Size is function of the HashAlgorithm. |
[out] | SignatureData | Resulting signature with private key KeyId. Size is function of the KeyType and key size retrieved in the associated key size item of credentials. |
EFI_SUCCESS | The requested command completed successfully. |
EFI_INVALID_PARAMETER | This is NULL. |
EFI_INVALID_PARAMETER | No connection for SCardHandle value. |
EFI_INVALID_PARAMETER | KeyId is not valid. |
EFI_INVALID_PARAMETER | KeyType is not valid or not corresponding to KeyId. |
EFI_INVALID_PARAMETER | HashAlgorithm is NULL. |
EFI_INVALID_PARAMETER | HashAlgorithm is not valid. |
EFI_INVALID_PARAMETER | PaddingMethod is NULL. |
EFI_INVALID_PARAMETER | PaddingMethod is not valid. |
EFI_INVALID_PARAMETER | HashedData is NULL. |
EFI_INVALID_PARAMETER | SignatureData is NULL. |
EFI_ACCESS_DENIED | Operation not performed, conditions not fulfilled. PIN not verified. |
EFI_NO_MEDIA | Smart Card or Reader of SCardHandle connection has been removed. A Disconnect should be performed. |
This function decrypts data with a PKI/RSA Smart Card private key.
The function decrypts some PKI/RSA encrypted data with private key securely stored into the Smart Card.
The KeyId must reference a key of type SC_EDGE_RSA_EXCHANGE.
[in] | This | Indicates a pointer to the calling context. |
[in] | SCardHandle | Handle on Smart Card connection. |
[in] | KeyId | Identifier of the key container, retrieved in a key index item of credentials. |
[in] | HashAlgorithm | Hash algorithm used to hash the, one of:
|
[in] | PaddingMethod | Padding method used jointly with hash algorithm, one of:
|
[in] | EncryptedSize | Size of data to decrypt. |
[in] | EncryptedData | Data to decrypt |
[in,out] | PlaintextSize | On input, in bytes, the size of buffer to store the decrypted data. On output, in bytes, the size of buffer required to store the decrypted data. |
[out] | PlaintextData | Buffer for decrypted data, padding removed. |
EFI_SUCCESS | The requested command completed successfully. |
EFI_INVALID_PARAMETER | This is NULL. |
EFI_INVALID_PARAMETER | No connection for SCardHandle value. |
EFI_INVALID_PARAMETER | KeyId is not valid or associated key not of type SC_EDGE_RSA_EXCHANGE. |
EFI_INVALID_PARAMETER | HashAlgorithm is NULL. |
EFI_INVALID_PARAMETER | HashAlgorithm is not valid. |
EFI_INVALID_PARAMETER | PaddingMethod is NULL. |
EFI_INVALID_PARAMETER | PaddingMethod is not valid. |
EFI_INVALID_PARAMETER | EncryptedSize is 0. |
EFI_INVALID_PARAMETER | EncryptedData is NULL. |
EFI_INVALID_PARAMETER | PlaintextSize is NULL. |
EFI_INVALID_PARAMETER | PlaintextData is NULL. |
EFI_ACCESS_DENIED | Operation not performed, conditions not fulfilled. PIN not verified. |
EFI_BUFFER_TOO_SMALL | PlaintextSize is too small for the plaintext data and the required size is returned in PlaintextSize. |
EFI_NO_MEDIA | Smart Card or Reader of SCardHandle connection has been removed. A Disconnect should be performed. |
This function performs a secret Diffie Hellman agreement calculation that would be used to derive a symmetric encryption / decryption key.
The function compute a DH agreement that should be diversified togenerate a symmetric key to proceed encryption or decryption.
The application and the Smart Card shall agree on the diversification process.
The KeyId must reference a key of one of the types: SC_EDGE_ECDH_256, SC_EDGE_ECDH_384 or SC_EDGE_ECDH_521.
[in] | This | Indicates a pointer to the calling context. |
[in] | SCardHandle | Handle on Smart Card connection. |
[in] | KeyId | Identifier of the key container, retrieved in a key index item of credentials. |
[in] | dataQx | Public key x coordinate. Size is the same as key size for KeyId. Stored in big endian format. |
[in] | dataQy | Public key y coordinate. Size is the same as key size for KeyId. Stored in big endian format. |
[out] | DHAgreement | Buffer for DH agreement computed. Size must be bigger or equal to key size for KeyId. |
EFI_SUCCESS | The requested command completed successfully. |
EFI_INVALID_PARAMETER | This is NULL. |
EFI_INVALID_PARAMETER | No connection for SCardHandle value. |
EFI_INVALID_PARAMETER | KeyId is not valid. |
EFI_INVALID_PARAMETER | dataQx is NULL. |
EFI_INVALID_PARAMETER | dataQy is NULL. |
EFI_INVALID_PARAMETER | DHAgreement is NULL. |
EFI_ACCESS_DENIED | Operation not performed, conditions not fulfilled. PIN not verified. |
EFI_NO_MEDIA | Smart Card or Reader of SCardHandle connection has been removed. A Disconnect should be performed. |
Provides a simple HTTP-like interface to send and receive resources from a REST service.
The SendReceive() function sends an HTTP request to this REST service, and returns a response when the data is retrieved from the service. RequestMessage contains the HTTP request to the REST resource identified by RequestMessage.Request.Url. The ResponseMessage is the returned HTTP response for that request, including any HTTP status.
[in] | This | Pointer to EFI_REST_PROTOCOL instance for a particular REST service. |
[in] | RequestMessage | Pointer to the HTTP request data for this resource. |
[out] | ResponseMessage | Pointer to the HTTP response data obtained for this requested. |
EFI_SUCCESS | Operation succeeded. |
EFI_INVALID_PARAMETER | This, RequestMessage, or ResponseMessage are NULL. |
EFI_DEVICE_ERROR | An unexpected system or network error occurred. |
The GetServiceTime() function is an optional interface to obtain the current time from this REST service instance. If this REST service does not support retrieving the time, this function returns EFI_UNSUPPORTED.
[in] | This | Pointer to EFI_REST_PROTOCOL instance. |
[out] | Time | A pointer to storage to receive a snapshot of the current time of the REST service. |
EFI_SUCCESS | Operation succeeded |
EFI_INVALID_PARAMETER | This or Time are NULL. |
EFI_UNSUPPORTED | The RESTful service does not support returning the time. |
EFI_DEVICE_ERROR | An unexpected system or network error occurred. |
Return key generated through EAP process.
The GetKey() function return the key generated through EAP process, so that the 802.11 MAC layer driver can use MSK to derive more keys, e.g. PMK (Pairwise Master Key).
[in] | This | Pointer to the EFI_EAP_MANAGEMENT2_PROTOCOL instance. |
[in,out] | Msk | Pointer to MSK (Master Session Key) buffer. |
[in,out] | MskSize | MSK buffer size. |
[in,out] | Emsk | Pointer to EMSK (Extended Master Session Key) buffer. |
[in,out] | EmskSize | EMSK buffer size. |
EFI_SUCCESS | The operation completed successfully. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: Msk is NULL. MskSize is NULL. Emsk is NULL. EmskSize is NULL. |
EFI_NOT_READY | MSK and EMSK are not generated in current session yet. |
BuildResponsePacket() is called during STA and AP authentication is in progress. Supplicant derives the PTK or session keys depend on type of authentication is being employed.
[in] | This | Pointer to the EFI_SUPPLICANT_PROTOCOL instance. |
[in] | RequestBuffer | Pointer to the most recently received EAPOL packet. NULL means the supplicant need initiate the EAP authentication session and send EAPOL-Start message. |
[in] | RequestBufferSize | Packet size in bytes for the most recently received EAPOL packet. 0 is only valid when RequestBuffer is NULL. |
[out] | Buffer | Pointer to the buffer to hold the built packet. |
[in,out] | BufferSize | Pointer to the buffer size in bytes. On input, it is the buffer size provided by the caller. On output, it is the buffer size in fact needed to contain the packet. |
EFI_SUCCESS | The required EAPOL packet is built successfully. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: RequestBuffer is NULL, but RequestSize is NOT 0. RequestBufferSize is 0. Buffer is NULL, but RequestBuffer is NOT 0. BufferSize is NULL. |
EFI_BUFFER_TOO_SMALL | BufferSize is too small to hold the response packet. |
EFI_NOT_READY | Current EAPOL session state is NOT ready to build ResponsePacket. |
ProcessPacket() is called to Supplicant driver to encrypt or decrypt the data depending type of authentication type.
[in] | This | Pointer to the EFI_SUPPLICANT_PROTOCOL instance. |
[in,out] | FragmentTable | Pointer to a list of fragment. The caller will take responsible to handle the original FragmentTable while it may be reallocated in Supplicant driver. |
[in] | FragmentCount | Number of fragment. |
[in] | CryptMode | Crypt mode. |
EFI_SUCCESS | The operation completed successfully. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: FragmentTable is NULL. FragmentCount is NULL. CryptMode is invalid. |
EFI_NOT_READY | Current supplicant state is NOT Authenticated. |
EFI_ABORTED | Something wrong decryption the message. |
EFI_UNSUPPORTED | This API is not supported. |
Set Supplicant configuration data.
[in] | This | Pointer to the EFI_SUPPLICANT_PROTOCOL instance. |
[in] | DataType | The type of data. |
[in] | Data | Pointer to the buffer to hold the data. |
[in] | DataSize | Pointer to the buffer size in bytes. |
EFI_SUCCESS | The Supplicant configuration data is set successfully. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: Data is NULL. DataSize is 0. |
EFI_UNSUPPORTED | The DataType is unsupported. |
EFI_OUT_OF_RESOURCES | Required system resources could not be allocated. |
Get Supplicant configuration data.
[in] | This | Pointer to the EFI_SUPPLICANT_PROTOCOL instance. |
[in] | DataType | The type of data. |
[out] | Data | Pointer to the buffer to hold the data. Ignored if DataSize is 0. |
[in,out] | DataSize | Pointer to the buffer size in bytes. On input, it is the buffer size provided by the caller. On output, it is the buffer size in fact needed to contain the packet. |
EFI_SUCCESS | The Supplicant configuration data is got successfully. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: This is NULL. DataSize is NULL. Data is NULL if *DataSize is not zero. |
EFI_UNSUPPORTED | The DataType is unsupported. |
EFI_NOT_FOUND | The Supplicant configuration data is not found. |
EFI_BUFFER_TOO_SMALL | The size of Data is too small for the specified configuration data and the required size is returned in DataSize. |
Retrieves the Label Storage Area size and the maximum transfer size for the LabelStorageRead and LabelStorageWrite methods.
This | A pointer to the EFI_NVDIMM_LABEL_PROTOCOL instance. |
SizeOfLabelStorageArea | The size of the Label Storage Area for the NVDIMM in bytes. |
MaxTransferLength | The maximum number of bytes that can be transferred in a single call to LabelStorageRead or LabelStorageWrite. |
EFI_SUCCESS | The size of theLabel Storage Area and maximum transfer size returned are valid. |
EFI_ACCESS_DENIED | The Label Storage Area for the NVDIMM device is not currently accessible. |
EFI_DEVICE_ERROR | A physical device error occurred and the data transfer failed to complete. |
Retrieves the label data for the requested offset and length from within the Label Storage Area for the NVDIMM.
This | A pointer to the EFI_NVDIMM_LABEL_PROTOCOL instance. |
Offset | The byte offset within the Label Storage Area to read from. |
TransferLength | Number of bytes to read from the Label Storage Area beginning at the byte Offset specified. A TransferLength of 0 reads no data. |
LabelData | The return label data read at the requested offset and length from within the Label Storage Area. |
EFI_SUCCESS | The label data from the Label Storage Area for the NVDIMM was read successfully at the specified Offset and TransferLength and LabelData contains valid data. |
EFI_INVALID_PARAMETER | Any of the following are true:
|
EFI_ACCESS_DENIED | The Label Storage Area for the NVDIMM device is not currently accessible and labels cannot be read at this time. |
EFI_DEVICE_ERROR | A physical device error occurred and the data transfer failed to complete. |
Writes the label data for the requested offset and length in to the Label Storage Area for the NVDIMM.
This | A pointer to the EFI_NVDIMM_LABEL_PROTOCOL instance. |
Offset | The byte offset within the Label Storage Area to write to. |
TransferLength | Number of bytes to write to the Label Storage Area beginning at the byte Offset specified. A TransferLength of 0 writes no data. |
LabelData | The return label data write at the requested offset and length from within the Label Storage Area. |
EFI_SUCCESS | The label data from the Label Storage Area for the NVDIMM written read successfully at the specified Offset and TransferLength. |
EFI_INVALID_PARAMETER | Any of the following are true:
|
EFI_ACCESS_DENIED | The Label Storage Area for the NVDIMM device is not currently accessible and labels cannot be written at this time. |
EFI_DEVICE_ERROR | A physical device error occurred and the data transfer failed to complete. |
Handles IPsec processing for both inbound and outbound IP packets. Compare with Process() in EFI_IPSEC_PROTOCOL, this interface has the capability to process Option(Extension Header).
The EFI_IPSEC2_PROCESS process routine handles each inbound or outbound packet. The behavior is that it can perform one of the following actions: bypass the packet, discard the packet, or protect the packet.
[in] | This | Pointer to the EFI_IPSEC2_PROTOCOL instance. |
[in] | NicHandle | Instance of the network interface. |
[in] | IpVer | IP version.IPv4 or IPv6. |
[in,out] | IpHead | Pointer to the IP Header it is either the EFI_IP4_HEADER or EFI_IP6_HEADER. On input, it contains the IP header. On output, 1) in tunnel mode and the traffic direction is inbound, the buffer will be reset to zero by IPsec; 2) in tunnel mode and the traffic direction is outbound, the buffer will reset to be the tunnel IP header.3) in transport mode, the related fielders (like payload length, Next header) in IP header will be modified according to the condition. |
[in,out] | LastHead | For IP4, it is the next protocol in IP header. For IP6 it is the Next Header of the last extension header. |
[in,out] | OptionsBuffer | On input, it contains the options (extensions header) to be processed by IPsec. On output, 1) in tunnel mode and the traffic direction is outbound, it will be set to NULL, and that means this contents was wrapped after inner header and should not be concatenated after tunnel header again; 2) in transport mode and the traffic direction is inbound, if there are IP options (extension headers) protected by IPsec, IPsec will concatenate the those options after the input options (extension headers); 3) on other situations, the output of contents of OptionsBuffer might be same with input's. The caller should take the responsibility to free the buffer both on input and on output. |
[in,out] | OptionsLength | On input, the input length of the options buffer. On output, the output length of the options buffer. |
[in,out] | FragmentTable | Pointer to a list of fragments. On input, these fragments contain the IP payload. On output, 1) in tunnel mode and the traffic direction is inbound, the fragments contain the whole IP payload which is from the IP inner header to the last byte of the packet; 2) in tunnel mode and the traffic direction is the outbound, the fragments contains the whole encapsulated payload which encapsulates the whole IP payload between the encapsulated header and encapsulated trailer fields. 3) in transport mode and the traffic direction is inbound, the fragments contains the IP payload which is from the next layer protocol to the last byte of the packet; 4) in transport mode and the traffic direction is outbound, the fragments contains the whole encapsulated payload which encapsulates the next layer protocol information between the encapsulated header and encapsulated trailer fields. |
[in,out] | FragmentCount | Number of fragments. |
[in] | TrafficDirection | Traffic direction. |
[out] | RecycleSignal | Event for recycling of resources. |
EFI_SUCCESS | The packet was processed by IPsec successfully. |
EFI_ACCESS_DENIED | The packet was discarded. |
EFI_NOT_READY | The IKE negotiation is invoked and the packet was discarded. |
EFI_INVALID_PARAMETER | One or more of following are TRUE: If OptionsBuffer is NULL; If OptionsLength is NULL; If FragmentTable is NULL; If FragmentCount is NULL. |
Register a RAM disk with specified address, size and type.
[in] | RamDiskBase | The base address of registered RAM disk. |
[in] | RamDiskSize | The size of registered RAM disk. |
[in] | RamDiskType | The type of registered RAM disk. The GUID can be any of the values defined in section 9.3.6.9, or a vendor defined GUID. |
[in] | ParentDevicePath | Pointer to the parent device path. If there is no parent device path then ParentDevicePath is NULL. |
[out] | DevicePath | On return, points to a pointer to the device path of the RAM disk device. If ParentDevicePath is not NULL, the returned DevicePath is created by appending a RAM disk node to the parent device path. If ParentDevicePath is NULL, the returned DevicePath is a RAM disk device path without appending. This function is responsible for allocating the buffer DevicePath with the boot service AllocatePool(). |
EFI_SUCCESS | The RAM disk is registered successfully. |
EFI_INVALID_PARAMETER | DevicePath or RamDiskType is NULL. RamDiskSize is 0. |
EFI_ALREADY_STARTED | A Device Path Protocol instance to be created is already present in the handle database. |
EFI_OUT_OF_RESOURCES | The RAM disk register operation fails due to resource limitation. |
Unregister a RAM disk specified by DevicePath.
[in] | DevicePath | A pointer to the device path that describes a RAM Disk device. |
EFI_SUCCESS | The RAM disk is unregistered successfully. |
EFI_INVALID_PARAMETER | DevicePath is NULL. |
EFI_UNSUPPORTED | The device specified by DevicePath is not a valid ramdisk device path and not supported by the driver. |
EFI_NOT_FOUND | The RAM disk pointed by DevicePath doesn't exist. |
Assert or deassert the SPI chip select.
This routine is called at TPL_NOTIFY. Update the value of the chip select line for a SPI peripheral. The SPI bus layer calls this routine either in the board layer or in the SPI controller to manipulate the chip select pin at the start and end of a SPI transaction.
[in] | This | Pointer to an EFI_SPI_HC_PROTOCOL structure. |
[in] | SpiPeripheral | The address of an EFI_SPI_PERIPHERAL data structure describing the SPI peripheral whose chip select pin is to be manipulated. The routine may access the ChipSelectParameter field to gain sufficient context to complete the operati on. |
[in] | PinValue | The value to be applied to the chip select line of the SPI peripheral. |
EFI_SUCCESS | The chip select was set as requested |
EFI_NOT_READY | Support for the chip select is not properly initialized |
EFI_INVALID_PARAMETER | The ChipSeLect value or its contents are invalid |
Set up the clock generator to produce the correct clock frequency, phase and polarity for a SPI chip.
This routine is called at TPL_NOTIFY. This routine updates the clock generator to generate the correct frequency and polarity for the SPI clock.
[in] | This | Pointer to an EFI_SPI_HC_PROTOCOL structure. |
[in] | SpiPeripheral | Pointer to a EFI_SPI_PERIPHERAL data structure from which the routine can access the ClockParameter, ClockPhase and ClockPolarity fields. The routine also has access to the names for the SPI bus and chip which can be used during debugging. |
[in] | ClockHz | Pointer to the requested clock frequency. The SPI host controller will choose a supported clock frequency which is less then or equal to this value. Specify zero to turn the clock generator off. The actual clock frequency supported by the SPI host controller will be returned. |
EFI_SUCCESS | The clock was set up successfully |
EFI_UNSUPPORTED | The SPI controller was not able to support the frequency requested by ClockHz |
Perform the SPI transaction on the SPI peripheral using the SPI host controller.
This routine is called at TPL_NOTIFY. This routine synchronously returns EFI_SUCCESS indicating that the asynchronous SPI transaction was started. The routine then waits for completion of the SPI transaction prior to returning the final transaction status.
[in] | This | Pointer to an EFI_SPI_HC_PROTOCOL structure. |
[in] | BusTransaction | Pointer to a EFI_SPI_BUS_ TRANSACTION containing the description of the SPI transaction to perform. |
EFI_SUCCESS | The transaction completed successfully |
EFI_BAD_BUFFER_SIZE | The BusTransaction->WriteBytes value is invalid, or the BusTransaction->ReadinBytes value is invalid |
EFI_UNSUPPORTED | The BusTransaction-> Transaction Type is unsupported |
Retrieve additional information associated with a PCD token.
This includes information such as the type of value the TokenNumber is associated with as well as possible human readable name that is associated with the token.
[in] | TokenNumber | The PCD token number. |
[out] | PcdInfo | The returned information associated with the requested TokenNumber. |
EFI_SUCCESS | The PCD information was returned successfully |
EFI_NOT_FOUND | The PCD service could not find the requested token number. |
Retrieve additional information associated with a PCD token.
This includes information such as the type of value the TokenNumber is associated with as well as possible human readable name that is associated with the token.
[in] | Guid | The 128-bit unique value that designates the namespace from which to extract the value. |
[in] | TokenNumber | The PCD token number. |
[out] | PcdInfo | The returned information associated with the requested TokenNumber. |
EFI_SUCCESS | The PCD information was returned successfully |
EFI_NOT_FOUND | The PCD service could not find the requested token number. |
Reset the block device hardware.
The Reset() function resets the block device hardware.
As part of the initialization process, the firmware/device will make a quick but reasonable attempt to verify that the device is functioning.
If the ExtendedVerificationflag is TRUE the firmware may take an extended amount of time to verify the device is operating on reset. Otherwise the reset operation is to occur as quickly as possible.
The hardware verification process is not defined by this specification and is left up to the platform firmware or driver to implement.
[in] | This | Pointer to the EFI_BLOCK_IO_CRYPTO_PROTOCOL instance. |
[in] | ExtendedVerification | Indicates that the driver may perform a more exhausive verification operation of the device during reset. |
EFI_SUCCESS | The block device was reset. |
EFI_DEVICE_ERROR | The block device is not functioning correctly and could not be reset. |
EFI_INVALID_PARAMETER | This is NULL. |
Get the capabilities of the underlying inline cryptographic interface.
The GetCapabilities() function determines whether pre-OS controllable inline crypto is supported by the system for the current disk and, if so, returns the capabilities of the crypto engine.
The caller is responsible for providing the Capabilities structure with a sufficient number of entries.
If the structure is too small, the EFI_BUFFER_TOO_SMALL error code is returned and the CapabilityCount field contains the number of entries needed to contain the capabilities.
[in] | This | Pointer to the EFI_BLOCK_IO_CRYPTO_PROTOCOL instance. |
[out] | Capabilities | Pointer to the EFI_BLOCK_IO_CRYPTO_CAPABILITIES structure. |
EFI_SUCCESS | The ICI is ready for use. |
EFI_BUFFER_TOO_SMALL | The Capabilities structure was too small. The number of entries needed is returned in the CapabilityCount field of the structure. |
EFI_NO_RESPONSE | No response was received from the ICI. |
EFI_DEVICE_ERROR | An error occurred when attempting to access the ICI. |
EFI_INVALID_PARAMETER | This is NULL. |
EFI_INVALID_PARAMETER | Capabilities is NULL. |
Set the configuration of the underlying inline cryptographic interface.
The SetConfiguration() function allows the user to set the current configuration of the inline cryptographic interface and should be called before attempting any crypto operations.
This configures the configuration table entries with algorithms, key sizes and keys. Each configured entry can later be referred to by index at the time of storage transaction.
The configuration table index will refer to the combination ofKeyOwnerGuid, Algorithm, and CryptoKey.
KeyOwnerGuid identifies the component taking ownership of the entry. It helps components to identify their own entries, cooperate with other owner components, and avoid conflicts. This Guid identifier is there to help coordination between cooperating components and not a security or synchronization feature. The Nil GUID can be used by a component to release use of entry owned. It is also used to identify potentially available entries (see GetConfiguration).
CryptoKey specifies algorithm-specific key material to use within parameters of selected crypto capability.
This function is called infrequently typically once, on device start, before IO starts. It can be called at later times in cases the number of keysused on the drive is higher than what can be configured at a time or a new key has to be added.
Components setting or changing an entry or entries for a given index or indices must ensure that IO referencing affected indices is temporarily blocked (run-down) at the time of change.
Indices parameters in each parameter table entry allow to set only a portion of the available table entries in the crypto module anywhere from single entry to entire table supported.
If corresponding table entry or entries being set are already in use by another owner the call should be failed and none of the entries should be modified. The interface implementation must enforce atomicity of this operation (should either succeed fully or fail completely without modifying state).
Note that components using GetConfiguration command to discover available entries should be prepared that by the time of calling SetConfiguration the previously available entry may have become occupied. Such components should be prepared to re-try the sequence of operations.
Alternatively EFI_BLOCK_IO_CRYPTO_INDEX_ANY can be used to have the implementation discover and allocate available,if any, indices atomically.
An optional ResultingTable pointer can be provided by the caller to receive the newly configured entries. The array provided by the caller must have at least ConfigurationCount of entries.
[in] | This | Pointer to the EFI_BLOCK_IO_CRYPTO_PROTOCOL instance. |
[in] | ConfigurationCount | Number of entries being configured with this call. |
[in] | ConfigurationTable | Pointer to a table used to populate the configuration table. |
[out] | ResultingTable | Optional pointer to a table that receives the newly configured entries. |
EFI_SUCCESS | The ICI is ready for use. |
EFI_NO_RESPONSE | No response was received from the ICI. |
EFI_DEVICE_ERROR | An error occurred when attempting to access the ICI. |
EFI_INVALID_PARAMETER | This is NULL. |
EFI_INVALID_PARAMETER | ConfigurationTable is NULL. |
EFI_INVALID_PARAMETER | ConfigurationCount is 0. |
EFI_OUT_OF_RESOURCES | Could not find the requested number of available entries in the configuration table. |
Get the configuration of the underlying inline cryptographic interface.
The GetConfiguration() function allows the user to get the configuration of the inline cryptographic interface.
Retrieves, entirely or partially, the currently configured key table. Note that the keys themselves are not retrieved, but rather just indices, owner GUIDs and capabilities.
If fewer entries than specified by ConfigurationCount are returned, the Index field of the unused entries is set to EFI_BLOCK_IO_CRYPTO_INDEX_ANY.
[in] | This | Pointer to the EFI_BLOCK_IO_CRYPTO_PROTOCOL instance. |
[in] | StartIndex | Configuration table index at which to start the configuration query. |
[in] | ConfigurationCount | Number of entries to return in the response table. |
[in] | KeyOwnerGuid | Optional parameter to filter response down to entries with a given owner. A pointer to the Nil value can be used to return available entries. Set to NULL when no owner filtering is required. |
[out] | ConfigurationTable | Table of configured configuration table entries (with no CryptoKey returned): configuration table index, KeyOwnerGuid, Capability. Should have sufficient space to store up to ConfigurationCount entries. |
EFI_SUCCESS | The ICI is ready for use. |
EFI_NO_RESPONSE | No response was received from the ICI. |
EFI_DEVICE_ERROR | An error occurred when attempting to access the ICI. |
EFI_INVALID_PARAMETER | This is NULL. |
EFI_INVALID_PARAMETER | Configuration table is NULL. |
EFI_INVALID_PARAMETER | StartIndex is out of bounds. |
Reads the requested number of blocks from the device and optionally decrypts them inline.
TheReadExtended() function allows the caller to perform a storage device read operation. The function reads the requested number of blocks from the device and then if Index is specified decrypts them inline. All the blocks are read and decrypted (if decryption requested), or an error is returned.
If there is no media in the device, the function returns EFI_NO_MEDIA. If the MediaId is not the ID for the current media in the device, the function returns EFI_MEDIA_CHANGED.
If EFI_DEVICE_ERROR, EFI_NO_MEDIA, or EFI_MEDIA_CHANGED is returned and nonblocking I/O is being used, the Event associated with this request will not be signaled.
In addition to standard storage transaction parameters (LBA, IO size, and buffer), this command will also specify a configuration table Index and CryptoIvInput when data has to be decrypted inline by the controller after being read from the storage device. If an Index parameter is not specified, no decryption is performed.
[in] | This | Pointer to the EFI_BLOCK_IO_CRYPTO_PROTOCOL instance. |
[in] | MediaId | The media ID that the read request is for. |
[in] | LBA | The starting logical block address to read from on the device. |
[in,out] | Token | A pointer to the token associated with the transaction. |
[in] | BufferSize | The size of the Buffer in bytes. This must be a multiple of the intrinsic block size of the device. |
[out] | Buffer | A pointer to the destination buffer for the data. The caller is responsible for either having implicit or explicit ownership of the buffer. |
[in] | Index | A pointer to the configuration table index. This is optional. |
[in] | CryptoIvInput | A pointer to a buffer that contains additional cryptographic parameters as required by the capability referenced by the configuration table index, such as cryptographic initialization vector. |
EFI_SUCCESS | The read request was queued if Token-> Event is not NULL. The data was read correctly from the device if the Token->Event is NULL. |
EFI_DEVICE_ERROR | The device reported an error while attempting to perform the read operation and/or decryption operation. |
EFI_NO_MEDIA | There is no media in the device. |
EFI_MEDIA_CHANGED | The MediaId is not for the current media. |
EFI_BAD_BUFFER_SIZE | The BufferSize parameter is not a multiple of the intrinsic block size of the device. |
EFI_INVALID_PARAMETER | This is NULL, or the read request contains LBAs that are not valid, or the buffer is not on proper alignment. |
EFI_INVALID_PARAMETER | CryptoIvInput is incorrect. |
EFI_OUT_OF_RESOURCES | The request could not be completed due to a lack of resources. |
Optionally encrypts a specified number of blocks inline and then writes to the device.
The WriteExtended() function allows the caller to perform a storage device write operation. The function encrypts the requested number of blocks inline if Index is specified and then writes them to the device. All the blocks are encrypted (if encryption requested) and written, or an error is returned.
If there is no media in the device, the function returns EFI_NO_MEDIA. If the MediaId is not the ID for the current media in the device, the function returns EFI_MEDIA_CHANGED.
If EFI_DEVICE_ERROR, EFI_NO_MEDIA, or EFI_MEDIA_CHANGED is returned and nonblocking I/O is being used, the Event associated with this request will not be signaled.
In addition to standard storage transaction parameters (LBA, IO size, and buffer), this command will also specify a configuration table Index and a CryptoIvInput when data has to be decrypted inline by the controller before being written to the storage device. If no Index parameter is specified, no encryption is performed.
[in] | This | Pointer to the EFI_BLOCK_IO_CRYPTO_PROTOCOL instance. |
[in] | MediaId | The media ID that the read request is for. |
[in] | LBA | The starting logical block address to read from on the device. |
[in,out] | Token | A pointer to the token associated with the transaction. |
[in] | BufferSize | The size of the Buffer in bytes. This must be a multiple of the intrinsic block size of the device. |
[in] | Buffer | A pointer to the source buffer for the data. |
[in] | Index | A pointer to the configuration table index. This is optional. |
[in] | CryptoIvInput | A pointer to a buffer that contains additional cryptographic parameters as required by the capability referenced by the configuration table index, such as cryptographic initialization vector. |
EFI_SUCCESS | The request to encrypt (optionally) and write was queued if Event is not NULL. The data was encrypted (optionally) and written correctly to the device if the Event is NULL. |
EFI_WRITE_PROTECTED | The device cannot be written to. |
EFI_NO_MEDIA | There is no media in the device. |
EFI_MEDIA_CHANGED | The MediaId is not for the current media. |
EFI_DEVICE_ERROR | The device reported an error while attempting to encrypt blocks or to perform the write operation. |
EFI_BAD_BUFFER_SIZE | The BufferSize parameter is not a multiple of the intrinsic block size of the device. |
EFI_INVALID_PARAMETER | This is NULL, or the write request contains LBAs that are not valid, or the buffer is not on proper alignment. |
EFI_INVALID_PARAMETER | CryptoIvInput is incorrect. |
EFI_OUT_OF_RESOURCES | The request could not be completed due to a lack of resources. |
Flushes all modified data toa physical block device.
The FlushBlocks() function flushes all modified data to the physical block device. Any modified data that has to be encrypted must have been already encrypted as a part of WriteExtended() operation - inline crypto operation cannot be a part of flush operation.
All data written to the device prior to the flush must be physically written before returning EFI_SUCCESS from this function. This would include any cached data the driver may have cached, and cached data the device may have cached. A flush may cause a read request following the flush to force a device access.
If EFI_DEVICE_ERROR, EFI_NO_MEDIA, EFI_WRITE_PROTECTED or EFI_MEDIA_CHANGED is returned and non-blocking I/O is being used, the Event associated with this request will not be signaled.
[in] | This | Pointer to the EFI_BLOCK_IO_CRYPTO_PROTOCOL instance. |
[in,out] | Token | A pointer to the token associated with the transaction. |
EFI_SUCCESS | The flush request was queued if Event is not NULL. All outstanding data was written correctly to the device if the Event is NULL. |
EFI_DEVICE_ERROR | The device reported an error while attempting to write data. |
EFI_WRITE_PROTECTED | The device cannot be written to. |
EFI_NO_MEDIA | There is no media in the device. |
EFI_MEDIA_CHANGED | The MediaId is not for the current media. |
EFI_INVALID_PARAMETER | This is NULL. |
EFI_OUT_OF_RESOURCES | The request could not be completed due to a lack of resources. |
Set TLS session data.
The SetSessionData() function set data for a new TLS session. All session data should be set before BuildResponsePacket() invoked.
[in] | This | Pointer to the EFI_TLS_PROTOCOL instance. |
[in] | DataType | TLS session data type. |
[in] | Data | Pointer to session data. |
[in] | DataSize | Total size of session data. |
EFI_SUCCESS | The TLS session data is set successfully. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: This is NULL. Data is NULL. DataSize is 0. |
EFI_UNSUPPORTED | The DataType is unsupported. |
EFI_ACCESS_DENIED | If the DataType is one of below: EfiTlsClientRandom EfiTlsServerRandom EfiTlsKeyMaterial |
EFI_NOT_READY | Current TLS session state is NOT EfiTlsSessionStateNotStarted. |
EFI_OUT_OF_RESOURCES | Required system resources could not be allocated. |
Get TLS session data.
The GetSessionData() function return the TLS session information.
[in] | This | Pointer to the EFI_TLS_PROTOCOL instance. |
[in] | DataType | TLS session data type. |
[in,out] | Data | Pointer to session data. |
[in,out] | DataSize | Total size of session data. On input, it means the size of Data buffer. On output, it means the size of copied Data buffer if EFI_SUCCESS, and means the size of desired Data buffer if EFI_BUFFER_TOO_SMALL. |
EFI_SUCCESS | The TLS session data is got successfully. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: This is NULL. DataSize is NULL. Data is NULL if *DataSize is not zero. |
EFI_UNSUPPORTED | The DataType is unsupported. |
EFI_NOT_FOUND | The TLS session data is not found. |
EFI_NOT_READY | The DataType is not ready in current session state. |
EFI_BUFFER_TOO_SMALL | The buffer is too small to hold the data. |
Build response packet according to TLS state machine. This function is only valid for alert, handshake and change_cipher_spec content type.
The BuildResponsePacket() function builds TLS response packet in response to the TLS request packet specified by RequestBuffer and RequestSize. If RequestBuffer is NULL and RequestSize is 0, and TLS session status is EfiTlsSessionNotStarted, the TLS session will be initiated and the response packet needs to be ClientHello. If RequestBuffer is NULL and RequestSize is 0, and TLS session status is EfiTlsSessionClosing, the TLS session will be closed and response packet needs to be CloseNotify. If RequestBuffer is NULL and RequestSize is 0, and TLS session status is EfiTlsSessionError, the TLS session has errors and the response packet needs to be Alert message based on error type.
[in] | This | Pointer to the EFI_TLS_PROTOCOL instance. |
[in] | RequestBuffer | Pointer to the most recently received TLS packet. NULL means TLS need initiate the TLS session and response packet need to be ClientHello. |
[in] | RequestSize | Packet size in bytes for the most recently received TLS packet. 0 is only valid when RequestBuffer is NULL. |
[out] | Buffer | Pointer to the buffer to hold the built packet. |
[in,out] | BufferSize | Pointer to the buffer size in bytes. On input, it is the buffer size provided by the caller. On output, it is the buffer size in fact needed to contain the packet. |
EFI_SUCCESS | The required TLS packet is built successfully. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: This is NULL. RequestBuffer is NULL but RequestSize is NOT 0. RequestSize is 0 but RequestBuffer is NOT NULL. BufferSize is NULL. Buffer is NULL if *BufferSize is not zero. |
EFI_BUFFER_TOO_SMALL | BufferSize is too small to hold the response packet. |
EFI_NOT_READY | Current TLS session state is NOT ready to build ResponsePacket. |
EFI_ABORTED | Something wrong build response packet. |
Decrypt or encrypt TLS packet during session. This function is only valid after session connected and for application_data content type.
The ProcessPacket () function process each inbound or outbound TLS APP packet.
[in] | This | Pointer to the EFI_TLS_PROTOCOL instance. |
[in,out] | FragmentTable | Pointer to a list of fragment. The caller will take responsible to handle the original FragmentTable while it may be reallocated in TLS driver. If CryptMode is EfiTlsEncrypt, on input these fragments contain the TLS header and plain text TLS APP payload; on output these fragments contain the TLS header and cipher text TLS APP payload. If CryptMode is EfiTlsDecrypt, on input these fragments contain the TLS header and cipher text TLS APP payload; on output these fragments contain the TLS header and plain text TLS APP payload. |
[in] | FragmentCount | Number of fragment. |
[in] | CryptMode | Crypt mode. |
EFI_SUCCESS | The operation completed successfully. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: This is NULL. FragmentTable is NULL. FragmentCount is NULL. CryptoMode is invalid. |
EFI_NOT_READY | Current TLS session state is NOT EfiTlsSessionDataTransferring. |
EFI_ABORTED | Something wrong decryption the message. TLS session status will become EfiTlsSessionError. The caller need call BuildResponsePacket() to generate Error Alert message and send it out. |
EFI_OUT_OF_RESOURCES | No enough resource to finish the operation. |
Send a security protocol command to a device.
The SendData function sends a security protocol command containing the payload PayloadBuffer to the given MediaId. The security protocol command sent is defined by SecurityProtocolId and contains the security protocol specific data SecurityProtocolSpecificData. If the underlying protocol command requires a specific padding for the command payload, the SendData function shall add padding bytes to the command payload to satisfy the padding requirements.
For devices supporting the SCSI command set, the security protocol command is sent using the SECURITY PROTOCOL OUT command defined in SPC-4.
For devices supporting the ATA command set, the security protocol command is sent using one of the TRUSTED SEND commands defined in ATA8-ACS if PayloadBufferSize is non-zero. If the PayloadBufferSize is zero, the security protocol command is sent using the Trusted Non-Data command defined in ATA8-ACS.
If PayloadBuffer is NULL and PayloadBufferSize is non-zero, the function shall return EFI_INVALID_PARAMETER.
If the given MediaId does not support security protocol commands, the function shall return EFI_UNSUPPORTED. If there is no media in the device, the function returns EFI_NO_MEDIA. If the MediaId is not the ID for the current media in the device, the function returns EFI_MEDIA_CHANGED.
If the security protocol fails to complete within the Timeout period, the function shall return EFI_TIMEOUT.
If the security protocol command completes without an error, the function shall return EFI_SUCCESS. If the security protocol command completes with an error, the function shall return EFI_DEVICE_ERROR.
This | Indicates a pointer to the calling context. |
MediaId | ID of the medium to receive data from. |
Timeout | The timeout, in 100ns units, to use for the execution of the security protocol command. A Timeout value of 0 means that this function will wait indefinitely for the security protocol command to execute. If Timeout is greater than zero, then this function will return EFI_TIMEOUT if the time required to execute the receive data command is greater than Timeout. |
SecurityProtocolId | The value of the "Security Protocol" parameter of the security protocol command to be sent. |
SecurityProtocolSpecificData | The value of the "Security Protocol Specific" parameter of the security protocol command to be sent. |
PayloadBufferSize | Size in bytes of the payload data buffer. |
PayloadBuffer | A pointer to a destination buffer to store the security protocol command specific payload data for the security protocol command. |
EFI_SUCCESS | The security protocol command completed successfully. |
EFI_UNSUPPORTED | The given MediaId does not support security protocol commands. |
EFI_DEVICE_ERROR | The security protocol command completed with an error. |
EFI_NO_MEDIA | There is no media in the device. |
EFI_MEDIA_CHANGED | The MediaId is not for the current media. |
EFI_INVALID_PARAMETER | The PayloadBuffer is NULL and PayloadBufferSize is non-zero. |
EFI_TIMEOUT | A timeout occurred while waiting for the security protocol command to execute. |
Set the BIOS base address.
This routine must be called at or below TPL_NOTIFY. The BIOS base address works with the protect range registers to protect portions of the SPI NOR flash from erase and write operat ions. The BIOS calls this API prior to passing control to the OS loader.
[in] | This | Pointer to an EFI_LEGACY_SPI_FLASH_PROTOCOL data structure. |
[in] | BiosBaseAddress | The BIOS base address. |
EFI_SUCCESS | The BIOS base address was properly set |
EFI_ACCESS_ERROR | The SPI controller is locked |
EFI_INVALID_PARAMETER | BiosBaseAddress > This->MaximumOffset |
EFI_UNSUPPORTED | The BIOS base address was already set or not a legacy SPI host controller |
Clear the SPI protect range registers.
This routine must be called at or below TPL_NOTIFY. The BIOS uses this routine to set an initial condition on the SPI protect range registers.
[in] | This | Pointer to an EFI_LEGACY_SPI_FLASH_PROTOCOL data structure. |
EFI_SUCCESS | The registers were successfully cleared |
EFI_ACCESS_ERROR | The SPI controller is locked |
EFI_UNSUPPORTED | Not a legacy SPI host controller |
Set the next protect range register.
This routine must be called at or below TPL_NOTIFY. The BIOS sets the protect range register to prevent write and erase operations to a portion of the SPI NOR flash device.
[in] | This | Pointer to an EFI_LEGACY_SPI_FLASH_PROTOCOL data structure. |
[in] | BiosAddress | Address within a 4 KiB block to start protecting. |
[in] | BlocksToProtect | The number of 4 KiB blocks to protect. |
EFI_SUCCESS | The register was successfully updated |
EFI_ACCESS_ERROR | The SPI controller is locked |
EFI_INVALID_PARAMETER | BiosAddress < This->BiosBaseAddress, or |
EFI_INVALID_PARAMETER | BlocksToProtect * 4 KiB > This->MaximumRangeBytes, or BiosAddress - This->BiosBaseAddress
|
EFI_OUT_OF_RESOURCES | No protect range register available |
EFI_UNSUPPORTED | Call This->SetBaseAddress because the BIOS base address is not set Not a legacy SPI host controller |
Lock the SPI controller configuration.
This routine must be called at or below TPL_NOTIFY. This routine locks the SPI controller's configuration so that the software is no longer able to update: Prefix table Opcode menu Opcode type table BIOS base address Protect range registers
[in] | This | Pointer to an EFI_LEGACY_SPI_FLASH_PROTOCOL data structure. |
EFI_SUCCESS | The SPI controller was successfully locked |
EFI_ALREADY_STARTED | The SPI controller was already locked |
EFI_UNSUPPORTED | Not a legacy SPI host controller |
Open I/O aperture.
This function opens an I/O aperture in a ISA Host Controller for the I/O addresses specified by IoAddress to IoAddress + IoLength - 1. It may be possible that a single hardware aperture may be used for more than one device. This function tracks the number of times that each aperture is referenced, and does not close the hardware aperture (via CloseIoAperture()) until there are no more references to it.
This | A pointer to this instance of the EFI_ISA_HC_PROTOCOL. |
IoAddress | An unsigned integer that specifies the first byte of the I/O space required. |
IoLength | An unsigned integer that specifies the number of bytes of the I/O space required. |
IoApertureHandle | A pointer to the returned I/O aperture handle. This value can be used on subsequent calls to CloseIoAperture(). |
EFI_SUCCESS | The I/O aperture was opened successfully. |
EFI_UNSUPPORTED | The ISA Host Controller is a subtractive-decode controller. |
EFI_OUT_OF_RESOURCES | There is no available I/O aperture. |
Close I/O aperture.
This function closes a previously opened I/O aperture handle. If there are no more I/O aperture handles that refer to the hardware I/O aperture resource, then the hardware I/O aperture is closed. It may be possible that a single hardware aperture may be used for more than one device. This function tracks the number of times that each aperture is referenced, and does not close the hardware aperture (via CloseIoAperture()) until there are no more references to it.
This | A pointer to this instance of the EFI_ISA_HC_PROTOCOL. |
IoApertureHandle | The I/O aperture handle previously returned from a call to OpenIoAperture(). |
EFI_SUCCESS | The IO aperture was closed successfully. |
Service to retrieves the number of logical processor in the platform.
[in] | This | The EFI_MM_MP_PROTOCOL instance. |
[out] | NumberOfProcessors | Pointer to the total number of logical processors in the system, including the BSP and all APs. |
EFI_SUCCESS | The number of processors was retrieved successfully |
EFI_INVALID_PARAMETER | NumberOfProcessors is NULL |
This service allows the caller to invoke a procedure one of the application processors (AP). This function uses an optional token parameter to support blocking and non-blocking modes. If the token is passed into the call, the function will operate in a non-blocking fashion and the caller can check for completion with CheckOnProcedure or WaitForProcedure.
[in] | This | The EFI_MM_MP_PROTOCOL instance. |
[in] | Procedure | A pointer to the procedure to be run on the designated target AP of the system. Type EFI_AP_PROCEDURE2 is defined below in related definitions. |
[in] | CpuNumber | The zero-based index of the processor number of the target AP, on which the code stream is supposed to run. If the number points to the calling processor then it will not run the supplied code. |
[in] | TimeoutInMicroseconds | Indicates the time limit in microseconds for this AP to finish execution of Procedure, either for blocking or non-blocking mode. Zero means infinity. If the timeout expires before this AP returns from Procedure, then Procedure on the AP is terminated. If the timeout expires in blocking mode, the call returns EFI_TIMEOUT. If the timeout expires in non-blocking mode, the timeout determined can be through CheckOnProcedure or WaitForProcedure. Note that timeout support is optional. Whether an implementation supports this feature, can be determined via the Attributes data member. |
[in,out] | ProcedureArguments | Allows the caller to pass a list of parameters to the code that is run by the AP. It is an optional common mailbox between APs and the caller to share information. |
[in,out] | Token | This is parameter is broken into two components: 1.Token->Completion is an optional parameter that allows the caller to execute the procedure in a blocking or non-blocking fashion. If it is NULL the call is blocking, and the call will not return until the AP has completed the procedure. If the token is not NULL, the call will return immediately. The caller can check whether the procedure has completed with CheckOnProcedure or WaitForProcedure. 2.Token->Status The implementation updates the address pointed at by this variable with the status code returned by Procedure when it completes execution on the target AP, or with EFI_TIMEOUT if the Procedure fails to complete within the optional timeout. The implementation will update this variable with EFI_NOT_READY prior to starting Procedure on the target AP. |
[in,out] | CPUStatus | This optional pointer may be used to get the status code returned by Procedure when it completes execution on the target AP, or with EFI_TIMEOUT if the Procedure fails to complete within the optional timeout. The implementation will update this variable with EFI_NOT_READY prior to starting Procedure on the target AP. |
EFI_SUCCESS | In the blocking case, this indicates that Procedure has completed execution on the target AP. In the non-blocking case this indicates that the procedure has been successfully scheduled for execution on the target AP. |
EFI_INVALID_PARAMETER | The input arguments are out of range. Either the target AP is the caller of the function, or the Procedure or Token is NULL |
EFI_NOT_READY | If the target AP is busy executing another procedure |
EFI_ALREADY_STARTED | Token is already in use for another procedure |
EFI_TIMEOUT | In blocking mode, the timeout expired before the specified AP has finished |
This service allows the caller to invoke a procedure on all running application processors (AP) except the caller. This function uses an optional token parameter to support blocking and nonblocking modes. If the token is passed into the call, the function will operate in a non-blocking fashion and the caller can check for completion with CheckOnProcedure or WaitForProcedure.
It is not necessary for the implementation to run the procedure on every processor on the platform. Processors that are powered down in such a way that they cannot respond to interrupts, may be excluded from the broadcast.
[in] | This | The EFI_MM_MP_PROTOCOL instance. |
[in] | Procedure | A pointer to the code stream to be run on the APs that have entered MM. Type EFI_AP_PROCEDURE is defined below in related definitions. |
[in] | TimeoutInMicroseconds | Indicates the time limit in microseconds for the APs to finish execution of Procedure, either for blocking or non-blocking mode. Zero means infinity. If the timeout expires before all APs return from Procedure, then Procedure on the failed APs is terminated. If the timeout expires in blocking mode, the call returns EFI_TIMEOUT. If the timeout expires in non-blocking mode, the timeout determined can be through CheckOnProcedure or WaitForProcedure. Note that timeout support is optional. Whether an implementation supports this feature can be determined via the Attributes data member. |
[in,out] | ProcedureArguments | Allows the caller to pass a list of parameters to the code that is run by the AP. It is an optional common mailbox between APs and the caller to share information. |
[in,out] | Token | This is parameter is broken into two components: 1.Token->Completion is an optional parameter that allows the caller to execute the procedure in a blocking or non-blocking fashion. If it is NULL the call is blocking, and the call will not return until the AP has completed the procedure. If the token is not NULL, the call will return immediately. The caller can check whether the procedure has completed with CheckOnProcedure or WaitForProcedure. 2.Token->Status The implementation updates the address pointed at by this variable with the status code returned by Procedure when it completes execution on the target AP, or with EFI_TIMEOUT if the Procedure fails to complete within the optional timeout. The implementation will update this variable with EFI_NOT_READY prior to starting Procedure on the target AP |
[in,out] | CPUStatus | This optional pointer may be used to get the individual status returned by every AP that participated in the broadcast. This parameter if used provides the base address of an array to hold the EFI_STATUS value of each AP in the system. The size of the array can be ascertained by the GetNumberOfProcessors function. As mentioned above, the broadcast may not include every processor in the system. Some implementations may exclude processors that have been powered down in such a way that they are not responsive to interrupts. Additionally the broadcast excludes the processor which is making the BroadcastProcedure call. For every excluded processor, the array entry must contain a value of EFI_NOT_STARTED |
EFI_SUCCESS | In the blocking case, this indicates that Procedure has completed execution on the APs. In the non-blocking case this indicates that the procedure has been successfully scheduled for execution on the APs. |
EFI_INVALID_PARAMETER | Procedure or Token is NULL. |
EFI_NOT_READY | If a target AP is busy executing another procedure. |
EFI_TIMEOUT | In blocking mode, the timeout expired before all enabled APs have finished. |
EFI_ALREADY_STARTED | Before the AP procedure associated with the Token is finished, the same Token cannot be used to dispatch or broadcast another procedure. |
This service allows the caller to set a startup procedure that will be executed when an AP powers up from a state where core configuration and context is lost. The procedure is execution has the following properties:
[in] | This | The EFI_MM_MP_PROTOCOL instance. |
[in] | Procedure | A pointer to the code stream to be run on the designated target AP of the system. Type EFI_AP_PROCEDURE is defined below in Volume 2 with the related definitions of EFI_MP_SERVICES_PROTOCOL.StartupAllAPs. If caller may pass a value of NULL to deregister any existing startup procedure. |
[in,out] | ProcedureArguments | Allows the caller to pass a list of parameters to the code that is run by the AP. It is an optional common mailbox between APs and the caller to share information |
EFI_SUCCESS | The Procedure has been set successfully. |
EFI_INVALID_PARAMETER | The Procedure is NULL. |
When non-blocking execution of a procedure on an AP is invoked with DispatchProcedure, via the use of a token, this function can be used to check for completion of the procedure on the AP. The function takes the token that was passed into the DispatchProcedure call. If the procedure is complete, and therefore it is now possible to run another procedure on the same AP, this function returns EFI_SUCESS. In this case the status returned by the procedure that executed on the AP is returned in the token's Status field. If the procedure has not yet completed, then this function returns EFI_NOT_READY.
When a non-blocking execution of a procedure is invoked with BroadcastProcedure, via the use of a token, this function can be used to check for completion of the procedure on all the broadcast APs. The function takes the token that was passed into the BroadcastProcedure call. If the procedure is complete on all broadcast APs this function returns EFI_SUCESS. In this case the Status field in the token passed into the function reflects the overall result of the invocation, which may be EFI_SUCCESS, if all executions succeeded, or the first observed failure. If the procedure has not yet completed on the broadcast APs, the function returns EFI_NOT_READY.
[in] | This | The EFI_MM_MP_PROTOCOL instance. |
[in] | Token | This parameter describes the token that was passed into DispatchProcedure or BroadcastProcedure. |
EFI_SUCCESS | Procedure has completed. |
EFI_NOT_READY | The Procedure has not completed. |
EFI_INVALID_PARAMETER | Token or Token->Completion is NULL |
EFI_NOT_FOUND | Token is not currently in use for a non-blocking call |
When a non-blocking execution of a procedure on an AP is invoked via DispatchProcedure, this function will block the caller until the remote procedure has completed on the designated AP. The non-blocking procedure invocation is identified by the Token parameter, which must match the token that used when DispatchProcedure was called. Upon completion the status returned by the procedure that executed on the AP is used to update the token's Status field.
When a non-blocking execution of a procedure on an AP is invoked via BroadcastProcedure this function will block the caller until the remote procedure has completed on all of the APs that entered MM. The non-blocking procedure invocation is identified by the Token parameter, which must match the token that used when BroadcastProcedure was called. Upon completion the overall status returned by the procedures that executed on the broadcast AP is used to update the token's Status field. The overall status may be EFI_SUCCESS, if all executions succeeded, or the first observed failure.
[in] | This | The EFI_MM_MP_PROTOCOL instance. |
[in] | Token | This parameter describes the token that was passed into DispatchProcedure or BroadcastProcedure. |
EFI_SUCCESS | Procedure has completed. |
EFI_INVALID_PARAMETER | Token or Token->Completion is NULL |
EFI_NOT_FOUND | Token is not currently in use for a non-blocking call |
Erase a specified number of device blocks.
[in] | This | Indicates a pointer to the calling context. |
[in] | MediaId | The media ID that the erase request is for. |
[in] | LBA | The starting logical block address to be erased. The caller is responsible for erasing only legitimate locations. |
[in,out] | Token | A pointer to the token associated with the transaction. |
[in] | Size | The size in bytes to be erased. This must be a multiple of the physical block size of the device. |
EFI_SUCCESS | The erase request was queued if Event is not NULL. The data was erased correctly to the device if the Event is NULL.to the device. |
EFI_WRITE_PROTECTED | The device cannot be erased due to write protection. |
EFI_DEVICE_ERROR | The device reported an error while attempting to perform the erase operation. |
EFI_INVALID_PARAMETER | The erase request contains LBAs that are not valid. |
EFI_NO_MEDIA | There is no media in the device. |
EFI_MEDIA_CHANGED | The MediaId is not for the current media. |
Queue an I2C transaction for execution on the I2C device.
This routine must be called at or below TPL_NOTIFY. For synchronous requests this routine must be called at or below TPL_CALLBACK.
This routine queues an I2C transaction to the I2C controller for execution on the I2C bus.
When Event is NULL, QueueRequest() operates synchronously and returns the I2C completion status as its return value.
When Event is not NULL, QueueRequest() synchronously returns EFI_SUCCESS indicating that the asynchronous I2C transaction was queued. The values above are returned in the buffer pointed to by I2cStatus upon the completion of the I2C transaction when I2cStatus is not NULL.
The upper layer driver writer provides the following to the platform vendor:
[in] | This | Pointer to an EFI_I2C_IO_PROTOCOL structure. |
[in] | SlaveAddressIndex | Index value into an array of slave addresses for the I2C device. The values in the array are specified by the board designer, with the third party I2C device driver writer providing the slave address order. |
For devices that have a single slave address, this value must be zero. If the I2C device uses more than one slave address then the third party (upper level) I2C driver writer needs to specify the order of entries in the slave address array.
Third Party I2C Drivers" section in I2cMaster.h.
[in] | Event | Event to signal for asynchronous transactions, NULL for synchronous transactions |
[in] | RequestPacket | Pointer to an EFI_I2C_REQUEST_PACKET structure describing the I2C transaction |
[out] | I2cStatus | Optional buffer to receive the I2C transaction completion status |
EFI_SUCCESS | The asynchronous transaction was successfully queued when Event is not NULL. |
EFI_SUCCESS | The transaction completed successfully when Event is NULL. |
EFI_BAD_BUFFER_SIZE | The RequestPacket->LengthInBytes value is too large. |
EFI_DEVICE_ERROR | There was an I2C error (NACK) during the transaction. |
EFI_INVALID_PARAMETER | RequestPacket is NULL. |
EFI_NO_MAPPING | The EFI_I2C_HOST_PROTOCOL could not set the bus configuration required to access this I2C device. |
EFI_NO_RESPONSE | The I2C device is not responding to the slave address selected by SlaveAddressIndex. EFI_DEVICE_ERROR will be returned if the controller cannot distinguish when the NACK occurred. |
EFI_OUT_OF_RESOURCES | Insufficient memory for I2C transaction |
EFI_UNSUPPORTED | The controller does not support the requested transaction. |
Returns information about what USB port type was attached.
[in] | This | A pointer to the EFI_USBFN_IO_PROTOCOL instance. |
[out] | PortType | Returns the USB port type. |
EFI_SUCCESS | The function returned successfully. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_DEVICE_ERROR | The physical device reported an error. |
EFI_NOT_READY | The physical device is busy or not ready to process this request or there is no USB port attached to the device. |
Configures endpoints based on supplied device and configuration descriptors.
Assuming that the hardware has already been initialized, this function configures the endpoints using the device information supplied by DeviceInfo, activates the port, and starts receiving USB events.
This function must ignore the bMaxPacketSize0field of the Standard Device Descriptor and the wMaxPacketSize field of the Standard Endpoint Descriptor that are made available through DeviceInfo.
[in] | This | A pointer to the EFI_USBFN_IO_PROTOCOL instance. |
[out] | DeviceInfo | A pointer to EFI_USBFN_DEVICE_INFO instance. |
EFI_SUCCESS | The function returned successfully. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_DEVICE_ERROR | The physical device reported an error. |
EFI_NOT_READY | The physical device is busy or not ready to process this request. |
EFI_OUT_OF_RESOURCES | The request could not be completed due to lack of resources. |
Returns the maximum packet size of the specified endpoint type for the supplied bus speed.
If the BusSpeed is UsbBusSpeedUnknown, the maximum speed the underlying controller supports is assumed.
This protocol currently does not support isochronous or interrupt transfers. Future revisions of this protocol may eventually support it.
[in] | This | A pointer to the EFI_USBFN_IO_PROTOCOLinstance. |
[in] | EndpointType | Endpoint type as defined as EFI_USB_ENDPOINT_TYPE. |
[in] | BusSpeed | Bus speed as defined as EFI_USB_BUS_SPEED. |
[out] | MaxPacketSize | The maximum packet size, in bytes, of the specified endpoint type. |
EFI_SUCCESS | The function returned successfully. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_DEVICE_ERROR | The physical device reported an error. |
EFI_NOT_READY | The physical device is busy or not ready to process this request. |
Returns device specific information based on the supplied identifier as a Unicode string.
If the supplied Buffer isn't large enough, or is NULL, the method fails with EFI_BUFFER_TOO_SMALL and the required size is returned through BufferSize. All returned strings are in Unicode format.
An Id of EfiUsbDeviceInfoUnknown is treated as an invalid parameter.
[in] | This | A pointer to the EFI_USBFN_IO_PROTOCOLinstance. |
[in] | Id | The requested information id. |
[in] | BufferSize | On input, the size of the Buffer in bytes. On output, the amount of data returned in Buffer in bytes. |
[out] | Buffer | A pointer to a buffer to returnthe requested information as a Unicode string. |
EFI_SUCCESS | The function returned successfully. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: BufferSize is NULL. BufferSize is not 0 and Buffer is NULL. Id in invalid. |
EFI_DEVICE_ERROR | The physical device reported an error. |
EFI_BUFFER_TOO_SMALL | The buffer is too small to hold the buffer. BufferSize has been updated with the size needed to hold the request string. |
Returns the vendor-id and product-id of the device.
[in] | This | A pointer to the EFI_USBFN_IO_PROTOCOL instance. |
[out] | Vid | Returned vendor-id of the device. |
[out] | Pid | Returned product-id of the device. |
EFI_SUCCESS | The function returned successfully. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_NOT_FOUND | Unable to return the vendor-id or the product-id. |
Aborts the transfer on the specified endpoint.
This function should fail with EFI_INVALID_PARAMETER if the specified direction is incorrect for the endpoint.
[in] | This | A pointer to the EFI_USBFN_IO_PROTOCOL instance. |
[in] | EndpointIndex | Indicates the endpoint on which the ongoing transfer needs to be canceled. |
[in] | Direction | Direction of the endpoint. |
EFI_SUCCESS | The function returned successfully. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_DEVICE_ERROR | The physical device reported an error. |
EFI_NOT_READY | The physical device is busy or not ready to process this request. |
Returns the stall state on the specified endpoint.
This function should fail with EFI_INVALID_PARAMETER if the specified direction is incorrect for the endpoint.
[in] | This | A pointer to the EFI_USBFN_IO_PROTOCOL instance. |
[in] | EndpointIndex | Indicates the endpoint. |
[in] | Direction | Direction of the endpoint. |
[in,out] | State | Boolean, true value indicates that the endpoint is in a stalled state, false otherwise. |
EFI_SUCCESS | The function returned successfully. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_DEVICE_ERROR | The physical device reported an error. |
EFI_NOT_READY | The physical device is busy or not ready to process this request. |
Sets or clears the stall state on the specified endpoint.
This function should fail with EFI_INVALID_PARAMETER if the specified direction is incorrect for the endpoint.
[in] | This | A pointer to the EFI_USBFN_IO_PROTOCOL instance. |
[in] | EndpointIndex | Indicates the endpoint. |
[in] | Direction | Direction of the endpoint. |
[in] | State | Requested stall state on the specified endpoint. True value causes the endpoint to stall; false value clears an existing stall. |
EFI_SUCCESS | The function returned successfully. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_DEVICE_ERROR | The physical device reported an error. |
EFI_NOT_READY | The physical device is busy or not ready to process this request. |
This function is called repeatedly to get information on USB bus states, receive-completion and transmit-completion events on the endpoints, and notification on setup packet on endpoint 0.
A class driver must call EFI_USBFN_IO_PROTOCOL.EventHandler()repeatedly to receive updates on the transfer status and number of bytes transferred on various endpoints.
[in] | This | A pointer to the EFI_USBFN_IO_PROTOCOL instance. |
[out] | Message | Indicates the event that initiated this notification. |
[in,out] | PayloadSize | On input, the size of the memory pointed by Payload. On output, the amount ofdata returned in Payload. |
[out] | Payload | A pointer to EFI_USBFN_MESSAGE_PAYLOAD instance to return additional payload for current message. |
EFI_SUCCESS | The function returned successfully. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_DEVICE_ERROR | The physical device reported an error. |
EFI_NOT_READY | The physical device is busy or not ready to process this request. |
EFI_BUFFER_TOO_SMALL | The Supplied buffer is not large enough to hold the message payload. |
This function handles transferring data to or from the host on the specified endpoint, depending on the direction specified.
A class driver must call EFI_USBFN_IO_PROTOCOL.EventHandler() repeatedly to receive updates on the transfer status and the number of bytes transferred on various endpoints. Upon an update of the transfer status, the Buffer field of the EFI_USBFN_TRANSFER_RESULT structure (as described in the function description for EFI_USBFN_IO_PROTOCOL.EventHandler()) must be initialized with the Buffer pointer that was supplied to this method.
The overview of the call sequence is illustrated in the Figure 54.
This function should fail with EFI_INVALID_PARAMETER if the specified direction is incorrect for the endpoint.
[in] | This | A pointer to the EFI_USBFN_IO_PROTOCOL instance. |
[in] | EndpointIndex | Indicates the endpoint on which TX or RX transfer needs to take place. |
[in] | Direction | Direction of the endpoint. |
[in,out] | BufferSize | If Direction is EfiUsbEndpointDirectionDeviceRx: On input, the size of the Bufferin bytes. On output, the amount of data returned in Buffer in bytes. If Direction is EfiUsbEndpointDirectionDeviceTx: On input, the size of the Bufferin bytes. On output, the amount of data transmitted in bytes. |
[in,out] | Buffer | If Direction is EfiUsbEndpointDirectionDeviceRx: The Buffer to return the received data. If Directionis EfiUsbEndpointDirectionDeviceTx: The Buffer that contains the data to be transmitted. |
EFI_SUCCESS | The function returned successfully. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_DEVICE_ERROR | The physical device reported an error. |
EFI_NOT_READY | The physical device is busy or not ready to process this request. |
Returns the maximum supported transfer size.
Returns the maximum number of bytes that the underlying controller can accommodate in a single transfer.
[in] | This | A pointer to the EFI_USBFN_IO_PROTOCOL instance. |
[out] | MaxTransferSize | The maximum supported transfer size, in bytes. |
EFI_SUCCESS | The function returned successfully. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_DEVICE_ERROR | The physical device reported an error. |
EFI_NOT_READY | The physical device is busy or not ready to process this request. |
Allocates a transfer buffer of the specified sizethat satisfies the controller requirements.
The AllocateTransferBuffer() function allocates a memory region of Size bytes and returns the address of the allocated memory that satisfies the underlying controller requirements in the location referenced by Buffer.
The allocated transfer buffer must be freed using a matching call to EFI_USBFN_IO_PROTOCOL.FreeTransferBuffer()function.
[in] | This | A pointer to the EFI_USBFN_IO_PROTOCOL instance. |
[in] | Size | The number of bytes to allocate for the transfer buffer. |
[out] | Buffer | A pointer to a pointer to the allocated buffer if the call succeeds; undefined otherwise. |
EFI_SUCCESS | The function returned successfully. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_OUT_OF_RESOURCES | The requested transfer buffer could not be allocated. |
Deallocates the memory allocated for the transfer buffer by the EFI_USBFN_IO_PROTOCOL.AllocateTransferBuffer() function.
The EFI_USBFN_IO_PROTOCOL.FreeTransferBuffer() function deallocates the memory specified by Buffer. The Buffer that is freed must have been allocated by EFI_USBFN_IO_PROTOCOL.AllocateTransferBuffer().
[in] | This | A pointer to the EFI_USBFN_IO_PROTOCOL instance. |
[in] | Buffer | A pointer to the transfer buffer to deallocate. |
EFI_SUCCESS | The function returned successfully. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
This function supplies power to the USB controller if needed and initializes the hardware and the internal data structures. The port must not be activated by this function.
[in] | This | A pointer to the EFI_USBFN_IO_PROTOCOL instance. |
EFI_SUCCESS | The function returned successfully. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_DEVICE_ERROR | The physical device reported an error. |
This function stops the USB hardware device.
[in] | This | A pointer to the EFI_USBFN_IO_PROTOCOL instance. |
EFI_SUCCESS | The function returned successfully. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_DEVICE_ERROR | The physical device reported an error. |
This function sets the configuration policy for the specified non-control endpoint.
This function can only be called before EFI_USBFN_IO_PROTOCOL.StartController() or after EFI_USBFN_IO_PROTOCOL.StopController() has been called.
[in] | This | A pointer to the EFI_USBFN_IO_PROTOCOL instance. |
[in] | EndpointIndex | Indicates the non-control endpoint for which the policy needs to be set. |
[in] | Direction | Direction of the endpoint. |
[in] | PolicyType | Policy type the user is trying to set for the specified non-control endpoint. |
[in] | BufferSize | The size of the Bufferin bytes. |
[in] | Buffer | The new value for the policy parameter that PolicyType specifies. |
EFI_SUCCESS | The function returned successfully. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_DEVICE_ERROR | The physical device reported an error. |
EFI_UNSUPPORTED | Changing this policy value is not supported. |
This function sets the configuration policy for the specified non-control endpoint.
This function can only be called before EFI_USBFN_IO_PROTOCOL.StartController() or after EFI_USBFN_IO_PROTOCOL.StopController() has been called.
[in] | This | A pointer to the EFI_USBFN_IO_PROTOCOL instance. |
[in] | EndpointIndex | Indicates the non-control endpoint for which the policy needs to be set. |
[in] | Direction | Direction of the endpoint. |
[in] | PolicyType | Policy type the user is trying to retrieve for the specified non-control endpoint. |
[in,out] | BufferSize | On input, the size of Bufferin bytes. On output, the amount of data returned in Bufferin bytes. |
[in,out] | Buffer | A pointer to a buffer to return requested endpoint policy value. |
EFI_SUCCESS | The function returned successfully. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_DEVICE_ERROR | The specified policy value is not supported. |
EFI_BUFFER_TOO_SMALL | Supplied buffer is not large enough to hold requested policy value. |
Terminate outstanding asynchronous requests to a device.
This | Indicates a pointer to the calling context. |
EFI_SUCCESS | All outstanding requests were successfully terminated. |
EFI_DEVICE_ERROR | The device reported an error while performing the cancel operation. |
Reads a specified number of bytes from a device.
This | Indicates a pointer to the calling context. |
MediaId | ID of the medium to be read. |
Offset | The starting byte offset on the logical block I/O device to read from. |
Token | A pointer to the token associated with the transaction. If this field is NULL, synchronous/blocking IO is performed. |
BufferSize | The size in bytes of Buffer. The number of bytes to read from the device. |
Buffer | A pointer to the destination buffer for the data. The caller is responsible either having implicit or explicit ownership of the buffer. |
EFI_SUCCESS | If Event is NULL (blocking I/O): The data was read correctly from the device. If Event is not NULL (asynchronous I/O): The request was successfully queued for processing. Event will be signaled upon completion. |
EFI_DEVICE_ERROR | The device reported an error while performing the write. |
EFI_NO_MEDIA | There is no medium in the device. |
EFI_MEDIA_CHNAGED | The MediaId is not for the current medium. |
EFI_INVALID_PARAMETER | The read request contains device addresses that are not valid for the device. |
EFI_OUT_OF_RESOURCES | The request could not be completed due to a lack of resources. |
Writes a specified number of bytes to a device.
This | Indicates a pointer to the calling context. |
MediaId | ID of the medium to be written. |
Offset | The starting byte offset on the logical block I/O device to write to. |
Token | A pointer to the token associated with the transaction. If this field is NULL, synchronous/blocking IO is performed. |
BufferSize | The size in bytes of Buffer. The number of bytes to write to the device. |
Buffer | A pointer to the buffer containing the data to be written. |
EFI_SUCCESS | If Event is NULL (blocking I/O): The data was written correctly to the device. If Event is not NULL (asynchronous I/O): The request was successfully queued for processing. Event will be signaled upon completion. |
EFI_WRITE_PROTECTED | The device cannot be written to. |
EFI_DEVICE_ERROR | The device reported an error while performing the write operation. |
EFI_NO_MEDIA | There is no medium in the device. |
EFI_MEDIA_CHNAGED | The MediaId is not for the current medium. |
EFI_INVALID_PARAMETER | The write request contains device addresses that are not valid for the device. |
EFI_OUT_OF_RESOURCES | The request could not be completed due to a lack of resources. |
Flushes all modified data to the physical device.
This | Indicates a pointer to the calling context. |
MediaId | ID of the medium to be written. |
Token | A pointer to the token associated with the transaction. If this field is NULL, synchronous/blocking IO is performed. |
EFI_SUCCESS | If Event is NULL (blocking I/O): The data was flushed successfully to the device. If Event is not NULL (asynchronous I/O): The request was successfully queued for processing. Event will be signaled upon completion. |
EFI_WRITE_PROTECTED | The device cannot be written to. |
EFI_DEVICE_ERROR | The device reported an error while performing the write operation. |
EFI_NO_MEDIA | There is no medium in the device. |
EFI_MEDIA_CHNAGED | The MediaId is not for the current medium. |
EFI_OUT_OF_RESOURCES | The request could not be completed due to a lack of resources. |
Set EAP configuration data.
The SetData() function sets EAP configuration to non-volatile storage or volatile storage.
[in] | This | Pointer to the EFI_EAP_CONFIGURATION_PROTOCOL instance. |
[in] | EapType | EAP type. |
[in] | DataType | Configuration data type. |
[in] | Data | Pointer to configuration data. |
[in] | DataSize | Total size of configuration data. |
EFI_SUCCESS | The EAP configuration data is set successfully. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: Data is NULL. DataSize is 0. |
EFI_UNSUPPORTED | The EapType or DataType is unsupported. |
EFI_OUT_OF_RESOURCES | Required system resources could not be allocated. |
Get EAP configuration data.
The GetData() function gets EAP configuration.
[in] | This | Pointer to the EFI_EAP_CONFIGURATION_PROTOCOL instance. |
[in] | EapType | EAP type. |
[in] | DataType | Configuration data type. |
[in,out] | Data | Pointer to configuration data. |
[in,out] | DataSize | Total size of configuration data. On input, it means the size of Data buffer. On output, it means the size of copied Data buffer if EFI_SUCCESS, and means the size of desired Data buffer if EFI_BUFFER_TOO_SMALL. |
EFI_SUCCESS | The EAP configuration data is got successfully. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: Data is NULL. DataSize is NULL. |
EFI_UNSUPPORTED | The EapType or DataType is unsupported. |
EFI_NOT_FOUND | The EAP configuration data is not found. |
EFI_BUFFER_TOO_SMALL | The buffer is too small to hold the buffer. |
Processes a buffer containing binary DER-encoded PKCS7 signature. The signed data content may be embedded within the buffer or separated. Funtion verifies the signature of the content is valid and signing certificate was not revoked and is contained within a list of trusted signers.
[in] | This | Pointer to EFI_PKCS7_VERIFY_PROTOCOL instance. |
[in] | SignedData | Points to buffer containing ASN.1 DER-encoded PKCS7 signature. |
[in] | SignedDataSize | The size of SignedData buffer in bytes. |
[in] | InData | In case of detached signature, InData points to buffer containing the raw message data previously signed and to be verified by function. In case of SignedData containing embedded data, InData must be NULL. |
[in] | InDataSize | When InData is used, the size of InData buffer in bytes. When InData is NULL. This parameter must be 0. |
[in] | AllowedDb | Pointer to a list of pointers to EFI_SIGNATURE_LIST structures. The list is terminated by a null pointer. The EFI_SIGNATURE_LIST structures contain lists of X.509 certificates of approved signers. Function recognizes signer certificates of type EFI_CERT_X509_GUID. Any hash certificate in AllowedDb list is ignored by this function. Function returns success if signer of the buffer is within this list (and not within RevokedDb). This parameter is required. |
[in] | RevokedDb | Optional pointer to a list of pointers to EFI_SIGNATURE_LIST structures. The list is terminated by a null pointer. List of X.509 certificates of revoked signers and revoked file hashes. Except as noted in description of TimeStampDb signature verification will always fail if the signer of the file or the hash of the data component of the buffer is in RevokedDb list. This list is optional and caller may pass Null or pointer to NULL if not required. |
[in] | TimeStampDb | Optional pointer to a list of pointers to EFI_SIGNATURE_LIST structures. The list is terminated by a null pointer. This parameter can be used to pass a list of X.509 certificates of trusted time stamp signers. This list is optional and caller must pass Null or pointer to NULL if not required. |
[out] | Content | On input, points to an optional caller-allocated buffer into which the function will copy the content portion of the file after verification succeeds. This parameter is optional and if NULL, no copy of content from file is performed. |
[in,out] | ContentSize | On input, points to the size in bytes of the optional buffer Content previously allocated by caller. On output, if the verification succeeds, the value referenced by ContentSize will contain the actual size of the content from signed file. If ContentSize indicates the caller-allocated buffer is too small to contain content, an error is returned, and ContentSize will be updated with the required size. This parameter must be 0 if Content is Null. |
EFI_SUCCESS | Content signature was verified against hash of content, the signer's certificate was not found in RevokedDb, and was found in AllowedDb or if in signer is found in both AllowedDb and RevokedDb, the signing was allowed by reference to TimeStampDb as described above, and no hash matching content hash was found in RevokedDb. |
EFI_SECURITY_VIOLATION | The SignedData buffer was correctly formatted but signer was in RevokedDb or not in AllowedDb. Also returned if matching content hash found in RevokedDb. |
EFI_COMPROMISED_DATA | Calculated hash differs from signed hash. |
EFI_INVALID_PARAMETER | SignedData is NULL or SignedDataSize is zero. AllowedDb is NULL. |
EFI_INVALID_PARAMETER | Content is not NULL and ContentSize is NULL. |
EFI_ABORTED | Unsupported or invalid format in TimeStampDb, RevokedDb or AllowedDb list contents was detected. |
EFI_NOT_FOUND | Content not found because InData is NULL and no content embedded in SignedData. |
EFI_UNSUPPORTED | The SignedData buffer was not correctly formatted for processing by the function. |
EFI_UNSUPPORTED | Signed data embedded in SignedData but InData is not NULL. |
EFI_BUFFER_TOO_SMALL | The size of buffer indicated by ContentSize is too small to hold the content. ContentSize updated to required size. |
Processes a buffer containing binary DER-encoded detached PKCS7 signature. The hash of the signed data content is calculated and passed by the caller. Function verifies the signature of the content is valid and signing certificate was not revoked and is contained within a list of trusted signers.
Note: because this function uses hashes and the specification contains a variety of hash choices, you should be aware that the check against the RevokedDb list will improperly succeed if the signature is revoked using a different hash algorithm. For this reason, you should either cycle through all UEFI supported hashes to see if one is forbidden, or rely on a single hash choice only if the UEFI signature authority only signs and revokes with a single hash (at time of writing, this hash choice is SHA256).
[in] | This | Pointer to EFI_PKCS7_VERIFY_PROTOCOL instance. |
[in] | Signature | Points to buffer containing ASN.1 DER-encoded PKCS detached signature. |
[in] | SignatureSize | The size of Signature buffer in bytes. |
[in] | InHash | InHash points to buffer containing the caller calculated hash of the data. The parameter may not be NULL. |
[in] | InHashSize | The size in bytes of InHash buffer. |
[in] | AllowedDb | Pointer to a list of pointers to EFI_SIGNATURE_LIST structures. The list is terminated by a null pointer. The EFI_SIGNATURE_LIST structures contain lists of X.509 certificates of approved signers. Function recognizes signer certificates of type EFI_CERT_X509_GUID. Any hash certificate in AllowedDb list is ignored by this function. Function returns success if signer of the buffer is within this list (and not within RevokedDb). This parameter is required. |
[in] | RevokedDb | Optional pointer to a list of pointers to EFI_SIGNATURE_LIST structures. The list is terminated by a null pointer. List of X.509 certificates of revoked signers and revoked file hashes. Signature verification will always fail if the signer of the file or the hash of the data component of the buffer is in RevokedDb list. This parameter is optional and caller may pass Null if not required. |
[in] | TimeStampDb | Optional pointer to a list of pointers to EFI_SIGNATURE_LIST structures. The list is terminated by a null pointer. This parameter can be used to pass a list of X.509 certificates of trusted time stamp counter-signers. |
EFI_SUCCESS | Signed hash was verified against caller-provided hash of content, the signer's certificate was not found in RevokedDb, and was found in AllowedDb or if in signer is found in both AllowedDb and RevokedDb, the signing was allowed by reference to TimeStampDb as described above, and no hash matching content hash was found in RevokedDb. |
EFI_SECURITY_VIOLATION | The SignedData buffer was correctly formatted but signer was in RevokedDb or not in AllowedDb. Also returned if matching content hash found in RevokedDb. |
EFI_COMPROMISED_DATA | Caller provided hash differs from signed hash. Or, caller and encrypted hash are different sizes. |
EFI_INVALID_PARAMETER | Signature is NULL or SignatureSize is zero. InHash is NULL or InHashSize is zero. AllowedDb is NULL. |
EFI_ABORTED | Unsupported or invalid format in TimeStampDb, RevokedDb or AllowedDb list contents was detected. |
EFI_UNSUPPORTED | The Signature buffer was not correctly formatted for processing by the function. |
The Request() function queues an HTTP request to this HTTP instance, similar to Transmit() function in the EFI TCP driver. When the HTTP request is sent successfully, or if there is an error, Status in token will be updated and Event will be signaled.
[in] | This | Pointer to EFI_HTTP_PROTOCOL instance. |
[in] | Token | Pointer to storage containing HTTP request token. |
EFI_SUCCESS | Outgoing data was processed. |
EFI_NOT_STARTED | This EFI HTTP Protocol instance has not been started. |
EFI_DEVICE_ERROR | An unexpected system or network error occurred. |
EFI_TIMEOUT | Data was dropped out of the transmit or receive queue. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: This is NULL. Token is NULL. Token->Message is NULL. Token->Message->Body is not NULL, Token->Message->BodyLength is non-zero, and Token->Message->Data is NULL, but a previous call to Request()has not been completed successfully. |
EFI_OUT_OF_RESOURCES | Could not allocate enough system resources. |
EFI_UNSUPPORTED | The HTTP method is not supported in current implementation. |
The Response() function queues an HTTP response to this HTTP instance, similar to Receive() function in the EFI TCP driver. When the HTTP Response is received successfully, or if there is an error, Status in token will be updated and Event will be signaled.
The HTTP driver will queue a receive token to the underlying TCP instance. When data is received in the underlying TCP instance, the data will be parsed and Token will be populated with the response data. If the data received from the remote host contains an incomplete or invalid HTTP header, the HTTP driver will continue waiting (asynchronously) for more data to be sent from the remote host before signaling Event in Token.
It is the responsibility of the caller to allocate a buffer for Body and specify the size in BodyLength. If the remote host provides a response that contains a content body, up to BodyLength bytes will be copied from the receive buffer into Body and BodyLength will be updated with the amount of bytes received and copied to Body. This allows the client to download a large file in chunks instead of into one contiguous block of memory. Similar to HTTP request, if Body is not NULL and BodyLength is non-zero and all other fields are NULL or 0, the HTTP driver will queue a receive token to underlying TCP instance. If data arrives in the receive buffer, up to BodyLength bytes of data will be copied to Body. The HTTP driver will then update BodyLength with the amount of bytes received and copied to Body.
If the HTTP driver does not have an open underlying TCP connection with the host specified in the response URL, Request() will return EFI_ACCESS_DENIED. This is consistent with RFC 2616 recommendation that HTTP clients should attempt to maintain an open TCP connection between client and host.
[in] | This | Pointer to EFI_HTTP_PROTOCOL instance. |
[in] | Token | Pointer to storage containing HTTP response token. |
EFI_SUCCESS | Allocation succeeded. |
EFI_NOT_STARTED | This EFI HTTP Protocol instance has not been initialized. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: This is NULL. Token is NULL. Token->Message->Headers is NULL. Token->Message is NULL. Token->Message->Body is not NULL, Token->Message->BodyLength is non-zero, and Token->Message->Data is NULL, but a previous call to Response() has not been completed successfully. |
EFI_OUT_OF_RESOURCES | Could not allocate enough system resources. |
EFI_ACCESS_DENIED | An open TCP connection is not present with the host specified by response URL. |
The Poll() function can be used by network drivers and applications to increase the rate that data packets are moved between the communication devices and the transmit and receive queues.
In some systems, the periodic timer event in the managed network driver may not poll the underlying communications device fast enough to transmit and/or receive all data packets without missing incoming packets or dropping outgoing packets. Drivers and applications that are experiencing packet loss should try calling the Poll() function more often.
[in] | This | Pointer to EFI_HTTP_PROTOCOL instance. |
EFI_SUCCESS | Incoming or outgoing data was processed.. |
EFI_DEVICE_ERROR | An unexpected system or network error occurred |
EFI_INVALID_PARAMETER | This is NULL. |
EFI_NOT_READY | No incoming or outgoing data is processed. |
EFI_NOT_STARTED | This EFI HTTP Protocol instance has not been started. |
Read or write specified device descriptor of a UFS device.
The service is used to read/write UFS device descriptors. The consumer of this API is responsible for allocating the data buffer pointed by Descriptor.
[in] | This | The pointer to the EFI_UFS_DEVICE_CONFIG_PROTOCOL instance. |
[in] | Read | The boolean variable to show r/w direction. |
[in] | DescId | The ID of device descriptor. |
[in] | Index | The Index of device descriptor. |
[in] | Selector | The Selector of device descriptor. |
[in,out] | Descriptor | The buffer of device descriptor to be read or written. |
[in,out] | DescSize | The size of device descriptor buffer. On input, the size, in bytes, of the data buffer specified by Descriptor. On output, the number of bytes that were actually transferred. |
EFI_SUCCESS | The device descriptor is read/written successfully. |
EFI_INVALID_PARAMETER | This is NULL or Descriptor is NULL or DescSize is NULL. DescId, Index and Selector are invalid combination to point to a type of UFS device descriptor. |
EFI_DEVICE_ERROR | The device descriptor is not read/written successfully. |
Read or write specified flag of a UFS device.
The service is used to read/write UFS flag descriptors. The consumer of this API is responsible for allocating the buffer pointed by Flag. The buffer size is 1 byte as UFS flag descriptor is just a single Boolean value that represents a TRUE or FALSE, '0' or '1', ON or OFF type of value.
[in] | This | The pointer to the EFI_UFS_DEVICE_CONFIG_PROTOCOL instance. |
[in] | Read | The boolean variable to show r/w direction. |
[in] | FlagId | The ID of flag to be read or written. |
[in,out] | Flag | The buffer to set or clear flag. |
EFI_SUCCESS | The flag descriptor is set/clear successfully. |
EFI_INVALID_PARAMETER | This is NULL or Flag is NULL. FlagId is an invalid UFS flag ID. |
EFI_DEVICE_ERROR | The flag is not set/clear successfully. |
Read or write specified attribute of a UFS device.
The service is used to read/write UFS attributes. The consumer of this API is responsible for allocating the data buffer pointed by Attribute.
[in] | This | The pointer to the EFI_UFS_DEVICE_CONFIG_PROTOCOL instance. |
[in] | Read | The boolean variable to show r/w direction. |
[in] | AttrId | The ID of Attribute. |
[in] | Index | The Index of Attribute. |
[in] | Selector | The Selector of Attribute. |
[in,out] | Attribute | The buffer of Attribute to be read or written. |
[in,out] | AttrSize | The size of Attribute buffer. On input, the size, in bytes, of the data buffer specified by Attribute. On output, the number of bytes that were actually transferred. |
EFI_SUCCESS | The attribute is read/written successfully. |
EFI_INVALID_PARAMETER | This is NULL or Attribute is NULL or AttrSize is NULL. AttrId, Index and Selector are invalid combination to point to a type of UFS attribute. |
EFI_DEVICE_ERROR | The attribute is not read/written successfully. |
Register a notification function to be called when ResetSystem() is called.
The RegisterResetNotify() function registers a notification function that is called when ResetSystem()is called and prior to completing the reset of the platform. The registered functions must not perform a platform reset themselves. These notifications are intended only for the notification of components which may need some special-purpose maintenance prior to the platform resetting. The list of registered reset notification functions are processed if ResetSystem()is called before ExitBootServices(). The list of registered reset notification functions is ignored if ResetSystem()is called after ExitBootServices().
[in] | This | A pointer to the EFI_RESET_NOTIFICATION_PROTOCOL instance. |
[in] | ResetFunction | Points to the function to be called when a ResetSystem() is executed. |
EFI_SUCCESS | The reset notification function was successfully registered. |
EFI_INVALID_PARAMETER | ResetFunction is NULL. |
EFI_OUT_OF_RESOURCES | There are not enough resources available to register the reset notification function. |
EFI_ALREADY_STARTED | The reset notification function specified by ResetFunction has already been registered. |
Unregister a notification function.
The UnregisterResetNotify() function removes the previously registered notification using RegisterResetNotify().
[in] | This | A pointer to the EFI_RESET_NOTIFICATION_PROTOCOL instance. |
[in] | ResetFunction | The pointer to the ResetFunction being unregistered. |
EFI_SUCCESS | The reset notification function was unregistered. |
EFI_INVALID_PARAMETER | ResetFunction is NULL. |
EFI_INVALID_PARAMETER | The reset notification function specified by ResetFunction was not previously registered using RegisterResetNotify(). |
Enumerate the I2C devices
This function enables the caller to traverse the set of I2C devices on an I2C bus.
[in] | This | The platform data for the next device on the I2C bus was returned successfully. |
[in,out] | Device | Pointer to a buffer containing an EFI_I2C_DEVICE structure. Enumeration is started by setting the initial EFI_I2C_DEVICE structure pointer to NULL. The buffer receives an EFI_I2C_DEVICE structure pointer to the next I2C device. |
EFI_SUCCESS | The platform data for the next device on the I2C bus was returned successfully. |
EFI_INVALID_PARAMETER | Device is NULL |
EFI_NO_MAPPING | *Device does not point to a valid EFI_I2C_DEVICE structure returned in a previous call Enumerate(). |
Get the requested I2C bus frequency for a specified bus configuration.
This function returns the requested I2C bus clock frequency for the I2cBusConfiguration. This routine is provided for diagnostic purposes and is meant to be called after calling Enumerate to get the I2cBusConfiguration value.
[in] | This | Pointer to an EFI_I2C_ENUMERATE_PROTOCOL structure. |
[in] | I2cBusConfiguration | I2C bus configuration to access the I2C device |
[out] | *BusClockHertz | Pointer to a buffer to receive the I2C bus clock frequency in Hertz |
EFI_SUCCESS | The I2C bus frequency was returned successfully. |
EFI_INVALID_PARAMETER | BusClockHertz was NULL |
EFI_NO_MAPPING | Invalid I2cBusConfiguration value |
Request a survey of potential wireless networks that administrator can later elect to try to join.
[in] | This | Pointer to the EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL instance. |
[in] | Token | Pointer to the token for getting wireless network. |
EFI_SUCCESS | The operation started, and an event will eventually be raised for the caller. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: This is NULL. Token is NULL. |
EFI_UNSUPPORTED | One or more of the input parameters is not supported by this implementation. |
EFI_ALREADY_STARTED | The operation of getting wireless network is already started. |
EFI_OUT_OF_RESOURCES | Required system resources could not be allocated. |
Connect a wireless network specified by a particular SSID, BSS type and Security type.
[in] | This | Pointer to the EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL instance. |
[in] | Token | Pointer to the token for connecting wireless network. |
EFI_SUCCESS | The operation started successfully. Results will be notified eventually. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: This is NULL. Token is NULL. |
EFI_UNSUPPORTED | One or more of the input parameters are not supported by this implementation. |
EFI_ALREADY_STARTED | The connection process is already started. |
EFI_NOT_FOUND | The specified wireless network is not found. |
EFI_OUT_OF_RESOURCES | Required system resources could not be allocated. |
Request a disconnection with current connected wireless network.
[in] | This | Pointer to the EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL instance. |
[in] | Token | Pointer to the token for disconnecting wireless network. |
EFI_SUCCESS | The operation started successfully. Results will be notified eventually. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: This is NULL. Token is NULL. |
EFI_UNSUPPORTED | One or more of the input parameters are not supported by this implementation. |
EFI_NOT_FOUND | Not connected to a wireless network. |
EFI_OUT_OF_RESOURCES | Required system resources could not be allocated. |
Read the 3 byte manufacture and device ID from the SPI flash.
This routine must be called at or below TPL_NOTIFY. This routine reads the 3 byte manufacture and device ID from the flash part filling the buffer provided.
[in] | This | Pointer to an EFI_SPI_NOR_FLASH_PROTOCOL data structure. |
[out] | Buffer | Pointer to a 3 byte buffer to receive the manufacture and device ID. |
EFI_SUCCESS | The manufacture and device ID was read successfully. |
EFI_INVALID_PARAMETER | Buffer is NULL |
EFI_DEVICE_ERROR | Invalid data received from SPI flash part. |
Read data from the SPI flash.
This routine must be called at or below TPL_NOTIFY. This routine reads data from the SPI part in the buffer provided.
[in] | This | Pointer to an EFI_SPI_NOR_FLASH_PROTOCOL data structure. |
[in] | FlashAddress | Address in the flash to start reading |
[in] | LengthInBytes | Read length in bytes |
[out] | Buffer | Address of a buffer to receive the data |
EFI_SUCCESS | The data was read successfully. |
EFI_INVALID_PARAMETER | Buffer is NULL, or FlashAddress >= This->FlashSize, or LengthInBytes > This->FlashSize - FlashAddress |
Read the flash status register.
This routine must be called at or below TPL_NOTIFY. This routine reads the flash part status register.
[in] | This | Pointer to an EFI_SPI_NOR_FLASH_PROTOCOL data structure. |
[in] | LengthInBytes | Number of status bytes to read. |
[out] | FlashStatus | Pointer to a buffer to receive the flash status. |
EFI_SUCCESS | The status register was read successfully. |
Write the flash status register.
This routine must be called at or below TPL_N OTIFY. This routine writes the flash part status register.
[in] | This | Pointer to an EFI_SPI_NOR_FLASH_PROTOCOL data structure. |
[in] | LengthInBytes | Number of status bytes to write. |
[in] | FlashStatus | Pointer to a buffer containing the new status. |
EFI_SUCCESS | The status write was successful. |
EFI_OUT_OF_RESOURCES | Failed to allocate the write buffer. |
Write data to the SPI flash.
This routine must be called at or below TPL_NOTIFY. This routine breaks up the write operation as necessary to write the data to the SPI part.
[in] | This | Pointer to an EFI_SPI_NOR_FLASH_PROTOCOL data structure. |
[in] | FlashAddress | Address in the flash to start writing |
[in] | LengthInBytes | Write length in bytes |
[in] | Buffer | Address of a buffer containing the data |
EFI_SUCCESS | The data was written successfully. |
EFI_INVALID_PARAMETER | Buffer is NULL, or FlashAddress >= This->FlashSize, or LengthInBytes > This->FlashSize - FlashAddress |
EFI_OUT_OF_RESOURCES | Insufficient memory to copy buffer. |
Efficiently erases one or more 4KiB regions in the SPI flash.
This routine must be called at or below TPL_NOTIFY. This routine uses a combination of 4 KiB and larger blocks to erase the specified area.
[in] | This | Pointer to an EFI_SPI_NOR_FLASH_PROTOCOL data structure. |
[in] | FlashAddress | Address within a 4 KiB block to start erasing |
[in] | BlockCount | Number of 4 KiB blocks to erase |
EFI_SUCCESS | The erase was completed successfully. |
EFI_INVALID_PARAMETER | FlashAddress >= This->FlashSize, or BlockCount * 4 KiB > This->FlashSize - FlashAddress |
Host name to host address translation.
The HostNameToIp () function is used to translate the host name to host IP address. A type AAAA query is used to get the one or more IPv6 addresses for this host.
[in] | This | Pointer to EFI_DNS6_PROTOCOL instance. |
[in] | HostName | Host name. |
[in] | Token | Point to the completion token to translate host name to host address. |
EFI_SUCCESS | The operation completed successfully. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: This is NULL. Token is NULL. Token.Event is NULL. HostName is NULL or buffer contained unsupported characters. |
EFI_NO_MAPPING | There's no source address is available for use. |
EFI_ALREADY_STARTED | This Token is being used in another DNS session. |
EFI_NOT_STARTED | This instance has not been started. |
EFI_OUT_OF_RESOURCES | Failed to allocate needed resources. |
Host address to host name translation.
The IpToHostName () function is used to translate the host address to host name. A type PTR query is used to get the primary name of the host. Implementation can choose to support this function or not.
[in] | This | Pointer to EFI_DNS6_PROTOCOL instance. |
[in] | IpAddress | Ip Address. |
[in] | Token | Point to the completion token to translate host address to host name. |
EFI_SUCCESS | The operation completed successfully. |
EFI_UNSUPPORTED | This function is not supported. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: This is NULL. Token is NULL. Token.Event is NULL. IpAddress is not valid IP address. |
EFI_NO_MAPPING | There's no source address is available for use. |
EFI_NOT_STARTED | This instance has not been started. |
EFI_OUT_OF_RESOURCES | Failed to allocate needed resources. |
This function provides capability to retrieve arbitrary information from the DNS server.
This GeneralLookup() function retrieves arbitrary information from the DNS. The caller supplies a QNAME, QTYPE, and QCLASS, and all of the matching RRs are returned. All RR content (e.g., TTL) was returned. The caller need parse the returned RR to get required information. The function is optional. Implementation can choose to support it or not.
[in] | This | Pointer to EFI_DNS6_PROTOCOL instance. |
[in] | QName | Pointer to Query Name. |
[in] | QType | Query Type. |
[in] | QClass | Query Name. |
[in] | Token | Point to the completion token to retrieve arbitrary information. |
EFI_SUCCESS | The operation completed successfully. |
EFI_UNSUPPORTED | This function is not supported. Or the requested QType is not supported |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: This is NULL. Token is NULL. Token.Event is NULL. QName is NULL. |
EFI_NO_MAPPING | There's no source address is available for use. |
EFI_NOT_STARTED | This instance has not been started. |
EFI_OUT_OF_RESOURCES | Failed to allocate needed resources. |
This function is to update the DNS Cache.
The UpdateDnsCache() function is used to add/delete/modify DNS cache entry. DNS cache can be normally dynamically updated after the DNS resolve succeeds. This function provided capability to manually add/delete/modify the DNS cache.
[in] | This | Pointer to EFI_DNS6_PROTOCOL instance. |
[in] | DeleteFlag | If FALSE, this function is to add one entry to the DNS Cahce. If TRUE, this function will delete matching DNS Cache entry. |
[in] | Override | If TRUE, the maching DNS cache entry will be overwritten with the supplied parameter. If FALSE, EFI_ACCESS_DENIED will be returned if the entry to be added is already existed. |
[in] | DnsCacheEntry | Pointer to DNS Cache entry. |
EFI_SUCCESS | The operation completed successfully. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: This is NULL. DnsCacheEntry.HostName is NULL. DnsCacheEntry.IpAddress is NULL. DnsCacheEntry.Timeout is zero. |
EFI_ACCESS_DENIED | The DNS cache entry already exists and Override is not TRUE. |
EFI_OUT_OF_RESOURCE | Failed to allocate needed resources. |
Polls for incoming data packets and processes outgoing data packets.
The Poll() function can be used by network drivers and applications to increase the rate that data packets are moved between the communications device and the transmit and receive queues.
In some systems, the periodic timer event in the managed network driver may not poll the underlying communications device fast enough to transmit and/or receive all data packets without missing incoming packets or dropping outgoing packets. Drivers and applications that are experiencing packet loss should try calling the Poll() function more often.
[in] | This | Pointer to EFI_DNS6_PROTOCOL instance. |
EFI_SUCCESS | Incoming or outgoing data was processed. |
EFI_NOT_STARTED | This EFI DNS Protocol instance has not been started. |
EFI_INVALID_PARAMETER | This is NULL. |
EFI_NO_MAPPING | There is no source address is available for use. |
EFI_DEVICE_ERROR | An unexpected system or network error occurred. |
EFI_TIMEOUT | Data was dropped out of the transmit and/or receive queue. Consider increasing the polling rate. |
Abort an asynchronous DNS operation, including translation between IP and Host, and general look up behavior.
The Cancel() function is used to abort a pending resolution request. After calling this function, Token.Status will be set to EFI_ABORTED and then Token.Event will be signaled. If the token is not in one of the queues, which usually means that the asynchronous operation has completed, this function will not signal the token and EFI_NOT_FOUND is returned.
[in] | This | Pointer to EFI_DNS6_PROTOCOL instance. |
[in] | Token | Pointer to a token that has been issued by EFI_DNS6_PROTOCOL.HostNameToIp (), EFI_DNS6_PROTOCOL.IpToHostName() or EFI_DNS6_PROTOCOL.GeneralLookup(). If NULL, all pending tokens are aborted. |
EFI_SUCCESS | Incoming or outgoing data was processed. |
EFI_NOT_STARTED | This EFI DNS6 Protocol instance has not been started. |
EFI_INVALID_PARAMETER | This is NULL. |
EFI_NO_MAPPING | There's no source address is available for use. |
EFI_NOT_FOUND | When Token is not NULL, and the asynchronous DNS operation was not found in the transmit queue. It was either completed or was not issued by HostNameToIp(), IpToHostName() or GeneralLookup(). |
The callback function to send request.
[in] | This | Pointer to the EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL instance. |
[in] | Data | Data received. The first byte is the attribute opcode, followed by opcode specific fields. See Bluetooth specification, Vol 3, Part F, Attribute Protocol. It might be a normal RESPONSE message, or ERROR RESPONSE messag |
[in] | DataLength | The length of Data in bytes. |
[in] | Context | The context passed from the callback registration request. |
EFI_SUCCESS | The callback function complete successfully. |
Send a "REQUEST" or "COMMAND" message to remote server and receive a "RESPONSE" message for "REQUEST" from remote server according to Bluetooth attribute protocol data unit(PDU).
[in] | This | Pointer to the EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL instance. |
[in] | Data | Data of a REQUEST or COMMAND message. The first byte is the attribute PDU related opcode, followed by opcode specific fields. See Bluetooth specification, Vol 3, Part F, Attribute Protocol. |
[in] | DataLength | The length of Data in bytes. |
[in] | Callback | Callback function to notify the RESPONSE is received to the caller, with the response buffer. Caller must check the response buffer content to know if the request action is success or fail. It may be NULL if the data is a COMMAND. |
[in] | Context | Data passed into Callback function. It is optional parameter and may be NULL. |
EFI_SUCCESS | The request is sent successfully. |
EFI_INVALID_PARAMETER | One or more parameters are invalid due to following conditions:
|
EFI_DEVICE_ERROR | Sending the request failed due to the host controller or the device error. |
EFI_NOT_READY | A GATT operation is already underway for this device. |
EFI_UNSUPPORTED | The attribute does not support the corresponding operation. |
Callback function, it is called if a BluetoothLE device is found during scan process.
[in] | This | Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance. |
[in] | Context | Context passed from scan request. |
[in] | CallbackInfo | Data related to scan result. NULL CallbackInfo means scan complete. |
EFI_SUCCESS | The callback function complete successfully. |
Get BluetoothLE configuration data.
The GetData() function returns BluetoothLE configuration data. For remote BluetoothLE device configuration data, please use GetRemoteData() function with valid BD_ADDR.
[in] | This | Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance. |
[in] | DataType | Configuration data type. |
[in,out] | DataSize | On input, indicates the size, in bytes, of the data buffer specified by Data. On output, indicates the amount of data actually returned. |
[in,out] | Data | A pointer to the buffer of data that will be returned. |
EFI_SUCCESS | The BluetoothLE configuration data is returned successfully. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE:
|
EFI_UNSUPPORTED | The DataType is unsupported. |
EFI_NOT_FOUND | The DataType is not found. |
EFI_BUFFER_TOO_SMALL | The buffer is too small to hold the buffer. |
Set BluetoothLE configuration data.
The SetData() function sets local BluetoothLE device configuration data. Not all DataType can be set.
[in] | This | Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance. |
[in] | DataType | Configuration data type. |
[in] | DataSize | Indicates the size, in bytes, of the data buffer specified by Data. |
[in] | Data | A pointer to the buffer of data that will be set. |
EFI_SUCCESS | The BluetoothLE configuration data is set successfully. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE:
|
EFI_UNSUPPORTED | The DataType is unsupported. |
EFI_WRITE_PROTECTED | Cannot set configuration data. |
Get remove BluetoothLE device configuration data.
The GetRemoteData() function returns remote BluetoothLE device configuration data.
[in] | This | Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance. |
[in] | DataType | Configuration data type. |
[in] | BDAddr | Remote BluetoothLE device address. |
[in,out] | DataSize | On input, indicates the size, in bytes, of the data buffer specified by Data. On output, indicates the amount of data actually returned. |
[in,out] | Data | A pointer to the buffer of data that will be returned. |
EFI_SUCCESS | The remote BluetoothLE device configuration data is returned successfully. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE:
|
EFI_UNSUPPORTED | The DataType is unsupported. |
EFI_NOT_FOUND | The DataType is not found. |
EFI_BUFFER_TOO_SMALL | The buffer is too small to hold the buffer. |
The callback function for SMP.
[in] | This | Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance. |
[in] | Context | Data passed into callback function. This is optional parameter and may be NULL. |
[in] | BDAddr | Remote BluetoothLE device address. |
[in] | EventDataType | Event data type in EFI_BLUETOOTH_LE_SMP_EVENT_DATA_TYPE. |
[in] | DataSize | Indicates the size, in bytes, of the data buffer specified by Data. |
[in] | Data | A pointer to the buffer of data. |
EFI_SUCCESS | The callback function complete successfully. |
Register Security Manager Protocol callback function for user authentication/authorization.
The RegisterSmpAuthCallback() function register Security Manager Protocol callback function for user authentication/authorization.
[in] | This | Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance. |
[in] | Callback | Callback function for user authentication/authorization. |
[in] | Context | Data passed into Callback function. This is optional parameter and may be NULL. |
EFI_SUCCESS | The SMP callback function is registered successfully. |
EFI_ALREADY_STARTED | A callback function is already registered on the same attribute opcode and attribute handle, when the Callback is not NULL. |
EFI_NOT_STARTED | A callback function is not registered on the same attribute opcode and attribute handle, when the Callback is NULL. |
Send user authentication/authorization to remote device.
The SendSmpAuthData() function sends user authentication/authorization to remote device. It should be used to send these information after the caller gets the request data from the callback function by RegisterSmpAuthCallback().
[in] | This | Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance. |
[in] | BDAddr | Remote BluetoothLE device address. |
[in] | EventDataType | Event data type in EFI_BLUETOOTH_LE_SMP_EVENT_DATA_TYPE. |
[in] | DataSize | The size of Data in bytes, of the data buffer specified by Data. |
[in] | Data | A pointer to the buffer of data that will be sent. The data format depends on the type of SMP event data being responded to. |
EFI_SUCCESS | The SMP authorization data is sent successfully. |
EFI_NOT_READY | SMP is not in the correct state to receive the auth data. |
The callback function to get SMP data.
[in] | This | Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance. |
[in] | Context | Data passed into callback function. This is optional parameter and may be NULL. |
[in] | BDAddr | Remote BluetoothLE device address. For Local device setting, it should be NULL. |
[in] | DataType | Data type in EFI_BLUETOOTH_LE_SMP_DATA_TYPE. |
[in,out] | DataSize | On input, indicates the size, in bytes, of the data buffer specified by Data. On output, indicates the amount of data actually returned. |
[out] | Data | A pointer to the buffer of data that will be returned. |
EFI_SUCCESS | The callback function complete successfully. |
Register a callback function to get SMP related data.
The RegisterSmpGetDataCallback() function registers a callback function to get SMP related data.
[in] | This | Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance. |
[in] | Callback | Callback function for SMP get data. |
[in] | Context | Data passed into Callback function. This is optional parameter and may be NULL. |
EFI_SUCCESS | The SMP get data callback function is registered successfully. |
EFI_ALREADY_STARTED | A callback function is already registered on the same attribute opcode and attribute handle, when the Callback is not NULL. |
EFI_NOT_STARTED | A callback function is not registered on the same attribute opcode and attribute handle, when the Callback is NULL |
The callback function to set SMP data.
[in] | This | Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance. |
[in] | Context | Data passed into callback function. This is optional parameter and may be NULL. |
[in] | BDAddr | Remote BluetoothLE device address. |
[in] | DataType | Data type in EFI_BLUETOOTH_LE_SMP_DATA_TYPE. |
[in] | DataSize | Indicates the size, in bytes, of the data buffer specified by Data. |
[in] | Data | A pointer to the buffer of data. |
EFI_SUCCESS | The callback function complete successfully. |
Register a callback function to set SMP related data.
The RegisterSmpSetDataCallback() function registers a callback function to set SMP related data.
[in] | This | Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance. |
[in] | Callback | Callback function for SMP set data. |
[in] | Context | Data passed into Callback function. This is optional parameter and may be NULL. |
EFI_SUCCESS | The SMP set data callback function is registered successfully. |
EFI_ALREADY_STARTED | A callback function is already registered on the same attribute opcode and attribute handle, when the Callback is not NULL. |
EFI_NOT_STARTED | A callback function is not registered on the same attribute opcode and attribute handle, when the Callback is NULL |
The callback function to hook connect complete event.
[in] | This | Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance. |
[in] | Context | Data passed into callback function. This is optional parameter and may be NULL. |
[in] | CallbackType | The value defined in EFI_BLUETOOTH_CONNECT_COMPLETE_CALLBACK_TYPE. |
[in] | BDAddr | Remote BluetoothLE device address. |
[in] | InputBuffer | A pointer to the buffer of data that is input from callback caller. |
[in] | InputBufferSize | Indicates the size, in bytes, of the data buffer specified by InputBuffer. |
EFI_SUCCESS | The callback function complete successfully. |
Register link connect complete callback function.
The RegisterLinkConnectCompleteCallback() function registers Bluetooth link connect complete callback function. The Bluetooth Configuration driver may call RegisterLinkConnectCompleteCallback() to register a callback function. During pairing, Bluetooth bus driver must trigger this callback function to report device state, if it is registered. Then Bluetooth Configuration driver will get information on device connection, according to CallbackType defined by EFI_BLUETOOTH_CONNECT_COMPLETE_CALLBACK_TYPE
[in] | This | Pointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance. |
[in] | Callback | The callback function. NULL means unregister. |
[in] | Context | Data passed into Callback function. This is optional parameter and may be NULL. |
EFI_SUCCESS | The link connect complete callback function is registered successfully. |
EFI_ALREADY_STARTED | A callback function is already registered on the same attribute opcode and attribute handle, when the Callback is not NULL. |
EFI_NOT_STARTED | A callback function is not registered on the same attribute opcode and attribute handle, when the Callback is NULL |
Retrieve mode data of this DNS instance.
This function is used to retrieve DNS mode data for this DNS instance.
[in] | This | Pointer to EFI_DNS4_PROTOCOL instance. |
[out] | DnsModeData | Point to the mode data. |
EFI_SUCCESS | The operation completed successfully. |
EFI_NOT_STARTED | When DnsConfigData is queried, no configuration data is available because this instance has not been configured. |
EFI_INVALID_PARAMETER | This is NULL or DnsModeData is NULL. |
EFI_OUT_OF_RESOURCES | Failed to allocate needed resources. |
Configure this DNS instance.
This function is used to configure DNS mode data for this DNS instance.
[in] | This | Pointer to EFI_DNS4_PROTOCOL instance. |
[in] | DnsConfigData | Point to the Configuration data. |
EFI_SUCCESS | The operation completed successfully. |
EFI_UNSUPPORTED | The designated protocol is not supported. |
EFI_INVALID_PARAMETER | This is NULL. The StationIp address provided in DnsConfigData is not a valid unicast. DnsServerList is NULL while DnsServerListCount is not ZERO. DnsServerListCount is ZERO while DnsServerList is not NULL |
EFI_OUT_OF_RESOURCES | The DNS instance data or required space could not be allocated. |
EFI_DEVICE_ERROR | An unexpected system or network error occurred. The EFI DNSv4 Protocol instance is not configured. |
EFI_ALREADY_STARTED | Second call to Configure() with DnsConfigData. To reconfigure the instance the caller must call Configure() with NULL first to return driver to unconfigured state. |
Host name to host address translation.
The HostNameToIp () function is used to translate the host name to host IP address. A type A query is used to get the one or more IP addresses for this host.
[in] | This | Pointer to EFI_DNS4_PROTOCOL instance. |
[in] | HostName | Host name. |
[in] | Token | Point to the completion token to translate host name to host address. |
EFI_SUCCESS | The operation completed successfully. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: This is NULL. Token is NULL. Token.Event is NULL. HostName is NULL. HostName string is unsupported format. |
EFI_NO_MAPPING | There's no source address is available for use. |
EFI_NOT_STARTED | This instance has not been started. |
IPv4 address to host name translation also known as Reverse DNS lookup.
The IpToHostName() function is used to translate the host address to host name. A type PTR query is used to get the primary name of the host. Support of this function is optional.
[in] | This | Pointer to EFI_DNS4_PROTOCOL instance. |
[in] | IpAddress | Ip Address. |
[in] | Token | Point to the completion token to translate host address to host name. |
EFI_SUCCESS | The operation completed successfully. |
EFI_UNSUPPORTED | This function is not supported. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: This is NULL. Token is NULL. Token.Event is NULL. IpAddress is not valid IP address . |
EFI_NO_MAPPING | There's no source address is available for use. |
EFI_ALREADY_STARTED | This Token is being used in another DNS session. |
EFI_OUT_OF_RESOURCES | Failed to allocate needed resources. |
Retrieve arbitrary information from the DNS server.
This GeneralLookup() function retrieves arbitrary information from the DNS. The caller supplies a QNAME, QTYPE, and QCLASS, and all of the matching RRs are returned. All RR content (e.g., TTL) was returned. The caller need parse the returned RR to get required information. The function is optional.
[in] | This | Pointer to EFI_DNS4_PROTOCOL instance. |
[in] | QName | Pointer to Query Name. |
[in] | QType | Query Type. |
[in] | QClass | Query Name. |
[in] | Token | Point to the completion token to retrieve arbitrary information. |
EFI_SUCCESS | The operation completed successfully. |
EFI_UNSUPPORTED | This function is not supported. Or the requested QType is not supported |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: This is NULL. Token is NULL. Token.Event is NULL. QName is NULL. |
EFI_NO_MAPPING | There's no source address is available for use. |
EFI_ALREADY_STARTED | This Token is being used in another DNS session. |
EFI_OUT_OF_RESOURCES | Failed to allocate needed resources. |
This function is to update the DNS Cache.
The UpdateDnsCache() function is used to add/delete/modify DNS cache entry. DNS cache can be normally dynamically updated after the DNS resolve succeeds. This function provided capability to manually add/delete/modify the DNS cache.
[in] | This | Pointer to EFI_DNS4_PROTOCOL instance. |
[in] | DeleteFlag | If FALSE, this function is to add one entry to the DNS Cahce. If TRUE, this function will delete matching DNS Cache entry. |
[in] | Override | If TRUE, the maching DNS cache entry will be overwritten with the supplied parameter. If FALSE, EFI_ACCESS_DENIED will be returned if the entry to be added is already existed. |
[in] | DnsCacheEntry | Pointer to DNS Cache entry. |
EFI_SUCCESS | The operation completed successfully. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: This is NULL. DnsCacheEntry.HostName is NULL. DnsCacheEntry.IpAddress is NULL. DnsCacheEntry.Timeout is zero. |
EFI_ACCESS_DENIED | The DNS cache entry already exists and Override is not TRUE. |
Polls for incoming data packets and processes outgoing data packets.
The Poll() function can be used by network drivers and applications to increase the rate that data packets are moved between the communications device and the transmit and receive queues. In some systems, the periodic timer event in the managed network driver may not poll the underlying communications device fast enough to transmit and/or receive all data packets without missing incoming packets or dropping outgoing packets. Drivers and applications that are experiencing packet loss should try calling the Poll() function more often.
[in] | This | Pointer to EFI_DNS4_PROTOCOL instance. |
EFI_SUCCESS | Incoming or outgoing data was processed. |
EFI_NOT_STARTED | This EFI DNS Protocol instance has not been started. |
EFI_INVALID_PARAMETER | This is NULL. |
EFI_DEVICE_ERROR | An unexpected system or network error occurred. |
EFI_TIMEOUT | Data was dropped out of the transmit and/or receive queue. Consider increasing the polling rate. |
Abort an asynchronous DNS operation, including translation between IP and Host, and general look up behavior.
The Cancel() function is used to abort a pending resolution request. After calling this function, Token.Status will be set to EFI_ABORTED and then Token.Event will be signaled. If the token is not in one of the queues, which usually means that the asynchronous operation has completed, this function will not signal the token and EFI_NOT_FOUND is returned.
[in] | This | Pointer to EFI_DNS4_PROTOCOL instance. |
[in] | Token | Pointer to a token that has been issued by EFI_DNS4_PROTOCOL.HostNameToIp (), EFI_DNS4_PROTOCOL.IpToHostName() or EFI_DNS4_PROTOCOL.GeneralLookup(). If NULL, all pending tokens are aborted. |
EFI_SUCCESS | Incoming or outgoing data was processed. |
EFI_NOT_STARTED | This EFI DNS4 Protocol instance has not been started. |
EFI_INVALID_PARAMETER | This is NULL. |
EFI_NOT_FOUND | When Token is not NULL, and the asynchronous DNS operation was not found in the transmit queue. It was either completed or was not issued by HostNameToIp(), IpToHostName() or GeneralLookup(). |
The EFI_TREE_PROTOCOL GetCapability function call provides protocol capability information and state information about the TrEE.
[in] | This | Indicates the calling context |
[out] | ProtocolCapability | The caller allocates memory for a TREE_BOOT_SERVICE_CAPABILITY structure and sets the size field to the size of the structure allocated. The callee fills in the fields with the EFI protocol capability information and the current TrEE state information up to the number of fields which fit within the size of the structure passed in. |
EFI_SUCCESS | Operation completed successfully. |
EFI_DEVICE_ERROR | The command was unsuccessful. The ProtocolCapability variable will not be populated. |
EFI_INVALID_PARAMETER | One or more of the parameters are incorrect. The ProtocolCapability variable will not be populated. |
EFI_BUFFER_TOO_SMALL | The ProtocolCapability variable is too small to hold the full response. It will be partially populated (required Size field will be set). |
The EFI_TREE_PROTOCOL Get Event Log function call allows a caller to retrieve the address of a given event log and its last entry.
[in] | This | Indicates the calling context |
[in] | EventLogFormat | The type of the event log for which the information is requested. |
[out] | EventLogLocation | A pointer to the memory address of the event log. |
[out] | EventLogLastEntry | If the Event Log contains more than one entry, this is a pointer to the address of the start of the last entry in the event log in memory. |
[out] | EventLogTruncated | If the Event Log is missing at least one entry because an event would have exceeded the area allocated for events, this value is set to TRUE. Otherwise, the value will be FALSE and the Event Log will be complete. |
EFI_SUCCESS | Operation completed successfully. |
EFI_INVALID_PARAMETER | One or more of the parameters are incorrect (e.g. asking for an event log whose format is not supported). |
The EFI_TREE_PROTOCOL HashLogExtendEvent function call provides callers with an opportunity to extend and optionally log events without requiring knowledge of actual TPM commands. The extend operation will occur even if this function cannot create an event log entry (e.g. due to the event log being full).
[in] | This | Indicates the calling context |
[in] | Flags | Bitmap providing additional information. |
[in] | DataToHash | Physical address of the start of the data buffer to be hashed. |
[in] | DataToHashLen | The length in bytes of the buffer referenced by DataToHash. |
[in] | Event | Pointer to data buffer containing information about the event. |
EFI_SUCCESS | Operation completed successfully. |
EFI_DEVICE_ERROR | The command was unsuccessful. |
EFI_VOLUME_FULL | The extend operation occurred, but the event could not be written to one or more event logs. |
EFI_INVALID_PARAMETER | One or more of the parameters are incorrect. |
EFI_UNSUPPORTED | The PE/COFF image type is not supported. |
This service enables the sending of commands to the TrEE.
[in] | This | Indicates the calling context |
[in] | InputParameterBlockSize | Size of the TrEE input parameter block. |
[in] | InputParameterBlock | Pointer to the TrEE input parameter block. |
[in] | OutputParameterBlockSize | Size of the TrEE output parameter block. |
[in] | OutputParameterBlock | Pointer to the TrEE output parameter block. |
EFI_SUCCESS | The command byte stream was successfully sent to the device and a response was successfully received. |
EFI_DEVICE_ERROR | The command was not successfully sent to the device or a response was not successfully received from the device. |
EFI_INVALID_PARAMETER | One or more of the parameters are incorrect. |
EFI_BUFFER_TOO_SMALL | The output parameter block is too small. |
Reads data from a file.
This | A pointer to the EFI_FILE_PROTOCOL instance that is the file handle to read data from. |
Token | A pointer to the token associated with the transaction. |
EFI_SUCCESS | If Event is NULL (blocking I/O): The data was read successfully. If Event is not NULL (asynchronous I/O): The request was successfully queued for processing. |
EFI_NO_MEDIA | The device has no medium. |
EFI_DEVICE_ERROR | The device reported an error. |
EFI_DEVICE_ERROR | An attempt was made to read from a deleted file. |
EFI_DEVICE_ERROR | On entry, the current file position is beyond the end of the file. |
EFI_VOLUME_CORRUPTED | The file system structures are corrupted. |
EFI_OUT_OF_RESOURCES | Unable to queue the request due to lack of resources. |
Writes data to a file.
This | A pointer to the EFI_FILE_PROTOCOL instance that is the file handle to write data to. |
Token | A pointer to the token associated with the transaction. |
EFI_SUCCESS | If Event is NULL (blocking I/O): The data was read successfully. If Event is not NULL (asynchronous I/O): The request was successfully queued for processing. |
EFI_UNSUPPORTED | Writes to open directory files are not supported. |
EFI_NO_MEDIA | The device has no medium. |
EFI_DEVICE_ERROR | The device reported an error. |
EFI_DEVICE_ERROR | An attempt was made to write to a deleted file. |
EFI_VOLUME_CORRUPTED | The file system structures are corrupted. |
EFI_WRITE_PROTECTED | The file or medium is write-protected. |
EFI_ACCESS_DENIED | The file was opened read only. |
EFI_VOLUME_FULL | The volume is full. |
EFI_OUT_OF_RESOURCES | Unable to queue the request due to lack of resources. |
Flushes all modified data associated with a file to a device.
This | A pointer to the EFI_FILE_PROTOCOL instance that is the file handle to flush. |
Token | A pointer to the token associated with the transaction. |
EFI_SUCCESS | If Event is NULL (blocking I/O): The data was read successfully. If Event is not NULL (asynchronous I/O): The request was successfully queued for processing. |
EFI_NO_MEDIA | The device has no medium. |
EFI_DEVICE_ERROR | The device reported an error. |
EFI_VOLUME_CORRUPTED | The file system structures are corrupted. |
EFI_WRITE_PROTECTED | The file or medium is write-protected. |
EFI_ACCESS_DENIED | The file was opened read-only. |
EFI_VOLUME_FULL | The volume is full. |
EFI_OUT_OF_RESOURCES | Unable to queue the request due to lack of resources. |
Set the configuration for the EFI IPv4 network stack running on the communication device this EFI IPv4 Configuration II Protocol instance manages.
This function is used to set the configuration data of type DataType for the EFI IPv4 network stack running on the communication device this EFI IPv4 Configuration II Protocol instance manages. The successfully configured data is valid after system reset or power-off. The DataSize is used to calculate the count of structure instances in the Data for some DataType that multiple structure instances are allowed. This function is always non-blocking. When setting some typeof configuration data, an asynchronous process is invoked to check the correctness of the data, such as doing address conflict detection on the manually set local IPv4 address. EFI_NOT_READY is returned immediately to indicate that such an asynchronous process is invoked and the process is not finished yet. The caller willing to get the result of the asynchronous process is required to call RegisterDataNotify() to register an event on the specified configuration data. Once the event is signaled, the caller can call GetData()to get back the configuration data in order to know the result. For other types of configuration data that do not require an asynchronous configuration process, the result of the operation is immediately returned.
[in] | This | Pointer to the EFI_IP4_CONFIG2_PROTOCOL instance. |
[in] | DataType | The type of data to set. |
[in] | DataSize | Size of the buffer pointed to by Data in bytes. |
[in] | Data | The data buffer to set. The type ofthe data buffer is associated with the DataType. |
EFI_SUCCESS | The specified configuration data for the EFI IPv4 network stack is set successfully. |
EFI_INVALID_PARAMETER | One or more of the following are TRUE: This is NULL. One or more fields in Data and DataSize do not match the requirement of the data type indicated by DataType. |
EFI_WRITE_PROTECTED | The specified configuration data is read-only or the specified configuration data can not be set under the current policy. |
EFI_ACCESS_DENIED | Another set operation on the specified configuration data is already in process. |
EFI_NOT_READY | An asynchronous process is invoked to set the specified configuration data and the process is not finished yet. |
EFI_BAD_BUFFER_SIZE | The DataSize does not match the size of the type indicated by DataType. |
EFI_UNSUPPORTED | This DataType is not supported. |
EFI_OUT_OF_RESOURCES | Required system resources could not be allocated. |
EFI_DEVICE_ERROR | An unexpected system error or network error occurred. |
Get the configuration data for the EFI IPv4 network stack running on the communication device this EFI IPv4 Configuration II Protocol instance manages.
This function returns the configuration data of type DataType for the EFI IPv4 network stack running on the communication device this EFI IPv4 Configuration II Protocol instance manages. The caller is responsible for allocating the buffer usedto return the specified configuration data and the required size will be returned to the caller if the size of the buffer is too small. EFI_NOT_READY is returned if the specified configuration data is not ready due to an already in progress asynchronous configuration process. The caller can call RegisterDataNotify() to register an event on the specified configuration data. Once the asynchronous configuration process is finished, the event will be signaled and a subsequent GetData() call will return the specified configuration data.
[in] | This | Pointer to the EFI_IP4_CONFIG2_PROTOCOL instance. |
[in] | DataType | The type of data to get. |
[out] | DataSize | On input, in bytes, the size of Data. On output, in bytes, the size of buffer required to store the specified configuration data. |
[in] | Data | The data buffer in which the configuration data is returned. The type of the data buffer is associated with the DataType. Ignored if DataSize is 0. |
EFI_SUCCESS | The specified configuration data is got successfully. |
EFI_INVALID_PARAMETER | One or more of the followings are TRUE: This is NULL. DataSize is NULL. Data is NULL if *DataSizeis not zero. |
EFI_BUFFER_TOO_SMALL | The size of Data is too small for the specified configuration data and the required size is returned in DataSize. |
EFI_NOT_READY | The specified configuration data is not ready due to an already in progress asynchronous configuration process. |
EFI_NOT_FOUND | The specified configuration data is not found. |
Register an event that is to be signaled whenever a configuration process on the specified configuration data is done.
This function registers an event that is to be signaled whenever a configuration process on the specified configuration data is done. An event can be registered for different DataType simultaneously and the caller is responsible for determining which type of configuration data causes the signaling of the event in such case.
[in] | This | Pointer to the EFI_IP4_CONFIG2_PROTOCOL instance. |
[in] | DataType | The type of data to unregister the event for. |
[in] | Event | The event to register. |
EFI_SUCCESS | The notification event for the specified configuration data is registered. |
EFI_INVALID_PARAMETER | This is NULL or Event is NULL. |
EFI_UNSUPPORTED | The configuration data type specified by DataType is not supported. |
EFI_OUT_OF_RESOURCES | Required system resources could not be allocated. |
EFI_ACCESS_DENIED | The Event is already registered for the DataType. |
Remove a previously registered event for the specified configuration data.
This function removes a previously registeredevent for the specified configuration data.
[in] | This | Pointer to the EFI_IP4_CONFIG2_PROTOCOL instance. |
[in] | DataType | The type of data to remove the previously registered event for. |
[in] | Event | The event to unregister. |
EFI_SUCCESS | The event registered for the specified configuration data is removed. |
EFI_INVALID_PARAMETER | This is NULL or Event is NULL. |
EFI_NOT_FOUND | The Eventhas not been registered for the specified DataType. |
The DXE Foundation uses this service to measure and/or verify a UEFI image.
This service abstracts the invocation of Trusted Computing Group (TCG) measured boot, UEFI Secure boot, and UEFI User Identity infrastructure. For the former two, the DXE Foundation invokes the FileAuthentication() with a DevicePath and corresponding image in FileBuffer memory. The TCG measurement code will record the FileBuffer contents into the appropriate PCR. The image verification logic will confirm the integrity and provenance of the image in FileBuffer of length FileSize . The origin of the image will be DevicePath in these cases. If the FileBuffer is NULL, the interface will determine if the DevicePath can be connected in order to support the User Identification policy.
This | The EFI_SECURITY2_ARCH_PROTOCOL instance. |
File | A pointer to the device path of the file that is being dispatched. This will optionally be used for logging. |
FileBuffer | A pointer to the buffer with the UEFI file image. |
FileSize | The size of the file. |
BootPolicy | A boot policy that was used to call LoadImage() UEFI service. If FileAuthentication() is invoked not from the LoadImage(), BootPolicy must be set to FALSE. |
EFI_SUCCESS | The file specified by DevicePath and non-NULL FileBuffer did authenticate, and the platform policy dictates that the DXE Foundation may use the file. |
EFI_SUCCESS | The device path specified by NULL device path DevicePath and non-NULL FileBuffer did authenticate, and the platform policy dictates that the DXE Foundation may execute the image in FileBuffer. |
EFI_SUCCESS | FileBuffer is NULL and current user has permission to start UEFI device drivers on the device path specified by DevicePath. |
EFI_SECURITY_VIOLATION | The file specified by DevicePath and FileBuffer did not authenticate, and the platform policy dictates that the file should be placed in the untrusted state. The image has been added to the file execution table. |
EFI_ACCESS_DENIED | The file specified by File and FileBuffer did not authenticate, and the platform policy dictates that the DXE Foundation may not use File. |
EFI_SECURITY_VIOLATION | FileBuffer is NULL and the user has no permission to start UEFI device drivers on the device path specified by DevicePath. |
EFI_SECURITY_VIOLATION | FileBuffer is not NULL and the user has no permission to load drivers from the device path specified by DevicePath. The image has been added into the list of the deferred images. |
This function accepts a <MultiKeywordResp> formatted string, finds the associated keyword owners, creates a <MultiConfigResp> string from it and forwards it to the EFI_HII_ROUTING_PROTOCOL.RouteConfig function.
If there is an issue in resolving the contents of the KeywordString, then the function returns an error and also sets the Progress and ProgressErr with the appropriate information about where the issue occurred and additional data about the nature of the issue.
In the case when KeywordString containing multiple keywords, when an EFI_NOT_FOUND error is generated during processing the second or later keyword element, the system storage associated with earlier keywords is not modified. All elements of the KeywordString must successfully pass all tests for format and access prior to making any modifications to storage.
In the case when EFI_DEVICE_ERROR is returned from the processing of a KeywordString containing multiple keywords, the state of storage associated with earlier keywords is undefined.
This | Pointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance. |
KeywordString | A null-terminated string in <MultiKeywordResp> format. |
Progress | On return, points to a character in the KeywordString. Points to the string's NULL terminator if the request was successful. Points to the most recent '&' before the first failing name / value pair (or the beginning of the string if the failure is in the first name / value pair) if the request was not successful. |
ProgressErr | If during the processing of the KeywordString there was a failure, this parameter gives additional information about the possible source of the problem. The various errors are defined in "Related Definitions" below. |
EFI_SUCCESS | The specified action was completed successfully. |
EFI_INVALID_PARAMETER | One or more of the following are TRUE:
|
EFI_NOT_FOUND | An element of the KeywordString was not found. See ProgressErr for more data. |
EFI_OUT_OF_RESOURCES | Required system resources could not be allocated. See ProgressErr for more data. |
EFI_ACCESS_DENIED | The action violated system policy. See ProgressErr for more data. |
EFI_DEVICE_ERROR | An unexpected system error occurred. See ProgressErr for more data. |
This function accepts a <MultiKeywordRequest> formatted string, finds the underlying keyword owners, creates a <MultiConfigRequest> string from it and forwards it to the EFI_HII_ROUTING_PROTOCOL.ExtractConfig function.
If there is an issue in resolving the contents of the KeywordString, then the function returns an EFI_INVALID_PARAMETER and also set the Progress and ProgressErr with the appropriate information about where the issue occurred and additional data about the nature of the issue.
In the case when KeywordString is NULL, or contains multiple keywords, or when EFI_NOT_FOUND is generated while processing the keyword elements, the Results string contains values returned for all keywords processed prior to the keyword generating the error but no values for the keyword with error or any following keywords.
This | Pointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance. |
NameSpaceId | A null-terminated string containing the platform configuration language to search through in the system. If a NULL is passed in, then it is assumed that any platform configuration language with the prefix of "x-UEFI-" are searched. |
KeywordString | A null-terminated string in <MultiKeywordRequest> format. If a NULL is passed in the KeywordString field, all of the known keywords in the system for the NameSpaceId specified are returned in the Results field. |
Progress | On return, points to a character in the KeywordString. Points to the string's NULL terminator if the request was successful. Points to the most recent '&' before the first failing name / value pair (or the beginning of the string if the failure is in the first name / value pair) if the request was not successful. |
ProgressErr | If during the processing of the KeywordString there was a failure, this parameter gives additional information about the possible source of the problem. See the definitions in SetData() for valid value definitions. |
Results | A null-terminated string in <MultiKeywordResp> format is returned which has all the values filled in for the keywords in the KeywordString. This is a callee-allocated field, and must be freed by the caller after being used. |
EFI_SUCCESS | The specified action was completed successfully. |
EFI_INVALID_PARAMETER | One or more of the following are TRUE: 1.Progress, ProgressErr, or Results is NULL. 2.Parsing of the KeywordString resulted in an error. See Progress and ProgressErr for more data. |
EFI_NOT_FOUND | An element of the KeywordString was not found. See ProgressErr for more data. |
EFI_NOT_FOUND | The NamespaceId specified was not found. See ProgressErr for more data. |
EFI_OUT_OF_RESOURCES | Required system resources could not be allocated. See ProgressErr for more data. |
EFI_ACCESS_DENIED | The action violated system policy. See ProgressErr for more data. |
EFI_DEVICE_ERROR | An unexpected system error occurred. See ProgressErr for more data. |
Returns information about the random number generation implementation.
[in] | This | A pointer to the EFI_RNG_PROTOCOL instance. |
[in,out] | RNGAlgorithmListSize | On input, the size in bytes of RNGAlgorithmList. On output with a return code of EFI_SUCCESS, the size in bytes of the data returned in RNGAlgorithmList. On output with a return code of EFI_BUFFER_TOO_SMALL, the size of RNGAlgorithmList required to obtain the list. |
[out] | RNGAlgorithmList | A caller-allocated memory buffer filled by the driver with one EFI_RNG_ALGORITHM element for each supported RNG algorithm. The list must not change across multiple calls to the same driver. The first algorithm in the list is the default algorithm for the driver. |
EFI_SUCCESS | The RNG algorithm list was returned successfully. |
EFI_UNSUPPORTED | The services is not supported by this driver. |
EFI_DEVICE_ERROR | The list of algorithms could not be retrieved due to a hardware or firmware error. |
EFI_INVALID_PARAMETER | One or more of the parameters are incorrect. |
EFI_BUFFER_TOO_SMALL | The buffer RNGAlgorithmList is too small to hold the result. |
Produces and returns an RNG value using either the default or specified RNG algorithm.
[in] | This | A pointer to the EFI_RNG_PROTOCOL instance. |
[in] | RNGAlgorithm | A pointer to the EFI_RNG_ALGORITHM that identifies the RNG algorithm to use. May be NULL in which case the function will use its default RNG algorithm. |
[in] | RNGValueLength | The length in bytes of the memory buffer pointed to by RNGValue. The driver shall return exactly this numbers of bytes. |
[out] | RNGValue | A caller-allocated memory buffer filled by the driver with the resulting RNG value. |
EFI_SUCCESS | The RNG value was returned successfully. |
EFI_UNSUPPORTED | The algorithm specified by RNGAlgorithm is not supported by this driver. |
EFI_DEVICE_ERROR | An RNG value could not be retrieved due to a hardware or firmware error. |
EFI_NOT_READY | There is not enough random data available to satisfy the length requested by RNGValueLength. |
EFI_INVALID_PARAMETER | RNGValue is NULL or RNGValueLength is zero. |
This function requests connection to the smart card or the reader, using the appropriate reset type and protocol.
The SCardConnectfunction requests access to the smart card or the reader. Upon success, it is then possible to call SCardTransmit.
If AccessMode is set to SCARD_AM_READER, PreferredProtocols must be set to SCARD_PROTOCOL_UNDEFINED and CardAction to SCARD_CA_NORESET else function fails with EFI_INVALID_PARAMETER.
[in] | This | Indicates a pointer to the calling context. |
[in] | AccessMode | Codes of access mode. |
[in] | CardAction | SCARD_CA_NORESET, SCARD_CA_COLDRESET or SCARD_CA_WARMRESET. |
[in] | PreferredProtocols | Bitmask of acceptable protocols. |
[out] | ActiveProtocol | A flag that indicates the active protocol. |
EFI_SUCCESS | The requested command completed successfully. |
EFI_INVALID_PARAMETER | This is NULL |
EFI_INVALID_PARAMETER | AccessMode is not valid. |
EFI_INVALID_PARAMETER | CardAction is not valid. |
EFI_INVALID_PARAMETER | Invalid combination of AccessMode/CardAction/ PreferredProtocols. |
EFI_NOT_READY | A smart card is inserted but failed to return an ATR. |
EFI_UNSUPPORTED | PreferredProtocols does not contain an available protocol to use. |
EFI_NO_MEDIA | AccessMode is set to SCARD_AM_CARD but there is no smart card inserted. |
EFI_ACCESS_DENIED | Access is already locked by a previous SCardConnectcall. |
EFI_DEVICE_ERROR | Any other error condition, typically a reader removal. |
This function releases a connection previously taken by SCardConnect.
The SCardDisconnect function releases the lock previously taken by SCardConnect. In case the smart card has been removed before this call, thisfunction returns EFI_SUCCESS. If there is no previous call to SCardConnect, this function returns EFI_SUCCESS.
[in] | This | Indicates a pointer to the calling context. |
[in] | CardAction | Codes for card action. |
EFI_SUCCESS | The requested command completed successfully. |
EFI_INVALID_PARAMETER | This is NULL |
EFI_INVALID_PARAMETER | CardAction value is unknown. |
EFI_UNSUPPORTED | Reader does not support Eject card feature (disconnect was not performed). |
EFI_DEVICE_ERROR | Any other error condition, typically a reader removal. |
This function retrieves some basic information about the smart card and reader.
The SCardStatusfunction retrieves basic reader and card information.
If ReaderName, State, CardProtocolor Atris NULL, the function does not fail but does not fill in such variables.
If EFI_SUCCESS is not returned, ReaderName and Atr contents shall not be considered as valid.
[in] | This | Indicates a pointer to the calling context. |
[out] | ReaderName | A pointer to a NULL terminated string that will contain the reader name. |
[in,out] | ReaderNameLength | On input, a pointer to the variablethat holds the maximal size, in bytes,of ReaderName. On output, the required size, in bytes, for ReaderName. |
[out] | State | Current state of the smart card reader. |
[out] | CardProtocol | Current protocol used to communicate with the smart card. |
[out] | Atr | A pointer to retrieve the ATR of the smart card. |
[in,out] | AtrLength | On input, a pointer to hold the maximum size, in bytes, of Atr(usually 33). On output, the required size, inbytes, for the smart card ATR. |
EFI_SUCCESS | The requested command completed successfully. |
EFI_INVALID_PARAMETER | This is NULL |
EFI_INVALID_PARAMETER | ReaderName is not NULL but ReaderNameLength is NULL |
EFI_INVALID_PARAMETER | Atr is not NULL but AtrLength is NULL |
EFI_BUFFER_TOO_SMALL | ReaderNameLength is not big enough to hold the reader name. ReaderNameLength has been updated to the required value. |
EFI_BUFFER_TOO_SMALL | AtrLength is not big enough to hold the ATR. AtrLength has been updated to the required value. |
EFI_DEVICE_ERROR | Any other error condition, typically a reader removal. |
This function sends a command to the card or reader and returns its response.
The protocol to use to communicate with the smart card has been selected through SCardConnectcall.
In case RAPDULength indicates a buffer too small to holdthe response APDU, the function fails with EFI_BUFFER_TOO_SMALL.
[in] | This | A pointer to the EFI_USBFN_IO_PROTOCOLinstance. |
[in] | CAPDU | A pointer to a byte array thatcontains the Command APDU to send to the smart card or reader. |
[in] | CAPDULength | Command APDU size, in bytes. |
[out] | RAPDU | A pointer to a byte array that will contain the Response APDU. |
[in,out] | RAPDULength | On input, the maximum size, inbytes, of the Response APDU. On output, the size, in bytes, of the Response APDU. |
EFI_SUCCESS | The requested command completed successfully. |
EFI_INVALID_PARAMETER | This is NULL. |
EFI_INVALID_PARAMETER | CAPDU is NULL or CAPDULength is 0. |
EFI_BUFFER_TOO_SMALL | RAPDULength is not big enough to hold the response APDU. RAPDULength has been updated to the required value. |
EFI_NO_MEDIA | There is no card in the reader. |
EFI_NOT_READY | Card is not powered. |
EFI_PROTOCOL_ERROR | A protocol error has occurred. |
EFI_TIMEOUT | The reader did not respond. |
EFI_ACCESS_DENIED | A communication with the reader/card is already pending. |
EFI_DEVICE_ERROR | Any other error condition, typically a reader removal. |
This function provides direct access to the reader.
This function gives direct control to send commands to the driver or the reader. The ControlCode to use is vendor dependant; the only standard code defined is the one to get PC/SC part 10 features.
InBuffer and Outbuffer may be NULL when ControlCode operation does not require them.
[in] | This | Indicates a pointer to the calling context. |
[in] | ControlCode | The control code for the operation to perform. |
[in] | InBuffer | A pointer to the input parameters. |
[in] | InBufferLength | Size, in bytes, of input parameters. |
[out] | OutBuffer | A pointer to the output parameters. |
[in,out] | OutBufferLength | On input, maximal size, in bytes, to store output parameters. On output, the size, in bytes, of output parameters. |
EFI_SUCCESS | The requested command completed successfully. |
EFI_INVALID_PARAMETER | This is NULL. |
EFI_INVALID_PARAMETER | ControlCode requires input parameters but: InBuffer is NULL or InBufferLenth is NULL or InBuffer is not NULL but InBufferLenth is less than expected. |
EFI_INVALID_PARAMETER | OutBuffer is not NULL but OutBufferLength is NULL. |
EFI_UNSUPPORTED | ControlCode is not supported. |
EFI_BUFFER_TOO_SMALL | OutBufferLength is not big enough to hold the output parameters. OutBufferLength has been updated to the required value. |
EFI_NO_MEDIA | There is no card in the reader and the control code specified requires one. |
EFI_NOT_READY | ControlCode requires a powered card to operate. |
EFI_PROTOCOL_ERROR | A protocol error has occurred. |
EFI_TIMEOUT | The reader did not respond. |
EFI_ACCESS_DENIED | A communication with the reader/card is already pending. |
EFI_DEVICE_ERROR | Any other error condition, typically a reader removal. |
This function retrieves a reader or smart card attribute.
Possibly supported attrib values are listed in "PC/SC specification, Part 3: Requirements for PC-Connected Interface Devices".
[in] | This | Indicates a pointer to the calling context. |
[in] | Attrib | Identifier for the attribute to retrieve. |
[out] | OutBuffer | A pointer to a buffer that will contain attribute data. |
[in,out] | OutBufferLength | On input, maximal size, in bytes, to store attribute data. On output, the size, in bytes, of attribute data. |
EFI_SUCCESS | The requested command completed successfully. |
EFI_INVALID_PARAMETER | This is NULL. |
EFI_INVALID_PARAMETER | OutBuffer is NULL or OutBufferLength is 0. |
EFI_BUFFER_TOO_SMALL | OutBufferLength is not big enough to hold the output parameters. OutBufferLength has been updated to the required value. |
EFI_UNSUPPORTED | Attribis not supported |
EFI_NO_MEDIA | There is no card in the reader and Attrib value requires one. |
EFI_NOT_READY | Attrib requires a powered card to operate. |
EFI_PROTOCOL_ERROR | A protocol error has occurred. |
EFI_TIMEOUT | The reader did not respond. |
EFI_DEVICE_ERROR | Any other error condition, typically a reader removal. |
Initiate a SPI transaction between the host and a SPI peripheral.
This routine must be called at or below TPL_NOTIFY. This routine works with the SPI bus layer to pass the SPI transaction to the SPI controller for execution on the SPI bus. There are four types of supported transactions supported by this routine: Full Duplex: WriteBuffer and ReadBuffer are the same size. Write Only: WriteBuffer contains data for SPI peripheral, ReadBytes = 0 Read Only: ReadBuffer to receive data from SPI peripheral, WriteBytes = 0 Write Then Read: WriteBuffer contains control data to write to SPI peripheral before data is placed into the ReadBuffer. Both WriteBytes and ReadBytes must be non-zero.
[in] | This | Pointer to an EFI_SPI_IO_PROTOCOL structure. |
[in] | TransactionType | Type of SPI transaction. |
[in] | DebugTransaction | Set TRUE only when debugging is desired. Debugging may be turned on for a single SPI transaction. Only this transaction will display debugging messages. All other transactions with this value set to FALSE will not display any debugging messages. |
[in] | ClockHz | Specify the ClockHz value as zero (0) to use the maximum clock frequency supported by the SPI controller and part. Specify a non-zero value only when a specific SPI transaction requires a reduced clock rate. |
[in] | BusWidth | Width of the SPI bus in bits: 1, 2, 4 |
[in] | FrameSize | Frame size in bits, range: 1 - 32 |
[in] | WriteBytes | The length of the WriteBuffer in bytes. Specify zero for read-only operations. |
[in] | WriteBuffer | The buffer containing data to be sent from the host to the SPI chip. Specify NULL for read only operations. Frame sizes 1-8 bits: UINT8 (one byte) per frame Frame sizes 7-16 bits: UINT16 (two bytes) per frame Frame sizes 17-32 bits: UINT32 (four bytes) per frame The transmit frame is in the least significant N bits. |
[in] | ReadBytes | The length of the ReadBuffer in bytes. Specify zero for write-only operations. |
[out] | ReadBuffer | The buffer to receeive data from the SPI chip during the transaction. Specify NULL for write only operations. Frame sizes 1-8 bits: UINT8 (one byte) per frame Frame sizes 7-16 bits: UINT16 (two bytes) per frame Frame sizes 17-32 bits: UINT32 (four bytes) per frame The received frame is in the least significant N bits. |
EFI_SUCCESS | The SPI transaction completed successfully |
EFI_BAD_BUFFER_SIZE | The writeBytes value was invalid |
EFI_BAD_BUFFER_SIZE | The ReadBytes value was invalid |
EFI_INVALID_PARAMETER | TransactionType is not valid, or BusWidth not supported by SPI peripheral or SPI host controller, or WriteBytes non-zero and WriteBuffer is NULL, or ReadBytes non-zero and ReadBuffer is NULL, or ReadBuffer != WriteBuffer for full-duplex type, or WriteBuffer was NULL, or TPL is too high |
EFI_OUT_OF_RESOURCES | Insufficient memory for SPI transaction |
EFI_UNSUPPORTED | The FrameSize is not supported by the SPI bus layer or the SPI host controller |
EFI_UNSUPPORTED | The SPI controller was not able to support |
Update the SPI peripheral associated with this SPI 10 instance.
Support socketed SPI parts by allowing the SPI peripheral driver to replace the SPI peripheral after the connection is made. An example use is socketed SPI NOR flash parts, where the size and parameters change depending upon device is in the socket.
[in] | This | Pointer to an EFI_SPI_IO_PROTOCOL structure. |
[in] | SpiPeripheral | Pointer to an EFI_SPI_PERIPHERAL structure. |
EFI_SUCCESS | The SPI peripheral was updated successfully |
EFI_INVALID_PARAMETER | The SpiPeripheral value is NULL, or the SpiPeripheral->SpiBus is NULL, or the SpiP eripheral - >SpiBus pointing at wrong bus, or the SpiP eripheral - >SpiPart is NULL |
Reset the block device hardware.
[in] | This | Indicates a pointer to the calling context. |
[in] | ExtendedVerification | Indicates that the driver may perform a more exhausive verification operation of the device during reset. |
EFI_SUCCESS | The device was reset. |
EFI_DEVICE_ERROR | The device is not functioning properly and could not be reset. |
Read BufferSize bytes from Lba into Buffer.
This function reads the requested number of blocks from the device. All the blocks are read, or an error is returned. If EFI_DEVICE_ERROR, EFI_NO_MEDIA,_or EFI_MEDIA_CHANGED is returned and non-blocking I/O is being used, the Event associated with this request will not be signaled.
[in] | This | Indicates a pointer to the calling context. |
[in] | MediaId | Id of the media, changes every time the media is replaced. |
[in] | Lba | The starting Logical Block Address to read from. |
[in,out] | Token | A pointer to the token associated with the transaction. |
[in] | BufferSize | Size of Buffer, must be a multiple of device block size. |
[out] | Buffer | A pointer to the destination buffer for the data. The caller is responsible for either having implicit or explicit ownership of the buffer. |
EFI_SUCCESS | The read request was queued if Token->Event is not NULL.The data was read correctly from the device if the Token->Event is NULL. |
EFI_DEVICE_ERROR | The device reported an error while performing the read. |
EFI_NO_MEDIA | There is no media in the device. |
EFI_MEDIA_CHANGED | The MediaId is not for the current media. |
EFI_BAD_BUFFER_SIZE | The BufferSize parameter is not a multiple of the intrinsic block size of the device. |
EFI_INVALID_PARAMETER | The read request contains LBAs that are not valid, or the buffer is not on proper alignment. |
EFI_OUT_OF_RESOURCES | The request could not be completed due to a lack of resources. |
Write BufferSize bytes from Lba into Buffer.
This function writes the requested number of blocks to the device. All blocks are written, or an error is returned.If EFI_DEVICE_ERROR, EFI_NO_MEDIA, EFI_WRITE_PROTECTED or EFI_MEDIA_CHANGED is returned and non-blocking I/O is being used, the Event associated with this request will not be signaled.
[in] | This | Indicates a pointer to the calling context. |
[in] | MediaId | The media ID that the write request is for. |
[in] | Lba | The starting logical block address to be written. The caller is responsible for writing to only legitimate locations. |
[in,out] | Token | A pointer to the token associated with the transaction. |
[in] | BufferSize | Size of Buffer, must be a multiple of device block size. |
[in] | Buffer | A pointer to the source buffer for the data. |
EFI_SUCCESS | The write request was queued if Event is not NULL. The data was written correctly to the device if the Event is NULL. |
EFI_WRITE_PROTECTED | The device can not be written to. |
EFI_NO_MEDIA | There is no media in the device. |
EFI_MEDIA_CHNAGED | The MediaId does not matched the current device. |
EFI_DEVICE_ERROR | The device reported an error while performing the write. |
EFI_BAD_BUFFER_SIZE | The Buffer was not a multiple of the block size of the device. |
EFI_INVALID_PARAMETER | The write request contains LBAs that are not valid, or the buffer is not on proper alignment. |
EFI_OUT_OF_RESOURCES | The request could not be completed due to a lack of resources. |
Flush the Block Device.
If EFI_DEVICE_ERROR, EFI_NO_MEDIA,_EFI_WRITE_PROTECTED or EFI_MEDIA_CHANGED is returned and non-blocking I/O is being used, the Event associated with this request will not be signaled.
[in] | This | Indicates a pointer to the calling context. |
[in,out] | Token | A pointer to the token associated with the transaction |
EFI_SUCCESS | The flush request was queued if Event is not NULL. All outstanding data was written correctly to the device if the Event is NULL. |
EFI_DEVICE_ERROR | The device reported an error while writting back the data. |
EFI_WRITE_PROTECTED | The device cannot be written to. |
EFI_NO_MEDIA | There is no media in the device. |
EFI_MEDIA_CHANGED | The MediaId is not for the current media. |
EFI_OUT_OF_RESOURCES | The request could not be completed due to a lack of resources. |
The async callback of AsyncReceiveEvent().
[in] | Data | Data received via asynchronous transfer. |
[in] | DataLength | The length of Data in bytes, received via asynchronous transfer. |
[in] | Context | Context passed from asynchronous transfer request. |
EFI_SUCCESS | The callback does execute successfully. |
Others | The callback doesn't execute successfully. |
Receive HCI event packet in non-blocking way.
The AsyncReceiveEvent() function receives HCI event packet in non-blocking way. Data in Callback function holds the whole HCI event packet, including EventCode, parameter length, and parameters.
[in] | This | Pointer to the EFI_BLUETOOTH_HC_PROTOCOL instance. |
[in] | IsNewTransfer | If TRUE, a new transfer will be submitted. If FALSE, the request is deleted. |
[in] | PollingInterval | Indicates the periodic rate, in milliseconds, that the transfer is to be executed. |
[in] | DataLength | Specifies the length, in bytes, of the data to be received. |
[in] | Callback | The callback function. This function is called if the asynchronous transfer is completed. |
[in] | Context | Data passed into Callback function. This is optional parameter and may be NULL. |
EFI_SUCCESS | The HCI asynchronous receive request is submitted successfully. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: DataLength is 0. If IsNewTransfer is TRUE, and an asynchronous receive request already exists. |
Receive HCI ACL data packet in non-blocking way.
The AsyncReceiveACLData() function receives HCI ACL data packet in non-blocking way. Data in Callback holds the whole HCI ACL data packet, including Handle, PB flag, BC flag, data length, and data.
[in] | This | Pointer to the EFI_BLUETOOTH_HC_PROTOCOL instance. |
[in] | IsNewTransfer | If TRUE, a new transfer will be submitted. If FALSE, the request is deleted. |
[in] | PollingInterval | Indicates the periodic rate, in milliseconds, that the transfer is to be executed. |
[in] | DataLength | Specifies the length, in bytes, of the data to be received. |
[in] | Callback | The callback function. This function is called if the asynchronous transfer is completed. |
[in] | Context | Data passed into Callback function. This is optional parameter and may be NULL. |
EFI_SUCCESS | The HCI asynchronous receive request is submitted successfully. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: DataLength is 0. If IsNewTransfer is TRUE, and an asynchronous receive request already exists. |
Receive HCI SCO data packet in non-blocking way.
The AsyncReceiveSCOData() function receives HCI SCO data packet in non-blocking way. Data in Callback holds the whole HCI SCO data packet, including ConnectionHandle, PacketStatus flag, data length, and data.
[in] | This | Pointer to the EFI_BLUETOOTH_HC_PROTOCOL instance. |
[in] | IsNewTransfer | If TRUE, a new transfer will be submitted. If FALSE, the request is deleted. |
[in] | PollingInterval | Indicates the periodic rate, in milliseconds, that the transfer is to be executed. |
[in] | DataLength | Specifies the length, in bytes, of the data to be received. |
[in] | Callback | The callback function. This function is called if the asynchronous transfer is completed. |
[in] | Context | Data passed into Callback function. This is optional parameter and may be NULL. |
EFI_SUCCESS | The HCI asynchronous receive request is submitted successfully. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: DataLength is 0. If IsNewTransfer is TRUE, and an asynchronous receive request already exists. |
Get the current status of the key management service.
[in] | This | Pointer to the EFI_KMS_PROTOCOL instance. |
EFI_SUCCESS | The KMS is ready for use. |
EFI_NOT_READY | No connection to the KMS is available. |
EFI_NO_MAPPING | No valid connection configuration exists for the KMS. |
EFI_NO_RESPONSE | No response was received from the KMS. |
EFI_DEVICE_ERROR | An error occurred when attempting to access the KMS. |
EFI_INVALID_PARAMETER | This is NULL. |
Register client information with the supported KMS.
[in] | This | Pointer to the EFI_KMS_PROTOCOL instance. |
[in] | Client | Pointer to a valid EFI_KMS_CLIENT_INFO structure. |
[in,out] | ClientDataSize | Pointer to the size, in bytes, of an arbitrary block of data specified by the ClientData parameter. This parameter may be NULL, in which case the ClientData parameter will be ignored and no data will be transferred to or from the KMS. If the parameter is not NULL, then ClientData must be a valid pointer. If the value pointed to is 0, no data will be transferred to the KMS, but data may be returned by the KMS. For all non-zero values *ClientData will be transferred to the KMS, which may also return data to the caller. In all cases, the value upon return to the caller will be the size of the data block returned to the caller, which will be zero if no data is returned from the KMS. |
[in,out] | ClientData | Pointer to a pointer to an arbitrary block of data of ClientDataSize that is to be passed directly to the KMS if it supports the use of client data. This parameter may be NULL if and only if the ClientDataSize parameter is also NULL. Upon return to the caller, *ClientData points to a block of data of ClientDataSize that was returned from the KMS. If the returned value for *ClientDataSize is zero, then the returned value for *ClientData must be NULL and should be ignored by the caller. The KMS protocol consumer is responsible for freeing all valid buffers used for client data regardless of whether they are allocated by the caller for input to the function or by the implementation for output back to the caller. |
EFI_SUCCESS | The client information has been accepted by the KMS. |
EFI_NOT_READY | No connection to the KMS is available. |
EFI_NO_RESPONSE | There was no response from the device or the key server. |
EFI_ACCESS_DENIED | Access was denied by the device or the key server. |
EFI_DEVICE_ERROR | An error occurred when attempting to access the KMS. |
EFI_OUT_OF_RESOURCES | Required resources were not available to perform the function. |
EFI_INVALID_PARAMETER | This is NULL. |
EFI_UNSUPPORTED | The KMS does not support the use of client identifiers. |
Request that the KMS generate one or more new keys and associate them with key identifiers. The key value(s) is returned to the caller.
[in] | This | Pointer to the EFI_KMS_PROTOCOL instance. |
[in] | Client | Pointer to a valid EFI_KMS_CLIENT_INFO structure. |
[in,out] | KeyDescriptorCount | Pointer to a count of the number of key descriptors to be processed by this operation. On return, this number will be updated with the number of key descriptors successfully processed. |
[in,out] | KeyDescriptors | Pointer to an array of EFI_KMS_KEY_DESCRIPTOR structures which describe the keys to be generated. On input, the KeyIdentifierSize and the KeyIdentifier may specify an identifier to be used for the key, but this is not required. The KeyFormat field must specify a key format GUID reported as supported by the KeyFormats field of the EFI_KMS_PROTOCOL. The value for this field in the first key descriptor will be considered the default value for subsequent key descriptors requested in this operation if those key descriptors have a NULL GUID in the key format field. On output, the KeyIdentifierSize and KeyIdentifier fields will specify an identifier for the key which will be either the original identifier if one was provided, or an identifier generated either by the KMS or the KMS protocol implementation. The KeyFormat field will be updated with the GUID used to generate the key if it was a NULL GUID, and the KeyValue field will contain a pointer to memory containing the key value for the generated key. Memory for both the KeyIdentifier and the KeyValue fields will be allocated with the BOOT_SERVICES_DATA type and must be freed by the caller when it is no longer needed. Also, the KeyStatus field must reflect the result of the request relative to that key. |
[in,out] | ClientDataSize | Pointer to the size, in bytes, of an arbitrary block of data specified by the ClientData parameter. This parameter may be NULL, in which case the ClientData parameter will be ignored and no data will be transferred to or from the KMS. If the parameter is not NULL, then ClientData must be a valid pointer. If the value pointed to is 0, no data will be transferred to the KMS, but data may be returned by the KMS. For all non-zero values *ClientData will be transferred to the KMS, which may also return data to the caller. In all cases, the value upon return to the caller will be the size of the data block returned to the caller, which will be zero if no data is returned from the KMS. |
[in,out] | ClientData | Pointer to a pointer to an arbitrary block of data of ClientDataSize that is to be passed directly to the KMS if it supports the use of client data. This parameter may be NULL if and only if the ClientDataSize parameter is also NULL. Upon return to the caller, *ClientData points to a block of data of ClientDataSize that was returned from the KMS. If the returned value for *ClientDataSize is zero, then the returned value for *ClientData must be NULL and should be ignored by the caller. The KMS protocol consumer is responsible for freeing all valid buffers used for client data regardless of whether they are allocated by the caller for input to the function or by the implementation for output back to the caller. |
EFI_SUCCESS | Successfully generated and retrieved all requested keys. |
EFI_UNSUPPORTED | This function is not supported by the KMS. –OR– One (or more) of the key requests submitted is not supported by the KMS. Check individual key request(s) to see which ones may have been processed. |
EFI_OUT_OF_RESOURCES | Required resources were not available to perform the function. |
EFI_TIMEOUT | Timed out waiting for device or key server. Check individual key request(s) to see which ones may have been processed. |
EFI_ACCESS_DENIED | Access was denied by the device or the key server; OR a ClientId is required by the server and either no id was provided or an invalid id was provided. |
EFI_DEVICE_ERROR | An error occurred when attempting to access the KMS. Check individual key request(s) to see which ones may have been processed. |
EFI_INVALID_PARAMETER | This is NULL, ClientId is required but it is NULL, KeyDescriptorCount is NULL, or Keys is NULL. |
EFI_NOT_FOUND | One or more EFI_KMS_KEY_DESCRIPTOR structures could not be processed properly. KeyDescriptorCount contains the number of structures which were successfully processed. Individual structures will reflect the status of the processing for that structure. |
Retrieve an existing key.
[in] | This | Pointer to the EFI_KMS_PROTOCOL instance. |
[in] | Client | Pointer to a valid EFI_KMS_CLIENT_INFO structure. |
[in,out] | KeyDescriptorCount | Pointer to a count of the number of key descriptors to be processed by this operation. On return, this number will be updated with the number of key descriptors successfully processed. |
[in,out] | KeyDescriptors | Pointer to an array of EFI_KMS_KEY_DESCRIPTOR structures which describe the keys to be retrieved from the KMS. On input, the KeyIdentifierSize and the KeyIdentifier must specify an identifier to be used to retrieve a specific key. All other fields in the descriptor should be NULL. On output, the KeyIdentifierSize and KeyIdentifier fields will be unchanged, while the KeyFormat and KeyValue fields will be updated values associated with this key identifier. Memory for the KeyValue field will be allocated with the BOOT_SERVICES_DATA type and must be freed by the caller when it is no longer needed. Also, the KeyStatus field will reflect the result of the request relative to the individual key descriptor. |
[in,out] | ClientDataSize | Pointer to the size, in bytes, of an arbitrary block of data specified by the ClientData parameter. This parameter may be NULL, in which case the ClientData parameter will be ignored and no data will be transferred to or from the KMS. If the parameter is not NULL, then ClientData must be a valid pointer. If the value pointed to is 0, no data will be transferred to the KMS, but data may be returned by the KMS. For all non-zero values *ClientData will be transferred to the KMS, which may also return data to the caller. In all cases, the value upon return to the caller will be the size of the data block returned to the caller, which will be zero if no data is returned from the KMS. |
[in,out] | ClientData | Pointer to a pointer to an arbitrary block of data of ClientDataSize that is to be passed directly to the KMS if it supports the use of client data. This parameter may be NULL if and only if the ClientDataSize parameter is also NULL. Upon return to the caller, *ClientData points to a block of data of ClientDataSize that was returned from the KMS. If the returned value for *ClientDataSize is zero, then the returned value for *ClientData must be NULL and should be ignored by the caller. The KMS protocol consumer is responsible for freeing all valid buffers used for client data regardless of whether they are allocated by the caller for input to the function or by the implementation for output back to the caller. |
EFI_SUCCESS | Successfully retrieved all requested keys. |
EFI_OUT_OF_RESOURCES | Could not allocate resources for the method processing. |
EFI_TIMEOUT | Timed out waiting for device or key server. Check individual key request(s) to see which ones may have been processed. |
EFI_BUFFER_TOO_SMALL | If multiple keys are associated with a single identifier, and the KeyValue buffer does not contain enough structures (KeyDescriptorCount) to contain all the key data, then the available structures will be filled and KeyDescriptorCount will be updated to indicate the number of keys which could not be processed. |
EFI_ACCESS_DENIED | Access was denied by the device or the key server; OR a ClientId is required by the server and either none or an invalid id was provided. |
EFI_DEVICE_ERROR | Device or key server error. Check individual key request(s) to see which ones may have been processed. |
EFI_INVALID_PARAMETER | This is NULL, ClientId is required but it is NULL, KeyDescriptorCount is NULL, or Keys is NULL. |
EFI_NOT_FOUND | One or more EFI_KMS_KEY_DESCRIPTOR structures could not be processed properly. KeyDescriptorCount contains the number of structures which were successfully processed. Individual structures will reflect the status of the processing for that structure. |
EFI_UNSUPPORTED | The implementation/KMS does not support this function. |
Add a new key.
[in] | This | Pointer to the EFI_KMS_PROTOCOL instance. |
[in] | Client | Pointer to a valid EFI_KMS_CLIENT_INFO structure. |
[in,out] | KeyDescriptorCount | Pointer to a count of the number of key descriptors to be processed by this operation. On normal return, this number will be updated with the number of key descriptors successfully processed. |
[in,out] | KeyDescriptors | Pointer to an array of EFI_KMS_KEY_DESCRIPTOR structures which describe the keys to be added. On input, the KeyId field for first key must contain valid identifier data to be used for adding a key to the KMS. The values for these fields in this key definition will be considered default values for subsequent keys requested in this operation. A value of 0 in any subsequent KeyId field will be replaced with the current default value. The KeyFormat and KeyValue fields for each key to be added must contain consistent values to be associated with the given KeyId. On return, the KeyStatus field will reflect the result of the operation for each key request. |
[in,out] | ClientDataSize | Pointer to the size, in bytes, of an arbitrary block of data specified by the ClientData parameter. This parameter may be NULL, in which case the ClientData parameter will be ignored and no data will be transferred to or from the KMS. If the parameter is not NULL, then ClientData must be a valid pointer. If the value pointed to is 0, no data will be transferred to the KMS, but data may be returned by the KMS. For all non-zero values *ClientData will be transferred to the KMS, which may also return data to the caller. In all cases, the value upon return to the caller will be the size of the data block returned to the caller, which will be zero if no data is returned from the KMS. |
[in,out] | ClientData | Pointer to a pointer to an arbitrary block of data of ClientDataSize that is to be passed directly to the KMS if it supports the use of client data. This parameter may be NULL if and only if the ClientDataSize parameter is also NULL. Upon return to the caller, *ClientData points to a block of data of ClientDataSize that was returned from the KMS. If the returned value for *ClientDataSize is zero, then the returned value for *ClientData must be NULL and should be ignored by the caller. The KMS protocol consumer is responsible for freeing all valid buffers used for client data regardless of whether they are allocated by the caller for input to the function or by the implementation for output back to the caller. |
EFI_SUCCESS | Successfully added all requested keys. |
EFI_OUT_OF_RESOURCES | Could not allocate required resources. |
EFI_TIMEOUT | Timed out waiting for device or key server. Check individual key request(s) to see which ones may have been processed. |
EFI_BUFFER_TOO_SMALL | If multiple keys are associated with a single identifier, and the KeyValue buffer does not contain enough structures (KeyDescriptorCount) to contain all the key data, then the available structures will be filled and KeyDescriptorCount will be updated to indicate the number of keys which could not be processed |
EFI_ACCESS_DENIED | Access was denied by the device or the key server; OR a ClientId is required by the server and either none or an invalid id was provided. |
EFI_DEVICE_ERROR | Device or key server error. Check individual key request(s) to see which ones may have been processed. |
EFI_INVALID_PARAMETER | This is NULL, ClientId is required but it is NULL, KeyDescriptorCount is NULL, or Keys is NULL. |
EFI_NOT_FOUND | One or more EFI_KMS_KEY_DESCRIPTOR structures could not be processed properly. KeyDescriptorCount contains the number of structures which were successfully processed. Individual structures will reflect the status of the processing for that structure. |
EFI_UNSUPPORTED | The implementation/KMS does not support this function. |
Delete an existing key from the KMS database.
[in] | This | Pointer to the EFI_KMS_PROTOCOL instance. |
[in] | Client | Pointer to a valid EFI_KMS_CLIENT_INFO structure. |
[in,out] | KeyDescriptorCount | Pointer to a count of the number of key descriptors to be processed by this operation. On normal return, this number will be updated with the number of key descriptors successfully processed. |
[in,out] | KeyDescriptors | Pointer to an array of EFI_KMS_KEY_DESCRIPTOR structures which describe the keys to be deleted. On input, the KeyId field for first key must contain valid identifier data to be used for adding a key to the KMS. The values for these fields in this key definition will be considered default values for subsequent keys requested in this operation. A value of 0 in any subsequent KeyId field will be replaced with the current default value. The KeyFormat and KeyValue fields are ignored, but should be 0. On return, the KeyStatus field will reflect the result of the operation for each key request. |
[in,out] | ClientDataSize | Pointer to the size, in bytes, of an arbitrary block of data specified by the ClientData parameter. This parameter may be NULL, in which case the ClientData parameter will be ignored and no data will be transferred to or from the KMS. If the parameter is not NULL, then ClientData must be a valid pointer. If the value pointed to is 0, no data will be transferred to the KMS, but data may be returned by the KMS. For all non-zero values *ClientData will be transferred to the KMS, which may also return data to the caller. In all cases, the value upon return to the caller will be the size of the data block returned to the caller, which will be zero if no data is returned from the KMS. |
[in,out] | ClientData | Pointer to a pointer to an arbitrary block of data of ClientDataSize that is to be passed directly to the KMS if it supports the use of client data. This parameter may be NULL if and only if the ClientDataSize parameter is also NULL. Upon return to the caller, *ClientData points to a block of data of ClientDataSize that was returned from the KMS. If the returned value for *ClientDataSize is zero, then the returned value for *ClientData must be NULL and should be ignored by the caller. The KMS protocol consumer is responsible for freeing all valid buffers used for client data regardless of whether they are allocated by the caller for input to the function or by the implementation for output back to the caller. |
EFI_SUCCESS | Successfully deleted all requested keys. |
EFI_OUT_OF_RESOURCES | Could not allocate required resources. |
EFI_TIMEOUT | Timed out waiting for device or key server. Check individual key request(s) to see which ones may have been processed. |
EFI_ACCESS_DENIED | Access was denied by the device or the key server; OR a ClientId is required by the server and either none or an invalid id was provided. |
EFI_DEVICE_ERROR | Device or key server error. Check individual key request(s) to see which ones may have been processed. |
EFI_INVALID_PARAMETER | This is NULL, ClientId is required but it is NULL, KeyDescriptorCount is NULL, or Keys is NULL. |
EFI_NOT_FOUND | One or more EFI_KMS_KEY_DESCRIPTOR structures could not be processed properly. KeyDescriptorCount contains the number of structures which were successfully processed. Individual structures will reflect the status of the processing for that structure. |
EFI_UNSUPPORTED | The implementation/KMS does not support this function. |
Get one or more attributes associated with a specified key identifier. If none are found, the returned attributes count contains a value of zero.
[in] | This | Pointer to the EFI_KMS_PROTOCOL instance. |
[in] | Client | Pointer to a valid EFI_KMS_CLIENT_INFO structure. |
[in] | KeyIdentifierSize | Pointer to the size in bytes of the KeyIdentifier variable. |
[in] | KeyIdentifier | Pointer to the key identifier associated with this key. |
[in,out] | KeyAttributesCount | Pointer to the number of EFI_KMS_KEY_ATTRIBUTE structures associated with the Key identifier. If none are found, the count value is zero on return. On input this value reflects the number of KeyAttributes that may be returned. On output, the value reflects the number of completed KeyAttributes structures found. |
[in,out] | KeyAttributes | Pointer to an array of EFI_KMS_KEY_ATTRIBUTE structures associated with the Key Identifier. On input, the fields in the structure should be NULL. On output, the attribute fields will have updated values for attributes associated with this key identifier. |
[in,out] | ClientDataSize | Pointer to the size, in bytes, of an arbitrary block of data specified by the ClientData parameter. This parameter may be NULL, in which case the ClientData parameter will be ignored and no data will be transferred to or from the KMS. If the parameter is not NULL, then ClientData must be a valid pointer. If the value pointed to is 0, no data will be transferred to the KMS, but data may be returned by the KMS. For all non-zero values *ClientData will be transferred to the KMS, which may also return data to the caller. In all cases, the value upon return to the caller will be the size of the data block returned to the caller, which will be zero if no data is returned from the KMS. |
[in,out] | ClientData | Pointer to a pointer to an arbitrary block of data of ClientDataSize that is to be passed directly to the KMS if it supports the use of client data. This parameter may be NULL if and only if the ClientDataSize parameter is also NULL. Upon return to the caller, *ClientData points to a block of data of ClientDataSize that was returned from the KMS. If the returned value for *ClientDataSize is zero, then the returned value for *ClientData must be NULL and should be ignored by the caller. The KMS protocol consumer is responsible for freeing all valid buffers used for client data regardless of whether they are allocated by the caller for input to the function or by the implementation for output back to the caller. |
EFI_SUCCESS | Successfully retrieved all key attributes. |
EFI_OUT_OF_RESOURCES | Could not allocate resources for the method processing. |
EFI_TIMEOUT | Timed out waiting for device or key server. Check individual key attribute request(s) to see which ones may have been processed. |
EFI_BUFFER_TOO_SMALL | If multiple key attributes are associated with a single identifier, and the KeyAttributes buffer does not contain enough structures (KeyAttributesCount) to contain all the key attributes data, then the available structures will be filled and KeyAttributesCount will be updated to indicate the number of key attributes which could not be processed. |
EFI_ACCESS_DENIED | Access was denied by the device or the key server; OR a ClientId is required by the server and either none or an invalid id was provided. |
EFI_DEVICE_ERROR | Device or key server error. Check individual key attribute request(s) (i.e. key attribute status for each) to see which ones may have been processed. |
EFI_INVALID_PARAMETER | This is NULL, ClientId is required but it is NULL, KeyIdentifierSize is NULL , or KeyIdentifier is NULL, or KeyAttributes is NULL, or KeyAttributesSize is NULL. |
EFI_NOT_FOUND | The KeyIdentifier could not be found. KeyAttributesCount contains zero. Individual structures will reflect the status of the processing for that structure. |
EFI_UNSUPPORTED | The implementation/KMS does not support this function. |
Add one or more attributes to a key specified by a key identifier.
[in] | This | Pointer to the EFI_KMS_PROTOCOL instance. |
[in] | Client | Pointer to a valid EFI_KMS_CLIENT_INFO structure. |
[in] | KeyIdentifierSize | Pointer to the size in bytes of the KeyIdentifier variable. |
[in] | KeyIdentifier | Pointer to the key identifier associated with this key. |
[in,out] | KeyAttributesCount | Pointer to the number of EFI_KMS_KEY_ATTRIBUTE structures to associate with the Key. On normal returns, this number will be updated with the number of key attributes successfully processed. |
[in,out] | KeyAttributes | Pointer to an array of EFI_KMS_KEY_ATTRIBUTE structures providing the attribute information to associate with the key. On input, the values for the fields in the structure are completely filled in. On return the KeyAttributeStatus field will reflect the result of the operation for each key attribute request. |
[in,out] | ClientDataSize | Pointer to the size, in bytes, of an arbitrary block of data specified by the ClientData parameter. This parameter may be NULL, in which case the ClientData parameter will be ignored and no data will be transferred to or from the KMS. If the parameter is not NULL, then ClientData must be a valid pointer. If the value pointed to is 0, no data will be transferred to the KMS, but data may be returned by the KMS. For all non-zero values *ClientData will be transferred to the KMS, which may also return data to the caller. In all cases, the value upon return to the caller will be the size of the data block returned to the caller, which will be zero if no data is returned from the KMS. |
[in,out] | ClientData | Pointer to a pointer to an arbitrary block of data of ClientDataSize that is to be passed directly to the KMS if it supports the use of client data. This parameter may be NULL if and only if the ClientDataSize parameter is also NULL. Upon return to the caller, *ClientData points to a block of data of ClientDataSize that was returned from the KMS. If the returned value for *ClientDataSize is zero, then the returned value for *ClientData must be NULL and should be ignored by the caller. The KMS protocol consumer is responsible for freeing all valid buffers used for client data regardless of whether they are allocated by the caller for input to the function or by the implementation for output back to the caller. |
EFI_SUCCESS | Successfully added all requested key attributes. |
EFI_OUT_OF_RESOURCES | Could not allocate required resources. |
EFI_TIMEOUT | Timed out waiting for device or key server. Check individual key attribute request(s) to see which ones may have been processed. |
EFI_BUFFER_TOO_SMALL | If multiple keys attributes are associated with a single key identifier, and the attributes buffer does not contain enough structures (KeyAttributesCount) to contain all the data, then the available structures will be filled and KeyAttributesCount will be updated to indicate the number of key attributes which could not be processed. The status of each key attribute is also updated indicating success or failure for that attribute in case there are other errors for those attributes that could be processed. |
EFI_ACCESS_DENIED | Access was denied by the device or the key server; OR a ClientId is required by the server and either none or an invalid id was provided. |
EFI_DEVICE_ERROR | Device or key server error. Check individual key attribute request(s) (i.e. key attribute status for each) to see which ones may have been processed. |
EFI_INVALID_PARAMETER | This is NULL, ClientId is required but it is NULL, KeyAttributesCount is NULL, or KeyAttributes is NULL, or KeyIdentifierSize is NULL, or KeyIdentifer is NULL. |
EFI_NOT_FOUND | The KeyIdentifier could not be found. On return the KeyAttributesCount contains the number of attributes processed. Individual structures will reflect the status of the processing for that structure. |
EFI_UNSUPPORTED | The implementation/KMS does not support this function. |
Delete attributes to a key specified by a key identifier.
[in] | This | Pointer to the EFI_KMS_PROTOCOL instance. |
[in] | Client | Pointer to a valid EFI_KMS_CLIENT_INFO structure. |
[in] | KeyIdentifierSize | Pointer to the size in bytes of the KeyIdentifier variable. |
[in] | KeyIdentifier | Pointer to the key identifier associated with this key. |
[in,out] | KeyAttributesCount | Pointer to the number of EFI_KMS_KEY_ATTRIBUTE structures to associate with the Key. On input, the count value is one or more. On normal returns, this number will be updated with the number of key attributes successfully processed. |
[in,out] | KeyAttributes | Pointer to an array of EFI_KMS_KEY_ATTRIBUTE structures providing the attribute information to associate with the key. On input, the values for the fields in the structure are completely filled in. On return the KeyAttributeStatus field will reflect the result of the operation for each key attribute request. |
[in,out] | ClientDataSize | Pointer to the size, in bytes, of an arbitrary block of data specified by the ClientData parameter. This parameter may be NULL, in which case the ClientData parameter will be ignored and no data will be transferred to or from the KMS. If the parameter is not NULL, then ClientData must be a valid pointer. If the value pointed to is 0, no data will be transferred to the KMS, but data may be returned by the KMS. For all non-zero values *ClientData will be transferred to the KMS, which may also return data to the caller. In all cases, the value upon return to the caller will be the size of the data block returned to the caller, which will be zero if no data is returned from the KMS. |
[in,out] | ClientData | Pointer to a pointer to an arbitrary block of data of ClientDataSize that is to be passed directly to the KMS if it supports the use of client data. This parameter may be NULL if and only if the ClientDataSize parameter is also NULL. Upon return to the caller, *ClientData points to a block of data of ClientDataSize that was returned from the KMS. If the returned value for *ClientDataSize is zero, then the returned value for *ClientData must be NULL and should be ignored by the caller. The KMS protocol consumer is responsible for freeing all valid buffers used for client data regardless of whether they are allocated by the caller for input to the function or by the implementation for output back to the caller. |
EFI_SUCCESS | Successfully deleted all requested key attributes. |
EFI_OUT_OF_RESOURCES | Could not allocate required resources. |
EFI_TIMEOUT | Timed out waiting for device or key server. Check individual key attribute request(s) to see which ones may have been processed. |
EFI_ACCESS_DENIED | Access was denied by the device or the key server; OR a ClientId is required by the server and either none or an invalid id was provided. |
EFI_DEVICE_ERROR | Device or key server error. Check individual key attribute request(s) (i.e. key attribute status for each) to see which ones may have been processed. |
EFI_INVALID_PARAMETER | This is NULL, ClientId is required but it is NULL, KeyAttributesCount is NULL, or KeyAttributes is NULL, or KeyIdentifierSize is NULL, or KeyIdentifer is NULL. |
EFI_NOT_FOUND | The KeyIdentifier could not be found or the attribute could not be found. On return the KeyAttributesCount contains the number of attributes processed. Individual structures will reflect the status of the processing for that structure. |
EFI_UNSUPPORTED | The implementation/KMS does not support this function. |
Retrieve one or more key that has matched all of the specified key attributes.
[in] | This | Pointer to the EFI_KMS_PROTOCOL instance. |
[in] | Client | Pointer to a valid EFI_KMS_CLIENT_INFO structure. |
[in,out] | KeyAttributesCount | Pointer to a count of the number of key attribute structures that must be matched for each returned key descriptor. On input the count value is one or more. On normal returns, this number will be updated with the number of key attributes successfully processed. |
[in,out] | KeyAttributes | Pointer to an array of EFI_KMS_KEY_ATTRIBUTE structure to search for. On input, the values for the fields in the structure are completely filled in. On return the KeyAttributeStatus field will reflect the result of the operation for each key attribute request. |
[in,out] | KeyDescriptorCount | Pointer to a count of the number of key descriptors matched by this operation. On entry, this number will be zero. On return, this number will be updated to the number of key descriptors successfully found. |
[in,out] | KeyDescriptors | Pointer to an array of EFI_KMS_KEY_DESCRIPTOR structures which describe the keys from the KMS having the KeyAttribute(s) specified. On input, this pointer will be NULL. On output, the array will contain an EFI_KMS_KEY_DESCRIPTOR structure for each key meeting the search criteria. Memory for the array and all KeyValue fields will be allocated with the EfiBootServicesData type and must be freed by the caller when it is no longer needed. Also, the KeyStatus field of each descriptor will reflect the result of the request relative to that key descriptor. |
[in,out] | ClientDataSize | Pointer to the size, in bytes, of an arbitrary block of data specified by the ClientData parameter. This parameter may be NULL, in which case the ClientData parameter will be ignored and no data will be transferred to or from the KMS. If the parameter is not NULL, then ClientData must be a valid pointer. If the value pointed to is 0, no data will be transferred to the KMS, but data may be returned by the KMS. For all non-zero values *ClientData will be transferred to the KMS, which may also return data to the caller. In all cases, the value upon return to the caller will be the size of the data block returned to the caller, which will be zero if no data is returned from the KMS. |
[in,out] | ClientData | Pointer to a pointer to an arbitrary block of data of ClientDataSize that is to be passed directly to the KMS if it supports the use of client data. This parameter may be NULL if and only if the ClientDataSize parameter is also NULL. Upon return to the caller, *ClientData points to a block of data of ClientDataSize that was returned from the KMS. If the returned value for *ClientDataSize is zero, then the returned value for *ClientData must be NULL and should be ignored by the caller. The KMS protocol consumer is responsible for freeing all valid buffers used for client data regardless of whether they are allocated by the caller for input to the function or by the implementation for output back to the caller. |
EFI_SUCCESS | Successfully retrieved all requested keys. |
EFI_OUT_OF_RESOURCES | Could not allocate required resources. |
EFI_TIMEOUT | Timed out waiting for device or key server. Check individual key attribute request(s) to see which ones may have been processed. |
EFI_BUFFER_TOO_SMALL | If multiple keys are associated with the attribute(s), and the KeyValue buffer does not contain enough structures (KeyDescriptorCount) to contain all the key data, then the available structures will be filled and KeyDescriptorCount will be updated to indicate the number of keys which could not be processed. |
EFI_ACCESS_DENIED | Access was denied by the device or the key server; OR a ClientId is required by the server and either none or an invalid id was provided. |
EFI_DEVICE_ERROR | Device or key server error. Check individual key attribute request(s) (i.e. key attribute status for each) to see which ones may have been processed. |
EFI_INVALID_PARAMETER | This is NULL, ClientId is required but it is NULL, KeyDescriptorCount is NULL, or KeyDescriptors is NULL or KeyAttributes is NULL, or KeyAttributesCount is NULL. |
EFI_NOT_FOUND | One or more EFI_KMS_KEY_ATTRIBUTE structures could not be processed properly. KeyAttributeCount contains the number of structures which were successfully processed. Individual structures will reflect the status of the processing for that structure. |
EFI_UNSUPPORTED | The implementation/KMS does not support this function. |
Execute the command line.
This function creates a nested instance of the shell and executes the specified command (CommandLine) with the specified environment (Environment). Upon return, the status code returned by the specified command is placed in StatusCode.
If Environment is NULL, then the current environment is used and all changes made by the commands executed will be reflected in the current environment. If the Environment is non-NULL, then the changes made will be discarded.
The CommandLine is executed from the current working directory on the current device.
[in] | ParentImageHandle | A handle of the image that is executing the specified command line. |
[in] | CommandLine | Points to the NULL-terminated UCS-2 encoded string containing the command line. If NULL then the command- line will be empty. |
[in] | Environment | Points to a NULL-terminated array of environment variables with the format 'x=y', where x is the environment variable name and y is the value. If this is NULL, then the current shell environment is used. |
[out] | ErrorCode | Points to the status code returned by the command. |
EFI_SUCCESS | The command executed successfully. The status code returned by the command is pointed to by StatusCode. |
EFI_INVALID_PARAMETER | The parameters are invalid. |
EFI_OUT_OF_RESOURCES | Out of resources. |
EFI_UNSUPPORTED | Nested shell invocations are not allowed. |
Frees the file list.
This function cleans up the file list and any related data structures. It has no impact on the files themselves.
[in] | FileList | The file list to free. Type EFI_SHELL_FILE_INFO is defined in OpenFileList(). |
EFI_SUCCESS | Free the file list successfully. |
Gets the name of the device specified by the device handle.
This function gets the user-readable name of the device specified by the device handle. If no user-readable name could be generated, then *BestDeviceName will be NULL and EFI_NOT_FOUND will be returned.
If EFI_DEVICE_NAME_USE_COMPONENT_NAME is set, then the function will return the device's name using the EFI_COMPONENT_NAME2_PROTOCOL, if present on DeviceHandle.
If EFI_DEVICE_NAME_USE_DEVICE_PATH is set, then the function will return the device's name using the EFI_DEVICE_PATH_PROTOCOL, if present on DeviceHandle. If both EFI_DEVICE_NAME_USE_COMPONENT_NAME and EFI_DEVICE_NAME_USE_DEVICE_PATH are set, then EFI_DEVICE_NAME_USE_COMPONENT_NAME will have higher priority.
[in] | DeviceHandle | The handle of the device. |
[in] | Flags | Determines the possible sources of component names. |
[in] | Language | A pointer to the language specified for the device name, in the same format as described in the UEFI specification, Appendix M. |
[out] | BestDeviceName | On return, points to the callee-allocated NULL- terminated name of the device. If no device name could be found, points to NULL. The name must be freed by the caller... |
EFI_SUCCESS | Get the name successfully. |
EFI_NOT_FOUND | Fail to get the device name. |
Return help information about a specific command.
This function returns the help information for the specified command. The help text can be internal to the shell or can be from a UEFI Shell manual page.
If Sections is specified, then each section name listed will be compared in a casesensitive manner, to the section names described in Appendix B. If the section exists, it will be appended to the returned help text. If the section does not exist, no information will be returned. If Sections is NULL, then all help text information available will be returned.
[in] | Command | Points to the NULL-terminated UEFI Shell command name. |
[in] | Sections | Points to the NULL-terminated comma-delimited section names to return. If NULL, then all sections will be returned. |
[out] | HelpText | On return, points to a callee-allocated buffer containing all specified help text. |
EFI_SUCCESS | The help text was returned. |
EFI_OUT_OF_RESOURCES | The necessary buffer could not be allocated to hold the returned help text. |
EFI_INVALID_PARAMETER | HelpText is NULL. |
EFI_NOT_FOUND | There is no help text available for Command. |
Opens a file or a directory by file name.
This function opens the specified file in the specified OpenMode and returns a file handle. If the file name begins with '>v', then the file handle which is returned refers to the shell environment variable with the specified name. If the shell environment variable exists, is non-volatile and the OpenMode indicates EFI_FILE_MODE_WRITE, then EFI_INVALID_PARAMETER is returned.
If the file name is '>i', then the file handle which is returned refers to the standard input. If the OpenMode indicates EFI_FILE_MODE_WRITE, then EFI_INVALID_PARAMETER is returned.
If the file name is '>o', then the file handle which is returned refers to the standard output. If the OpenMode indicates EFI_FILE_MODE_READ, then EFI_INVALID_PARAMETER is returned.
If the file name is '>e', then the file handle which is returned refers to the standard error. If the OpenMode indicates EFI_FILE_MODE_READ, then EFI_INVALID_PARAMETER is returned.
If the file name is 'NUL', then the file handle that is returned refers to the standard NUL file. If the OpenMode indicates EFI_FILE_MODE_READ, then EFI_INVALID_PARAMETER is returned.
If return EFI_SUCCESS, the FileHandle is the opened file's handle, else, the FileHandle is NULL.
[in] | FileName | Points to the NULL-terminated UCS-2 encoded file name. |
[out] | FileHandle | On return, points to the file handle. |
[in] | OpenMode | File open mode. Either EFI_FILE_MODE_READ or EFI_FILE_MODE_WRITE from section 12.4 of the UEFI Specification. |
EFI_SUCCESS | The file was opened. FileHandle has the opened file's handle. |
EFI_INVALID_PARAMETER | One of the parameters has an invalid value. FileHandle is NULL. |
EFI_UNSUPPORTED | Could not open the file path. FileHandle is NULL. |
EFI_NOT_FOUND | The specified file could not be found on the device or the file system could not be found on the device. FileHandle is NULL. |
EFI_NO_MEDIA | The device has no medium. FileHandle is NULL. |
EFI_MEDIA_CHANGED | The device has a different medium in it or the medium is no longer supported. FileHandle is NULL. |
EFI_DEVICE_ERROR | The device reported an error or can't get the file path according the FileName. FileHandle is NULL. |
EFI_VOLUME_CORRUPTED | The file system structures are corrupted. FileHandle is NULL. |
EFI_WRITE_PROTECTED | An attempt was made to create a file, or open a file for write when the media is write-protected. FileHandle is NULL. |
EFI_ACCESS_DENIED | The service denied access to the file. FileHandle is NULL. |
EFI_OUT_OF_RESOURCES | Not enough resources were available to open the file. FileHandle is NULL. |
EFI_VOLUME_FULL | The volume is full. FileHandle is NULL. |
Opens the files that match the path specified.
This function opens all of the files specified by Path. Wildcards are processed according to the rules specified in UEFI Shell 2.0 spec section 3.7.1. Each matching file has an EFI_SHELL_FILE_INFO structure created in a linked list.
[in] | Path | A pointer to the path string. |
[in] | OpenMode | Specifies the mode used to open each file, EFI_FILE_MODE_READ or EFI_FILE_MODE_WRITE. |
[in,out] | FileList | Points to the start of a list of files opened. |
EFI_SUCCESS | Create the file list successfully. |
Reads data from the file.
If FileHandle is not a directory, the function reads the requested number of bytes from the file at the file's current position and returns them in Buffer. If the read goes beyond the end of the file, the read length is truncated to the end of the file. The file's current position is increased by the number of bytes returned. If FileHandle is a directory, then an error is returned.
[in] | FileHandle | The opened file handle for read. |
[in] | ReadSize | On input, the size of Buffer, in bytes. On output, the amount of data read. |
[in,out] | Buffer | The buffer in which data is read. |
EFI_SUCCESS | Data was read. |
EFI_NO_MEDIA | The device has no media. |
EFI_DEVICE_ERROR | The device reported an error. |
EFI_VOLUME_CORRUPTED | The file system structures are corrupted. |
EFI_BUFFER_TO_SMALL | Buffer is too small. ReadSize contains required size. |
Deletes the duplicate file names files in the given file list.
[in] | FileList | A pointer to the first entry in the file list. |
EFI_SUCCESS | Always success. |
Changes the current directory on the specified device.
If the FileSystem is NULL, and the directory Dir does not contain a file system's mapped name, this function changes the current working directory. If FileSystem is NULL and the directory Dir contains a mapped name, then the current file system and the current directory on that file system are changed.
If FileSystem is not NULL, and Dir is NULL, then this changes the current working file system.
If FileSystem is not NULL and Dir is not NULL, then this function changes the current directory on the specified file system.
If the current working directory or the current working file system is changed then the cwd% environment variable will be updated.
[in] | FileSystem | A pointer to the file system's mapped name. If NULL, then the current working directory is changed. |
[in] | Dir | Points to the NULL-terminated directory on the device specified by FileSystem. |
NULL | Current directory does not exist. |
Sets the environment variable.
This function changes the current value of the specified environment variable. If the environment variable exists and the Value is an empty string, then the environment variable is deleted. If the environment variable exists and the Value is not an empty string, then the value of the environment variable is changed. If the environment variable does not exist and the Value is an empty string, there is no action. If the environment variable does not exist and the Value is a non-empty string, then the environment variable is created and assigned the specified value.
For a description of volatile and non-volatile environment variables, see UEFI Shell 2.0 specification section 3.6.1.
[in] | Name | Points to the NULL-terminated environment variable name. |
[in] | Value | Points to the NULL-terminated environment variable value. If the value is an empty string then the environment variable is deleted. |
[in] | Volatile | Indicates whether the variable is non-volatile (FALSE) or volatile (TRUE). |
EFI_SUCCESS | The environment variable was successfully updated. |
Manipulate the chip select for a SPI device.
This routine must be called at or below TPL_NOTIFY. Update the value of the chip select line for a SPI peripheral. The SPI bus layer calls this routine either in the board layer or in the SPI controller to manipulate the chip select pin at the start and end of a SPI transaction.
[in] | SpiPeripheral | The address of an EFI_SPI_PERIPHERAL data structure describing the SPI peripheral whose chip select pin is to be manipulated. The routine may access the ChipSelectParameter field to gain sufficient context to complete the operation. |
[in] | PinValue | The value to be applied to the chip select line of the SPI peripheral. |
EFI_SUCCESS | The chip select was set successfully |
EFI_NOT_READY | Support for the chip select is not properly initialized |
EFI_INVALID_PARAMETER | The SpiPeripheral->ChipSelectParameter value is invalid |
Set up the clock generator to produce the correct clock frequency, phase and polarity for a SPI chip.
This routine must be called at or below TPL_NOTIFY. This routine updates the clock generator to generate the correct frequency and polarity for the SPI clock.
[in] | SpiPeripheral | Pointer to a EFI_SPI_PERIPHERAL data structure from which the routine can access the ClockParameter, ClockPhase and ClockPolarity fields. The routine also has access to the names for the SPI bus and chip which can be used during debugging. |
[in] | ClockHz | Pointer to the requested clock frequency. The clock generator will choose a supported clock frequency which is less then or equal to this value. Specify zero to turn the clock generator off. The actual clock frequency supported by the clock generator will be returned. |
EFI_SUCCESS | The clock was set up successfully |
EFI_UNSUPPORTED | The SPI controller was not able to support the frequency requested by CLockHz |
Returns information about the regular expression syntax types supported by the implementation.
This A pointer to the EFI_REGULAR_EXPRESSION_PROTOCOL instance.
RegExSyntaxTypeListSize On input, the size in bytes of RegExSyntaxTypeList. On output with a return code of EFI_SUCCESS, the size in bytes of the data returned in RegExSyntaxTypeList. On output with a return code of EFI_BUFFER_TOO_SMALL, the size of RegExSyntaxTypeListrequired to obtain the list.
RegExSyntaxTypeList A caller-allocated memory buffer filled by the driver with one EFI_REGEX_SYNTAX_TYPEelement for each supported Regular expression syntax type. The list must not change across multiple calls to the same driver. The first syntax type in the list is the default type for the driver.
EFI_SUCCESS | The regular expression syntax types list was returned successfully. |
EFI_UNSUPPORTED | The service is not supported by this driver. |
EFI_DEVICE_ERROR | The list of syntax types could not be retrieved due to a hardware or firmware error. |
EFI_BUFFER_TOO_SMALL | The buffer RegExSyntaxTypeList is too small to hold the result. |
EFI_INVALID_PARAMETER | RegExSyntaxTypeListSize is NULL |
Checks if the input string matches to the regular expression pattern.
This A pointer to the EFI_REGULAR_EXPRESSION_PROTOCOL instance. Type EFI_REGULAR_EXPRESSION_PROTOCOL is defined in Section XYZ.
String A pointer to a NULL terminated string to match against the regular expression string specified by Pattern.
Pattern A pointer to a NULL terminated string that represents the regular expression.
SyntaxType A pointer to the EFI_REGEX_SYNTAX_TYPE that identifies the regular expression syntax type to use. May be NULL in which case the function will use its default regular expression syntax type.
Result On return, points to TRUE if String fully matches against the regular expression Pattern using the regular expression SyntaxType. Otherwise, points to FALSE.
Captures A Pointer to an array of EFI_REGEX_CAPTURE objects to receive the captured groups in the event of a match. The full sub-string match is put in Captures[0], and the results of N capturing groups are put in Captures[1:N]. If Captures is NULL, then this function doesn't allocate the memory for the array and does not build up the elements. It only returns the number of matching patterns in CapturesCount. If Captures is not NULL, this function returns a pointer to an array and builds up the elements in the array. CapturesCount is also updated to the number of matching patterns found. It is the caller's responsibility to free the memory pool in Captures and in each CapturePtr in the array elements.
CapturesCount On output, CapturesCount is the number of matching patterns found in String. Zero means no matching patterns were found in the string.
EFI_SUCCESS | The regular expression string matching completed successfully. |
EFI_UNSUPPORTED | The regular expression syntax specified by SyntaxTypeis not supported by this driver. |
EFI_DEVICE_ERROR | The regular expression string matching failed due to a hardware or firmware error. |
EFI_INVALID_PARAMETER | String, Pattern, Result, or CapturesCountis NULL. |
Callback function, it is called when asynchronous transfer is completed.
[in] | ChannelID | Bluetooth L2CAP message channel ID. |
[in] | Data | Data received via asynchronous transfer. |
[in] | DataLength | The length of Data in bytes, received via asynchronous transfer. |
[in] | Context | Context passed from asynchronous transfer request. |
EFI_SUCCESS | The callback function complete successfully. |
Callback function, it is called when asynchronous transfer is completed.
[in] | Data | Data received via asynchronous transfer. |
[in] | DataLength | The length of Data in bytes, received via asynchronous transfer. |
[in] | Context | Context passed from asynchronous transfer request. |
EFI_SUCCESS | The callback function complete successfully. |
Create HTTP header based on a combination of seed header, fields to delete, and fields to append.
The Build() function is used to manage the headers portion of an HTTP message by providing the ability to add, remove, or replace HTTP headers.
[in] | This | Pointer to EFI_HTTP_UTILITIES_PROTOCOL instance. |
[in] | SeedMessageSize | Size of the initial HTTP header. This can be zero. |
[in] | SeedMessage | Initial HTTP header to be used as a base for building a new HTTP header. If NULL, SeedMessageSize is ignored. |
[in] | DeleteCount | Number of null-terminated HTTP header field names in DeleteList. |
[in] | DeleteList | List of null-terminated HTTP header field names to remove from SeedMessage. Only the field names are in this list because the field values are irrelevant to this operation. |
[in] | AppendCount | Number of header fields in AppendList. |
[in] | AppendList | List of HTTP headers to populate NewMessage with. If SeedMessage is not NULL, AppendList will be appended to the existing list from SeedMessage in NewMessage. |
[out] | NewMessageSize | Pointer to number of header fields in NewMessage. |
[out] | NewMessage | Pointer to a new list of HTTP headers based on. |
EFI_SUCCESS | Add, remove, and replace operations succeeded. |
EFI_OUT_OF_RESOURCES | Could not allocate memory for NewMessage. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: This is NULL. |
Parses HTTP header and produces an array of key/value pairs.
The Parse() function is used to transform data stored in HttpHeader into a list of fields paired with their corresponding values.
[in] | This | Pointer to EFI_HTTP_UTILITIES_PROTOCOL instance. |
[in] | HttpMessage | Contains raw unformatted HTTP header string. |
[in] | HttpMessageSize | Size of HTTP header. |
[out] | HeaderFields | Array of key/value header pairs. |
[out] | FieldCount | Number of headers in HeaderFields. |
EFI_SUCCESS | Allocation succeeded. |
EFI_NOT_STARTED | This EFI HTTP Protocol instance has not been initialized. |
EFI_INVALID_PARAMETER | One or more of the following conditions is TRUE: This is NULL. HttpMessage is NULL. HeaderFields is NULL. FieldCount is NULL. |
Callback function, it is called if a Bluetooth device is found during scan process.
This | Pointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance. |
Context | Context passed from scan request. |
CallbackInfo | Data related to scan result. NULL CallbackInfo means scan complete. |
EFI_SUCCESS | The callback function complete successfully. |
Set the frequency for the I2C clock line.
This routine must be called at or below TPL_NOTIFY.
The software and controller do a best case effort of using the specified frequency for the I2C bus. If the frequency does not match exactly then the I2C master protocol selects the next lower frequency to avoid exceeding the operating conditions for any of the I2C devices on the bus. For example if 400 KHz was specified and the controller's divide network only supports 402 KHz or 398 KHz then the I2C master protocol selects 398 KHz. If there are not lower frequencies available, then return EFI_UNSUPPORTED.
[in] | This | Pointer to an EFI_I2C_MASTER_PROTOCOL structure |
[in] | BusClockHertz | Pointer to the requested I2C bus clock frequency in Hertz. Upon return this value contains the actual frequency in use by the I2C controller. |
EFI_SUCCESS | The bus frequency was set successfully. |
EFI_ALREADY_STARTED | The controller is busy with another transaction. |
EFI_INVALID_PARAMETER | BusClockHertz is NULL |
EFI_UNSUPPORTED | The controller does not support this frequency. |
Reset the I2C controller and configure it for use
This routine must be called at or below TPL_NOTIFY.
The I2C controller is reset. The caller must call SetBusFrequench() after calling Reset().
[in] | This | Pointer to an EFI_I2C_MASTER_PROTOCOL structure. |
EFI_SUCCESS | The reset completed successfully. |
EFI_ALREADY_STARTED | The controller is busy with another transaction. |
EFI_DEVICE_ERROR | The reset operation failed. |
Start an I2C transaction on the host controller.
This routine must be called at or below TPL_NOTIFY. For synchronous requests this routine must be called at or below TPL_CALLBACK.
This function initiates an I2C transaction on the controller. To enable proper error handling by the I2C protocol stack, the I2C master protocol does not support queuing but instead only manages one I2C transaction at a time. This API requires that the I2C bus is in the correct configuration for the I2C transaction.
The transaction is performed by sending a start-bit and selecting the I2C device with the specified I2C slave address and then performing the specified I2C operations. When multiple operations are requested they are separated with a repeated start bit and the slave address. The transaction is terminated with a stop bit.
When Event is NULL, StartRequest operates synchronously and returns the I2C completion status as its return value.
When Event is not NULL, StartRequest synchronously returns EFI_SUCCESS indicating that the I2C transaction was started asynchronously. The transaction status value is returned in the buffer pointed to by I2cStatus upon the completion of the I2C transaction when I2cStatus is not NULL. After the transaction status is returned the Event is signaled.
Note: The typical consumer of this API is the I2C host protocol. Extreme care must be taken by other consumers of this API to prevent confusing the third party I2C drivers due to a state change at the I2C device which the third party I2C drivers did not initiate. I2C platform specific code may use this API within these guidelines.
[in] | This | Pointer to an EFI_I2C_MASTER_PROTOCOL structure. |
[in] | SlaveAddress | Address of the device on the I2C bus. Set the I2C_ADDRESSING_10_BIT when using 10-bit addresses, clear this bit for 7-bit addressing. Bits 0-6 are used for 7-bit I2C slave addresses and bits 0-9 are used for 10-bit I2C slave addresses. |
[in] | RequestPacket | Pointer to an EFI_I2C_REQUEST_PACKET structure describing the I2C transaction. |
[in] | Event | Event to signal for asynchronous transactions, NULL for asynchronous transactions |
[out] | I2cStatus | Optional buffer to receive the I2C transaction completion status |
EFI_SUCCESS | The asynchronous transaction was successfully started when Event is not NULL. |
EFI_SUCCESS | The transaction completed successfully when Event is NULL. |
EFI_ALREADY_STARTED | The controller is busy with another transaction. |
EFI_BAD_BUFFER_SIZE | The RequestPacket->LengthInBytes value is too large. |
EFI_DEVICE_ERROR | There was an I2C error (NACK) during the transaction. |
EFI_INVALID_PARAMETER | RequestPacket is NULL |
EFI_NOT_FOUND | Reserved bit set in the SlaveAddress parameter |
EFI_NO_RESPONSE | The I2C device is not responding to the slave address. EFI_DEVICE_ERROR will be returned if the controller cannot distinguish when the NACK occurred. |
EFI_OUT_OF_RESOURCES | Insufficient memory for I2C transaction |
EFI_UNSUPPORTED | The controller does not support the requested transaction. |
Sends SD command to an SD card that is attached to the SD controller.
The PassThru() function sends the SD command specified by Packet to the SD card specified by Slot.
If Packet is successfully sent to the SD card, then EFI_SUCCESS is returned.
If a device error occurs while sending the Packet, then EFI_DEVICE_ERROR is returned.
If Slot is not in a valid range for the SD controller, then EFI_INVALID_PARAMETER is returned.
If Packet defines a data command but both InDataBuffer and OutDataBuffer are NULL, EFI_INVALID_PARAMETER is returned.
[in] | This | A pointer to the EFI_SD_MMC_PASS_THRU_PROTOCOL instance. |
[in] | Slot | The slot number of the SD card to send the command to. |
[in,out] | Packet | A pointer to the SD command data structure. |
[in] | Event | If Event is NULL, blocking I/O is performed. If Event is not NULL, then nonblocking I/O is performed, and Event will be signaled when the Packet completes. |
EFI_SUCCESS | The SD Command Packet was sent by the host. |
EFI_DEVICE_ERROR | A device error occurred while attempting to send the SD command Packet. |
EFI_INVALID_PARAMETER | Packet, Slot, or the contents of the Packet is invalid. |
EFI_INVALID_PARAMETER | Packet defines a data command but both InDataBuffer and OutDataBuffer are NULL. |
EFI_NO_MEDIA | SD Device not present in the Slot. |
EFI_UNSUPPORTED | The command described by the SD Command Packet is not supported by the host controller. |
EFI_BAD_BUFFER_SIZE | The InTransferLength or OutTransferLength exceeds the limit supported by SD card ( i.e. if the number of bytes exceed the Last LBA). |
Used to retrieve next slot numbers supported by the SD controller. The function returns information about all available slots (populated or not-populated).
The GetNextSlot() function retrieves the next slot number on an SD controller. If on input Slot is 0xFF, then the slot number of the first slot on the SD controller is returned.
If Slot is a slot number that was returned on a previous call to GetNextSlot(), then the slot number of the next slot on the SD controller is returned.
If Slot is not 0xFF and Slot was not returned on a previous call to GetNextSlot(), EFI_INVALID_PARAMETER is returned.
If Slot is the slot number of the last slot on the SD controller, then EFI_NOT_FOUND is returned.
[in] | This | A pointer to the EFI_SD_MMMC_PASS_THRU_PROTOCOL instance. |
[in,out] | Slot | On input, a pointer to a slot number on the SD controller. On output, a pointer to the next slot number on the SD controller. An input value of 0xFF retrieves the first slot number on the SD controller. |
EFI_SUCCESS | The next slot number on the SD controller was returned in Slot. |
EFI_NOT_FOUND | There are no more slots on this SD controller. |
EFI_INVALID_PARAMETER | Slot is not 0xFF and Slot was not returned on a previous call to GetNextSlot(). |
Used to allocate and build a device path node for an SD card on the SD controller.
The BuildDevicePath() function allocates and builds a single device node for the SD card specified by Slot.
If the SD card specified by Slot is not present on the SD controller, then EFI_NOT_FOUND is returned.
If DevicePath is NULL, then EFI_INVALID_PARAMETER is returned.
If there are not enough resources to allocate the device path node, then EFI_OUT_OF_RESOURCES is returned.
Otherwise, DevicePath is allocated with the boot service AllocatePool(), the contents of DevicePath are initialized to describe the SD card specified by Slot, and EFI_SUCCESS is returned.
[in] | This | A pointer to the EFI_SD_MMMC_PASS_THRU_PROTOCOL instance. |
[in] | Slot | Specifies the slot number of the SD card for which a device path node is to be allocated and built. |
[out] | DevicePath | A pointer to a single device path node that describes the SD card specified by Slot. This function is responsible for allocating the buffer DevicePath with the boot service AllocatePool(). It is the caller's responsibility to free DevicePath when the caller is finished with DevicePath. |
EFI_SUCCESS | The device path node that describes the SD card specified by Slot was allocated and returned in DevicePath. |
EFI_NOT_FOUND | The SD card specified by Slot does not exist on the SD controller. |
EFI_INVALID_PARAMETER | DevicePath is NULL. |
EFI_OUT_OF_RESOURCES | There are not enough resources to allocate DevicePath. |
This function retrieves an SD card slot number based on the input device path.
The GetSlotNumber() function retrieves slot number for the SD card specified by the DevicePath node. If DevicePath is NULL, EFI_INVALID_PARAMETER is returned.
If DevicePath is not a device path node type that the SD Pass Thru driver supports, EFI_UNSUPPORTED is returned.
[in] | This | A pointer to the EFI_SD_MMC_PASS_THRU_PROTOCOL instance. |
[in] | DevicePath | A pointer to the device path node that describes a SD card on the SD controller. |
[out] | Slot | On return, points to the slot number of an SD card on the SD controller. |
EFI_SUCCESS | SD card slot number is returned in Slot. |
EFI_INVALID_PARAMETER | Slot or DevicePath is NULL. |
EFI_UNSUPPORTED | DevicePath is not a device path node type that the SD Pass Thru driver supports. |
Resets an SD card that is connected to the SD controller.
The ResetDevice() function resets the SD card specified by Slot.
If this SD controller does not support a device reset operation, EFI_UNSUPPORTED is returned.
If Slot is not in a valid slot number for this SD controller, EFI_INVALID_PARAMETER is returned.
If the device reset operation is completed, EFI_SUCCESS is returned.
[in] | This | A pointer to the EFI_SD_MMC_PASS_THRU_PROTOCOL instance. |
[in] | Slot | Specifies the slot number of the SD card to be reset. |
EFI_SUCCESS | The SD card specified by Slot was reset. |
EFI_UNSUPPORTED | The SD controller does not support a device reset operation. |
EFI_INVALID_PARAMETER | Slot number is invalid. |
EFI_NO_MEDIA | SD Device not present in the Slot. |
EFI_DEVICE_ERROR | The reset command failed due to a device error |
Queue an I2C transaction for execution on the I2C controller.
This routine must be called at or below TPL_NOTIFY. For synchronous requests this routine must be called at or below TPL_CALLBACK.
The I2C host protocol uses the concept of I2C bus configurations to describe the I2C bus. An I2C bus configuration is defined as a unique setting of the multiplexers and switches in the I2C bus which enable access to one or more I2C devices. When using a switch to divide a bus, due to bus frequency differences, the I2C bus configuration management protocol defines an I2C bus configuration for the I2C devices on each side of the switch. When using a multiplexer, the I2C bus configuration management defines an I2C bus configuration for each of the selector values required to control the multiplexer. See Figure 1 in the I2C -bus specification and user manual for a complex I2C bus configuration.
The I2C host protocol processes all transactions in FIFO order. Prior to performing the transaction, the I2C host protocol calls EnableI2cBusConfiguration to reconfigure the switches and multiplexers in the I2C bus enabling access to the specified I2C device. The EnableI2cBusConfiguration also selects the I2C bus frequency for the I2C device. After the I2C bus is configured, the I2C host protocol calls the I2C master protocol to start the I2C transaction.
When Event is NULL, QueueRequest() operates synchronously and returns the I2C completion status as its return value.
When Event is not NULL, QueueRequest() synchronously returns EFI_SUCCESS indicating that the asynchronously I2C transaction was queued. The values above are returned in the buffer pointed to by I2cStatus upon the completion of the I2C transaction when I2cStatus is not NULL.
[in] | This | Pointer to an EFI_I2C_HOST_PROTOCOL structure. |
[in] | I2cBusConfiguration | I2C bus configuration to access the I2C device |
[in] | SlaveAddress | Address of the device on the I2C bus. Set the I2C_ADDRESSING_10_BIT when using 10-bit addresses, clear this bit for 7-bit addressing. Bits 0-6 are used for 7-bit I2C slave addresses and bits 0-9 are used for 10-bit I2C slave addresses. |
[in] | Event | Event to signal for asynchronous transactions, NULL for synchronous transactions |
[in] | RequestPacket | Pointer to an EFI_I2C_REQUEST_PACKET structure describing the I2C transaction |
[out] | I2cStatus | Optional buffer to receive the I2C transaction completion status |
EFI_SUCCESS | The asynchronous transaction was successfully queued when Event is not NULL. |
EFI_SUCCESS | The transaction completed successfully when Event is NULL. |
EFI_BAD_BUFFER_SIZE | The RequestPacket->LengthInBytes value is too large. |
EFI_DEVICE_ERROR | There was an I2C error (NACK) during the transaction. |
EFI_INVALID_PARAMETER | RequestPacket is NULL |
EFI_NOT_FOUND | Reserved bit set in the SlaveAddress parameter |
EFI_NO_MAPPING | Invalid I2cBusConfiguration value |
EFI_NO_RESPONSE | The I2C device is not responding to the slave address. EFI_DEVICE_ERROR will be returned if the controller cannot distinguish when the NACK occurred. |
EFI_OUT_OF_RESOURCES | Insufficient memory for I2C transaction |
EFI_UNSUPPORTED | The controller does not support the requested transaction. |
Set the erase block opcode.
This routine must be called at or below TPL_NOTIFY. The menu table contains SPI transaction opcodes which are accessible after the legacy SPI flash controller's configuration is locked. The board layer specifies the erase block size for the SPI NOR flash part. The SPI NOR flash peripheral driver selects the erase block opcode which matches the erase block size and uses this API to load the opcode into the opcode menu table.
[in] | This | Pointer to an EFI_LEGACY_SPI_CONTROLLER_PROTOCOL structure. |
[in] | EraseBlockOpcode | Erase block opcode to be placed into the opcode menu table. |
EFI_SUCCESS | The opcode menu table was updated |
EFI_ACCESS_ERROR | The SPI controller is locked |
Set the write status prefix opcode.
This routine must be called at or below TPL_NOTIFY. The prefix table contains SPI transaction write prefix opcodes which are accessible after the legacy SPI flash controller's configuration is locked. The board layer specifies the write status prefix opcode for the SPI NOR flash part. The SPI NOR flash peripheral driver uses this API to load the opcode into the prefix table.
[in] | This | Pointer to an EFI_LEGACY_SPI_CONTROLLER_PROTOCOL structure. |
[in] | WriteStatusPrefix | Prefix opcode for the write status command. |
EFI_SUCCESS | The prefix table was updated |
EFI_ACCESS_ERROR | The SPI controller is locked |
Set the BIOS base address.
This routine must be called at or below TPL_NOTIFY. The BIOS base address works with the protect range registers to protect portions of the SPI NOR flash from erase and write operat ions. The BIOS calls this API prior to passing control to the OS loader.
[in] | This | Pointer to an EFI_LEGACY_SPI_CONTROLLER_PROTOCOL structure. |
[in] | BiosBaseAddress | The BIOS base address. |
EFI_SUCCESS | The BIOS base address was properly set |
EFI_ACCESS_ERROR | The SPI controller is locked |
EFI_INVALID_PARAMETER | The BIOS base address is greater than This->Maxi.mumOffset |
EFI_UNSUPPORTED | The BIOS base address was already set |
Clear the SPI protect range registers.
This routine must be called at or below TPL_NOTIFY. The BIOS uses this routine to set an initial condition on the SPI protect range registers.
[in] | This | Pointer to an EFI_LEGACY_SPI_CONTROLLER_PROTOCOL structure. |
EFI_SUCCESS | The registers were successfully cleared |
EFI_ACCESS_ERROR | The SPI controller is locked |
Set the next protect range register.
This routine must be called at or below TPL_NOTIFY. The BIOS sets the protect range register to prevent write and erase operations to a portion of the SPI NOR flash device.
[in] | This | Pointer to an EFI_LEGACY_SPI_CONTROLLER_PROTOCOL structure. |
[in] | BiosAddress | Address within a 4 KiB block to start protecting. |
[in] | BlocksToProtect | The number of 4 KiB blocks to protect. |
EFI_SUCCESS | The register was successfully updated |
EFI_ACCESS_ERROR | The SPI controller is locked |
EFI_INVALID_PARAMETER | BiosAddress < This->BiosBaseAddress, or BlocksToProtect * 4 KiB > This->MaximumRangeBytes, or BiosAddress - This->BiosBaseAddress
|
EFI_OUT_OF_RESOURCES | No protect range register available |
EFI_UNSUPPORTED | Call This->SetBaseAddress because the BIOS base address is not set |
Lock the SPI controller configuration.
This routine must be called at or below TPL_NOTIFY. This routine locks the SPI controller's configuration so that the software is no longer able to update: Prefix table Opcode menu Opcode type table BIOS base address Protect range registers
[in] | This | Pointer to an EFI_LEGACY_SPI_CONTROLLER_PROTOCOL structure. |
EFI_SUCCESS | The SPI controller was successfully locked |
EFI_ALREADY_STARTED | The SPI controller was already locked |
The EFI_TCG2_PROTOCOL GetCapability function call provides protocol capability information and state information.
[in] | This | Indicates the calling context |
[in,out] | ProtocolCapability | The caller allocates memory for a EFI_TCG2_BOOT_SERVICE_CAPABILITY structure and sets the size field to the size of the structure allocated. The callee fills in the fields with the EFI protocol capability information and the current EFI TCG2 state information up to the number of fields which fit within the size of the structure passed in. |
EFI_SUCCESS | Operation completed successfully. |
EFI_DEVICE_ERROR | The command was unsuccessful. The ProtocolCapability variable will not be populated. |
EFI_INVALID_PARAMETER | One or more of the parameters are incorrect. The ProtocolCapability variable will not be populated. |
EFI_BUFFER_TOO_SMALL | The ProtocolCapability variable is too small to hold the full response. It will be partially populated (required Size field will be set). |
The EFI_TCG2_PROTOCOL Get Event Log function call allows a caller to retrieve the address of a given event log and its last entry.
[in] | This | Indicates the calling context |
[in] | EventLogFormat | The type of the event log for which the information is requested. |
[out] | EventLogLocation | A pointer to the memory address of the event log. |
[out] | EventLogLastEntry | If the Event Log contains more than one entry, this is a pointer to the address of the start of the last entry in the event log in memory. |
[out] | EventLogTruncated | If the Event Log is missing at least one entry because an event would have exceeded the area allocated for events, this value is set to TRUE. Otherwise, the value will be FALSE and the Event Log will be complete. |
EFI_SUCCESS | Operation completed successfully. |
EFI_INVALID_PARAMETER | One or more of the parameters are incorrect (e.g. asking for an event log whose format is not supported). |
The EFI_TCG2_PROTOCOL HashLogExtendEvent function call provides callers with an opportunity to extend and optionally log events without requiring knowledge of actual TPM commands. The extend operation will occur even if this function cannot create an event log entry (e.g. due to the event log being full).
[in] | This | Indicates the calling context |
[in] | Flags | Bitmap providing additional information. |
[in] | DataToHash | Physical address of the start of the data buffer to be hashed. |
[in] | DataToHashLen | The length in bytes of the buffer referenced by DataToHash. |
[in] | EfiTcgEvent | Pointer to data buffer containing information about the event. |
EFI_SUCCESS | Operation completed successfully. |
EFI_DEVICE_ERROR | The command was unsuccessful. |
EFI_VOLUME_FULL | The extend operation occurred, but the event could not be written to one or more event logs. |
EFI_INVALID_PARAMETER | One or more of the parameters are incorrect. |
EFI_UNSUPPORTED | The PE/COFF image type is not supported. |
This service enables the sending of commands to the TPM.
[in] | This | Indicates the calling context |
[in] | InputParameterBlockSize | Size of the TPM input parameter block. |
[in] | InputParameterBlock | Pointer to the TPM input parameter block. |
[in] | OutputParameterBlockSize | Size of the TPM output parameter block. |
[in] | OutputParameterBlock | Pointer to the TPM output parameter block. |
EFI_SUCCESS | The command byte stream was successfully sent to the device and a response was successfully received. |
EFI_DEVICE_ERROR | The command was not successfully sent to the device or a response was not successfully received from the device. |
EFI_INVALID_PARAMETER | One or more of the parameters are incorrect. |
EFI_BUFFER_TOO_SMALL | The output parameter block is too small. |
This service returns the currently active PCR banks.
[in] | This | Indicates the calling context |
[out] | ActivePcrBanks | Pointer to the variable receiving the bitmap of currently active PCR banks. |
EFI_SUCCESS | The bitmap of active PCR banks was stored in the ActivePcrBanks parameter. |
EFI_INVALID_PARAMETER | One or more of the parameters are incorrect. |
This service sets the currently active PCR banks.
[in] | This | Indicates the calling context |
[in] | ActivePcrBanks | Bitmap of the requested active PCR banks. At least one bit SHALL be set. |
EFI_SUCCESS | The bitmap in ActivePcrBank parameter is already active. |
EFI_INVALID_PARAMETER | One or more of the parameters are incorrect. |
This service retrieves the result of a previous invocation of SetActivePcrBanks.
[in] | This | Indicates the calling context |
[out] | OperationPresent | Non-zero value to indicate a SetActivePcrBank operation was invoked during the last boot. |
[out] | Response | The response from the SetActivePcrBank request. |
EFI_SUCCESS | The result value could be returned. |
EFI_INVALID_PARAMETER | One or more of the parameters are incorrect. |
Displays a popup window.
This | A pointer to the EFI_HII_POPUP_PROTOCOL instance. |
PopupStyle | Popup style to use. |
PopupType | Type of the popup to display. |
HiiHandle | HII handle of the string pack containing Message |
Message | A message to display in the popup box. |
UserSelection | User selection. |
EFI_SUCCESS | The popup box was successfully displayed. |
EFI_INVALID_PARAMETER | HiiHandle and Message do not define a valid HII string. |
EFI_INVALID_PARAMETER | PopupType is not one of the values defined by this specification. |
EFI_OUT_OF_RESOURCES | There are not enough resources available to display the popup box. |
EFI_GUID gEfiTemporaryRamDonePpiGuid |