MdePkg[all]
1.08
|
Data Structures | |
struct | EFI_TIME |
struct | EFI_MAC_ADDRESS |
union | EFI_IP_ADDRESS |
Typedefs | |
typedef GUID | EFI_GUID |
typedef RETURN_STATUS | EFI_STATUS |
typedef VOID * | EFI_HANDLE |
typedef VOID * | EFI_EVENT |
typedef UINTN | EFI_TPL |
typedef UINT64 | EFI_LBA |
typedef UINT64 | EFI_PHYSICAL_ADDRESS |
typedef UINT64 | EFI_VIRTUAL_ADDRESS |
typedef IPv4_ADDRESS | EFI_IPv4_ADDRESS |
typedef IPv6_ADDRESS | EFI_IPv6_ADDRESS |
Defines data types and constants introduced in UEFI.
Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
Portions copyright (c) 2011 - 2016, ARM Ltd. All rights reserved.
Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
#define EFI_ABORTED RETURN_ABORTED |
Enumeration of EFI_STATUS.
#define EFI_ACCESS_DENIED RETURN_ACCESS_DENIED |
Enumeration of EFI_STATUS.
#define EFI_ALREADY_STARTED RETURN_ALREADY_STARTED |
Enumeration of EFI_STATUS.
#define EFI_BAD_BUFFER_SIZE RETURN_BAD_BUFFER_SIZE |
Enumeration of EFI_STATUS.
#define EFI_BUFFER_TOO_SMALL RETURN_BUFFER_TOO_SMALL |
Enumeration of EFI_STATUS.
#define EFI_COMPROMISED_DATA RETURN_COMPROMISED_DATA |
Enumeration of EFI_STATUS.
#define EFI_CONNECTION_FIN EFIERR(104) |
Tcp connection status definitions
#define EFI_CONNECTION_REFUSED EFIERR(106) |
Tcp connection status definitions
#define EFI_CONNECTION_RESET EFIERR(105) |
Tcp connection status definitions
#define EFI_CRC_ERROR RETURN_CRC_ERROR |
Enumeration of EFI_STATUS.
#define EFI_DEVICE_ERROR RETURN_DEVICE_ERROR |
Enumeration of EFI_STATUS.
#define EFI_END_OF_FILE RETURN_END_OF_FILE |
Enumeration of EFI_STATUS.
#define EFI_END_OF_MEDIA RETURN_END_OF_MEDIA |
Enumeration of EFI_STATUS.
#define EFI_ERROR | ( | A | ) | RETURN_ERROR(A) |
#define EFI_HOST_UNREACHABLE EFIERR(101) |
ICMP error definitions
#define EFI_HTTP_ERROR RETURN_HTTP_ERROR |
Enumeration of EFI_STATUS.
#define EFI_ICMP_ERROR RETURN_ICMP_ERROR |
Enumeration of EFI_STATUS.
#define EFI_IMAGE_MACHINE_AARCH64 0xAA64 |
PE32+ Machine type for AARCH64 A64 images.
#define EFI_IMAGE_MACHINE_ARMTHUMB_MIXED 0x01C2 |
PE32+ Machine type for ARM mixed ARM and Thumb/Thumb2 images.
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED | ( | Machine | ) | ((Machine) == EFI_IMAGE_MACHINE_X64) |
#define EFI_IMAGE_MACHINE_EBC 0x0EBC |
PE32+ Machine type for EBC UEFI images.
#define EFI_IMAGE_MACHINE_IA32 0x014C |
PE32+ Machine type for IA32 UEFI images.
#define EFI_IMAGE_MACHINE_IA64 0x0200 |
PE32+ Machine type for IA64 UEFI images.
#define EFI_IMAGE_MACHINE_RISCV128 0x5128 |
#define EFI_IMAGE_MACHINE_RISCV32 0x5032 |
PE32+ Machine type for RISC-V 32/64/128
#define EFI_IMAGE_MACHINE_RISCV64 0x5064 |
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED | ( | Machine | ) | ((Machine) == EFI_IMAGE_MACHINE_IA32) |
#define EFI_IMAGE_MACHINE_X64 0x8664 |
PE32+ Machine type for X64 UEFI images.
#define EFI_INCOMPATIBLE_VERSION RETURN_INCOMPATIBLE_VERSION |
Enumeration of EFI_STATUS.
#define EFI_INVALID_LANGUAGE RETURN_INVALID_LANGUAGE |
Enumeration of EFI_STATUS.
#define EFI_INVALID_PARAMETER RETURN_INVALID_PARAMETER |
Enumeration of EFI_STATUS.
#define EFI_LOAD_ERROR RETURN_LOAD_ERROR |
Enumeration of EFI_STATUS.
#define EFI_MEDIA_CHANGED RETURN_MEDIA_CHANGED |
Enumeration of EFI_STATUS.
#define EFI_NETWORK_UNREACHABLE EFIERR(100) |
ICMP error definitions
#define EFI_NO_MAPPING RETURN_NO_MAPPING |
Enumeration of EFI_STATUS.
#define EFI_NO_MEDIA RETURN_NO_MEDIA |
Enumeration of EFI_STATUS.
#define EFI_NO_RESPONSE RETURN_NO_RESPONSE |
Enumeration of EFI_STATUS.
#define EFI_NOT_FOUND RETURN_NOT_FOUND |
Enumeration of EFI_STATUS.
#define EFI_NOT_READY RETURN_NOT_READY |
Enumeration of EFI_STATUS.
#define EFI_NOT_STARTED RETURN_NOT_STARTED |
Enumeration of EFI_STATUS.
#define EFI_OUT_OF_RESOURCES RETURN_OUT_OF_RESOURCES |
Enumeration of EFI_STATUS.
#define EFI_PAGE_MASK 0xFFF |
#define EFI_PAGE_SHIFT 12 |
#define EFI_PAGE_SIZE SIZE_4KB |
#define EFI_PAGES_TO_SIZE | ( | Pages | ) | ((Pages) << EFI_PAGE_SHIFT) |
Macro that converts a number of EFI_PAGEs to a size in bytes.
Pages | The number of EFI_PAGES. This parameter is assumed to be type UINTN. Passing in a parameter that is larger than UINTN may produce unexpected results. |
#define EFI_PORT_UNREACHABLE EFIERR(103) |
ICMP error definitions
#define EFI_PROTOCOL_ERROR RETURN_PROTOCOL_ERROR |
Enumeration of EFI_STATUS.
#define EFI_PROTOCOL_UNREACHABLE EFIERR(102) |
ICMP error definitions
#define EFI_SECURITY_VIOLATION RETURN_SECURITY_VIOLATION |
Enumeration of EFI_STATUS.
#define EFI_SIZE_TO_PAGES | ( | Size | ) | (((Size) >> EFI_PAGE_SHIFT) + (((Size) & EFI_PAGE_MASK) ? 1 : 0)) |
Macro that converts a size, in bytes, to a number of EFI_PAGESs.
Size | A size in bytes. This parameter is assumed to be type UINTN. Passing in a parameter that is larger than UINTN may produce unexpected results. |
#define EFI_SUCCESS RETURN_SUCCESS |
Enumeration of EFI_STATUS.
#define EFI_TFTP_ERROR RETURN_TFTP_ERROR |
Enumeration of EFI_STATUS.
#define EFI_TIMEOUT RETURN_TIMEOUT |
Enumeration of EFI_STATUS.
#define EFI_UNSUPPORTED RETURN_UNSUPPORTED |
Enumeration of EFI_STATUS.
#define EFI_VOLUME_CORRUPTED RETURN_VOLUME_CORRUPTED |
Enumeration of EFI_STATUS.
#define EFI_VOLUME_FULL RETURN_VOLUME_FULL |
Enumeration of EFI_STATUS.
#define EFI_WARN_BUFFER_TOO_SMALL RETURN_WARN_BUFFER_TOO_SMALL |
Enumeration of EFI_STATUS.
#define EFI_WARN_DELETE_FAILURE RETURN_WARN_DELETE_FAILURE |
Enumeration of EFI_STATUS.
#define EFI_WARN_FILE_SYSTEM RETURN_WARN_FILE_SYSTEM |
Enumeration of EFI_STATUS.
#define EFI_WARN_STALE_DATA RETURN_WARN_STALE_DATA |
Enumeration of EFI_STATUS.
#define EFI_WARN_UNKNOWN_GLYPH RETURN_WARN_UNKNOWN_GLYPH |
Enumeration of EFI_STATUS.
#define EFI_WARN_WRITE_FAILURE RETURN_WARN_WRITE_FAILURE |
Enumeration of EFI_STATUS.
#define EFI_WRITE_PROTECTED RETURN_WRITE_PROTECTED |
Enumeration of EFI_STATUS.
#define EFIERR | ( | _a | ) | ENCODE_ERROR(_a) |
Define macro to encode the status code.
typedef VOID* EFI_HANDLE |
A collection of related interfaces.
typedef IPv4_ADDRESS EFI_IPv4_ADDRESS |
4-byte buffer. An IPv4 internet protocol address.
typedef IPv6_ADDRESS EFI_IPv6_ADDRESS |
16-byte buffer. An IPv6 internet protocol address.
typedef UINT64 EFI_PHYSICAL_ADDRESS |
64-bit physical memory address.
typedef EFI_STATUS |
Function return status for EFI API.
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. |
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. |
The GraphicsPpiGetMode returns the mode information supported by the Graphics PEI Module.
[in,out] | Mode | Pointer to EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE data. |
EFI_SUCCESS | Valid mode information was returned. |
EFI_INVALID_PARAMETER | The Mode parameter is not valid. |
EFI_DEVICE_ERROR | A hardware error occurred trying to retrieve the video mode. |
EFI_NOT_READY | The Graphics Initialization is not competed and Mode information is not yet available.The platform code should call this again after the Graphics initialization is done. |
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 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. |
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. |
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. |
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. |
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 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. |
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. |
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 |
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. |
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. |
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 |
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. |
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 |
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. |
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. |
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 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 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 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. |
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(). |
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 |
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 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 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(). |
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. |
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 |
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 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. |
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. |
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. |
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. |
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 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. |
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 |
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. |
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. |
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. |
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. |
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 |
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] | 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. |
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. |
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. |
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 |
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 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. |
typedef UINT64 EFI_VIRTUAL_ADDRESS |
64-bit virtual memory address.