MdePkg[all]  1.08
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
UefiBaseType.h File Reference

Data Structures

struct  EFI_TIME
 
struct  EFI_MAC_ADDRESS
 
union  EFI_IP_ADDRESS
 

Macros

#define EFIERR(_a)   ENCODE_ERROR(_a)
 
#define EFI_ERROR(A)   RETURN_ERROR(A)
 
#define EFI_PAGE_SIZE   SIZE_4KB
 
#define EFI_PAGE_MASK   0xFFF
 
#define EFI_PAGE_SHIFT   12
 
#define EFI_SIZE_TO_PAGES(Size)   (((Size) >> EFI_PAGE_SHIFT) + (((Size) & EFI_PAGE_MASK) ? 1 : 0))
 
#define EFI_PAGES_TO_SIZE(Pages)   ((Pages) << EFI_PAGE_SHIFT)
 
#define EFI_IMAGE_MACHINE_IA32   0x014C
 
#define EFI_IMAGE_MACHINE_IA64   0x0200
 
#define EFI_IMAGE_MACHINE_EBC   0x0EBC
 
#define EFI_IMAGE_MACHINE_X64   0x8664
 
#define EFI_IMAGE_MACHINE_ARMTHUMB_MIXED   0x01C2
 
#define EFI_IMAGE_MACHINE_AARCH64   0xAA64
 
#define EFI_IMAGE_MACHINE_RISCV32   0x5032
 
#define EFI_IMAGE_MACHINE_RISCV64   0x5064
 
#define EFI_IMAGE_MACHINE_RISCV128   0x5128
 
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine)   ((Machine) == EFI_IMAGE_MACHINE_IA32)
 
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine)   ((Machine) == EFI_IMAGE_MACHINE_X64)
 
#define EFI_SUCCESS   RETURN_SUCCESS
 
#define EFI_LOAD_ERROR   RETURN_LOAD_ERROR
 
#define EFI_INVALID_PARAMETER   RETURN_INVALID_PARAMETER
 
#define EFI_UNSUPPORTED   RETURN_UNSUPPORTED
 
#define EFI_BAD_BUFFER_SIZE   RETURN_BAD_BUFFER_SIZE
 
#define EFI_BUFFER_TOO_SMALL   RETURN_BUFFER_TOO_SMALL
 
#define EFI_NOT_READY   RETURN_NOT_READY
 
#define EFI_DEVICE_ERROR   RETURN_DEVICE_ERROR
 
#define EFI_WRITE_PROTECTED   RETURN_WRITE_PROTECTED
 
#define EFI_OUT_OF_RESOURCES   RETURN_OUT_OF_RESOURCES
 
#define EFI_VOLUME_CORRUPTED   RETURN_VOLUME_CORRUPTED
 
#define EFI_VOLUME_FULL   RETURN_VOLUME_FULL
 
#define EFI_NO_MEDIA   RETURN_NO_MEDIA
 
#define EFI_MEDIA_CHANGED   RETURN_MEDIA_CHANGED
 
#define EFI_NOT_FOUND   RETURN_NOT_FOUND
 
#define EFI_ACCESS_DENIED   RETURN_ACCESS_DENIED
 
#define EFI_NO_RESPONSE   RETURN_NO_RESPONSE
 
#define EFI_NO_MAPPING   RETURN_NO_MAPPING
 
#define EFI_TIMEOUT   RETURN_TIMEOUT
 
#define EFI_NOT_STARTED   RETURN_NOT_STARTED
 
#define EFI_ALREADY_STARTED   RETURN_ALREADY_STARTED
 
#define EFI_ABORTED   RETURN_ABORTED
 
#define EFI_ICMP_ERROR   RETURN_ICMP_ERROR
 
#define EFI_TFTP_ERROR   RETURN_TFTP_ERROR
 
#define EFI_PROTOCOL_ERROR   RETURN_PROTOCOL_ERROR
 
#define EFI_INCOMPATIBLE_VERSION   RETURN_INCOMPATIBLE_VERSION
 
#define EFI_SECURITY_VIOLATION   RETURN_SECURITY_VIOLATION
 
#define EFI_CRC_ERROR   RETURN_CRC_ERROR
 
#define EFI_END_OF_MEDIA   RETURN_END_OF_MEDIA
 
#define EFI_END_OF_FILE   RETURN_END_OF_FILE
 
#define EFI_INVALID_LANGUAGE   RETURN_INVALID_LANGUAGE
 
#define EFI_COMPROMISED_DATA   RETURN_COMPROMISED_DATA
 
#define EFI_HTTP_ERROR   RETURN_HTTP_ERROR
 
#define EFI_WARN_UNKNOWN_GLYPH   RETURN_WARN_UNKNOWN_GLYPH
 
#define EFI_WARN_DELETE_FAILURE   RETURN_WARN_DELETE_FAILURE
 
#define EFI_WARN_WRITE_FAILURE   RETURN_WARN_WRITE_FAILURE
 
#define EFI_WARN_BUFFER_TOO_SMALL   RETURN_WARN_BUFFER_TOO_SMALL
 
#define EFI_WARN_STALE_DATA   RETURN_WARN_STALE_DATA
 
#define EFI_WARN_FILE_SYSTEM   RETURN_WARN_FILE_SYSTEM
 
#define EFI_NETWORK_UNREACHABLE   EFIERR(100)
 
#define EFI_HOST_UNREACHABLE   EFIERR(101)
 
#define EFI_PROTOCOL_UNREACHABLE   EFIERR(102)
 
#define EFI_PORT_UNREACHABLE   EFIERR(103)
 
#define EFI_CONNECTION_FIN   EFIERR(104)
 
#define EFI_CONNECTION_RESET   EFIERR(105)
 
#define EFI_CONNECTION_REFUSED   EFIERR(106)
 

Typedefs

typedef GUID EFI_GUID
 
typedef RETURN_STATUS EFI_STATUS
 
typedef VOIDEFI_HANDLE
 
typedef VOIDEFI_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
 

Detailed Description

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

Macro Definition Documentation

#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.

Parameters
PagesThe 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.
Returns
The number of bytes associated with the number of EFI_PAGEs specified by Pages.
#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.

Parameters
SizeA size in bytes. This parameter is assumed to be type UINTN. Passing in a parameter that is larger than UINTN may produce unexpected results.
Returns
The number of EFI_PAGESs associated with the number of bytes specified by Size.
#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 Documentation

typedef VOID* EFI_EVENT

Handle to an event structure.

typedef GUID EFI_GUID

128-bit buffer containing a unique identifier value.

typedef VOID* EFI_HANDLE

A collection of related interfaces.

4-byte buffer. An IPv4 internet protocol address.

16-byte buffer. An IPv6 internet protocol address.

typedef UINT64 EFI_LBA

Logical block 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.

Parameters
[in]GuidThe 128-bit unique value that designates the namespace from which to extract the value.
[in]TokenNumberThe PCD token number.
[out]PcdInfoThe returned information associated with the requested TokenNumber.
Return values
EFI_SUCCESSThe PCD information was returned successfully
EFI_NOT_FOUNDThe 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.

Parameters
ThisA pointer to this instance of the EFI_ISA_HC_PPI.
IoApertureHandleThe I/O aperture handle previously returned from a call to OpenIoAperture().
Return values
EFI_SUCCESSThe I/O aperture was closed successfully.

The GraphicsPpiGetMode returns the mode information supported by the Graphics PEI Module.

Parameters
[in,out]ModePointer to EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE data.
Return values
EFI_SUCCESSValid mode information was returned.
EFI_INVALID_PARAMETERThe Mode parameter is not valid.
EFI_DEVICE_ERRORA hardware error occurred trying to retrieve the video mode.
EFI_NOT_READYThe 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.

Parameters
PeiServicesGeneral purpose services available to every PEIM.
ThisThe PEI_MM_CONTROL_PPI instance.
PeriodicOptional parameter to repeat at this period one time or, if the Periodic Boolean is set, periodically.
Return values
EFI_SUCCESSThe MMI has been engendered.
EFI_DEVICE_ERRORThe source could not be cleared.
EFI_INVALID_PARAMETERThe service did not support the Periodic input argument.

Get information on a specific CPU.

Parameters
[in]PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
[in]ThisPointer to this instance of the PPI.
[in]ProcessorNumberPointer to the total number of logical processors in the system, including the BSP and disabled APs.
[out]ProcessorInfoBufferNumber of processors in the system that are enabled.
Return values
EFI_SUCCESSProcessor information was returned.
EFI_DEVICE_ERRORThe calling processor is an AP.
EFI_INVALID_PARAMETERProcessorInfoBuffer is NULL.
EFI_NOT_FOUNDThe processor with the handle specified by ProcessorNumber does not exist in the platform.

Activate all of the application processors.

Parameters
[in]PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
[in]ThisA pointer to the EFI_PEI_MP_SERVICES_PPI instance.
[in]ProcedureA pointer to the function to be run on enabled APs of the system.
[in]SingleThreadIf 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]TimeoutInMicroSecondsIndicates 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]ProcedureArgumentThe parameter passed into Procedure for all APs.
Return values
EFI_SUCCESSIn blocking mode, all APs have finished before the timeout expired.
EFI_DEVICE_ERRORCaller processor is AP.
EFI_NOT_STARTEDNo enabled APs exist in the system.
EFI_NOT_READYAny enabled APs are busy.
EFI_TIMEOUTIn blocking mode, the timeout expired before all enabled APs have finished.
EFI_INVALID_PARAMETERProcedure is NULL.

Activate a specific application processor.

Parameters
[in]PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
[in]ThisA pointer to the EFI_PEI_MP_SERVICES_PPI instance.
[in]ProcedureA pointer to the function to be run on enabled APs of the system.
[in]ProcessorNumberThe 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]TimeoutInMicroSecondsIndicates 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]ProcedureArgumentThe parameter passed into Procedure for all APs.
Return values
EFI_SUCCESSIn blocking mode, specified AP finished before the timeout expires.
EFI_DEVICE_ERRORThe calling processor is an AP.
EFI_TIMEOUTIn blocking mode, the timeout expired before the specified AP has finished.
EFI_NOT_FOUNDThe processor with the handle specified by ProcessorNumber does not exist.
EFI_INVALID_PARAMETERProcessorNumber specifies the BSP or disabled AP.
EFI_INVALID_PARAMETERProcedure is NULL.

Switch the boot strap processor.

Parameters
[in]PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
[in]ThisA pointer to the EFI_PEI_MP_SERVICES_PPI instance.
[in]ProcessorNumberThe 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]EnableOldBSPIf TRUE, then the old BSP will be listed as an enabled AP. Otherwise, it will be disabled.
Return values
EFI_SUCCESSBSP successfully switched.
EFI_UNSUPPORTEDSwitching the BSP cannot be completed prior to this service returning.
EFI_UNSUPPORTEDSwitching the BSP is not supported.
EFI_DEVICE_ERRORThe calling processor is an AP.
EFI_NOT_FOUNDThe processor with the handle specified by ProcessorNumber does not exist.
EFI_INVALID_PARAMETERProcessorNumber specifies the current BSP or a disabled AP.
EFI_NOT_READYThe specified AP is busy.

Enable or disable an application processor.

Parameters
[in]PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
[in]ThisA pointer to the EFI_PEI_MP_SERVICES_PPI instance.
[in]ProcessorNumberThe 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]EnableAPSpecifies the new state for the processor for enabled, FALSE for disabled.
[in]HealthFlagIf 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.
Return values
EFI_SUCCESSThe specified AP was enabled or disabled successfully.
EFI_UNSUPPORTEDEnabling or disabling an AP cannot be completed prior to this service returning.
EFI_UNSUPPORTEDEnabling or disabling an AP is not supported.
EFI_DEVICE_ERRORThe calling processor is an AP.
EFI_NOT_FOUNDProcessor with the handle specified by ProcessorNumber does not exist.
EFI_INVALID_PARAMETERProcessorNumber specifies the BSP.

Identify the currently executing processor.

Parameters
[in]PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
[in]ThisA pointer to the EFI_PEI_MP_SERVICES_PPI instance.
[out]ProcessorNumberThe 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().
Return values
EFI_SUCCESSThe current processor handle number was returned in ProcessorNumber.
EFI_INVALID_PARAMETERProcessorNumber is NULL.

Reset the I2C controller and configure it for use.

Parameters
ThisPointer to an EFI_PEI_I2C_MASTER_PPI structure.
Return values
EFI_SUCCESSThe reset completed successfully.
EFI_DEVICE_ERRORThe reset operation failed.

Start an I2C transaction on the host controller.

Parameters
ThisPointer to an EFI_PEI_I2C_MASTER_PPI structure.
SlaveAddressAddress 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.
RequestPacketPointer to an EFI_I2C_REQUEST_PACKET structure describing the I2C transaction.
Return values
EFI_SUCCESSThe transaction completed successfully.
EFI_BAD_BUFFER_SIZEThe RequestPacket->LengthInBytes value is too large.
EFI_DEVICE_ERRORThere was an I2C error (NACK) during the transaction.
EFI_INVALID_PARAMETERRequestPacket is NULL
EFI_NO_RESPONSEThe 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_FOUNDReserved bit set in the SlaveAddress parameter
EFI_OUT_OF_RESOURCESInsufficient memory for I2C transaction
EFI_UNSUPPORTEDThe 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.

Parameters
[in]ThisIndicates a pointer to the calling context.
[out]SCardHandleHandle on Smart Card connection.
[in]ScardCsnCSN of the Smart Card the connection has to be established.
[out]ScardAidAID of the Smart Card the connection has been established.
Return values
EFI_SUCCESSThe requested command completed successfully.
EFI_INVALID_PARAMETERThis is NULL.
EFI_INVALID_PARAMETERSCardHandle is NULL.
EFI_NO_MEDIANo 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.

Parameters
[in]ThisIndicates a pointer to the calling context.
[in]SCardHandleHandle on Smart Card connection to release.
Return values
EFI_SUCCESSThe requested command completed successfully.
EFI_INVALID_PARAMETERThis is NULL.
EFI_INVALID_PARAMETERNo connection for SCardHandle value.

This function returns the Smart Card serial number.

Parameters
[in]ThisIndicates a pointer to the calling context.
[in]SCardHandleHandle on Smart Card connection.
[out]CsnThe Card Serial number, 16 bytes array.
Return values
EFI_SUCCESSThe requested command completed successfully.
EFI_INVALID_PARAMETERThis is NULL.
EFI_INVALID_PARAMETERNo connection for SCardHandle value.
EFI_NO_MEDIASmart 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.

Parameters
[in]ThisIndicates a pointer to the calling context.
[in]SCardHandleHandle on Smart Card connection.
[in,out]ReaderNameLengthOn 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]ReaderNameA pointer to a NULL terminated string that will contain the reader name.
Return values
EFI_SUCCESSThe requested command completed successfully.
EFI_INVALID_PARAMETERThis is NULL.
EFI_INVALID_PARAMETERNo connection for SCardHandle value.
EFI_INVALID_PARAMETERReaderNameLength is NULL.
EFI_NO_MEDIASmart 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:

  • If PinSize value is negative the caller only wants to know if the current chain of the elements Smart Card Edge protocol, Smart Card Reader protocol and Smart Card Reader supports the Secure Pin Entry PCSC V2 functionality.
  • If PinSize value is positive or null the caller ask to perform the verify PIN using the Secure PIN Entry functionality.

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.

Parameters
[in]ThisIndicates a pointer to the calling context.
[in]SCardHandleHandle on Smart Card connection.
[in]PinSizePIN code buffer size.
[in]PinCodePIN code to present to the Smart Card.
[out]PinResultResult of PIN code presentation to the Smart Card. TRUE when Smard Card founds the PIN code correct.
[out]RemainingAttemptsNumber of attempts still possible.
Return values
EFI_SUCCESSThe requested command completed successfully.
EFI_UNSUPPORTEDPinsize < 0 and Secure PIN Entry functionality not supported.
EFI_INVALID_PARAMETERThis is NULL.
EFI_INVALID_PARAMETERNo connection for SCardHandle value.
EFI_INVALID_PARAMETERBad value for PinSize: value not supported by Smart Card or, negative with PinCode not null.
EFI_INVALID_PARAMETERPinResult is NULL.
EFI_NO_MEDIASmart 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.

Parameters
[in]ThisIndicates a pointer to the calling context.
[in]SCardHandleHandle on Smart Card connection.
[out]RemainingAttemptsNumber of attempts still possible.
Return values
EFI_SUCCESSThe requested command completed successfully.
EFI_INVALID_PARAMETERThis is NULL.
EFI_INVALID_PARAMETERNo connection for SCardHandle value.
EFI_INVALID_PARAMETERRemainingAttempts is NULL.
EFI_NO_MEDIASmart 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.

Parameters
[in]ThisIndicates a pointer to the calling context.
[in]SCardHandleHandle on Smart Card connection.
[in]DataIdThe type identifier of the data to get.
[in,out]DataSizeOn input, in bytes, the size of Data. On output, in bytes, the size of buffer required to store the specified data.
[out]DataThe data buffer in which the data is returned. The type of the data buffer is associated with the DataId. Ignored if *DataSize is 0.
Return values
EFI_SUCCESSThe requested command completed successfully.
EFI_INVALID_PARAMETERThis is NULL.
EFI_INVALID_PARAMETERNo connection for SCardHandle value.
EFI_INVALID_PARAMETERDataId is NULL.
EFI_INVALID_PARAMETERDataSize is NULL.
EFI_INVALID_PARAMETERData is NULL, and *DataSize is not zero.
EFI_NOT_FOUNDDataId unknown for this driver.
EFI_BUFFER_TOO_SMALLThe size of Data is too small for the specified data and the required size is returned in DataSize.
EFI_ACCESS_DENIEDOperation not performed, conditions not fulfilled. PIN not verified.
EFI_NO_MEDIASmart 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:

  • The certificate item (0x01, certificate size, certificate)
  • The Key identifier item (0x02, 0x01, key index)
  • The key type item (0x03, 0x01, key type)
  • The key size item (0x04, 0x02, key size), key size in number of bits. Numeric multi-bytes values are on big endian format, most significant byte first:
  • The L field value for certificate (2 bytes)
  • The L field value for key size (2 bytes)
  • The value field for key size (2 bytes)
Parameters
[in]ThisIndicates a pointer to the calling context.
[in]SCardHandleHandle on Smart Card connection.
[in,out]CredentialSizeOn 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]CredentialListList of credentials stored into the Smart Card. A list of TLV (Tag Length Value) elements organized in containers array.
Return values
EFI_SUCCESSThe requested command completed successfully.
EFI_INVALID_PARAMETERThis is NULL.
EFI_INVALID_PARAMETERNo connection for SCardHandle value.
EFI_INVALID_PARAMETERCredentialSize is NULL.
EFI_INVALID_PARAMETERCredentialList is NULL, if CredentialSize is not zero.
EFI_BUFFER_TOO_SMALLThe size of CredentialList is too small for the specified data and the required size is returned in CredentialSize.
EFI_NO_MEDIASmart 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.

Parameters
[in]ThisIndicates a pointer to the calling context.
[in]SCardHandleHandle on Smart Card connection.
[in]KeyIdIdentifier of the key container, retrieved in a key index item of credentials.
[in]KeyTypeThe key type, retrieved in a key type item of credentials.
[in]HashAlgorithmHash algorithm used to hash the, one of:
  • EFI_HASH_ALGORITHM_SHA1_GUID
  • EFI_HASH_ALGORITHM_SHA256_GUID
  • EFI_HASH_ALGORITHM_SHA384_GUID
  • EFI_HASH_ALGORITHM_SHA512_GUID
[in]PaddingMethodPadding method used jointly with hash algorithm, one of:
  • EFI_PADDING_RSASSA_PKCS1V1P5_GUID
  • EFI_PADDING_RSASSA_PSS_GUID
[in]HashedDataHash of the data to sign. Size is function of the HashAlgorithm.
[out]SignatureDataResulting signature with private key KeyId. Size is function of the KeyType and key size retrieved in the associated key size item of credentials.
Return values
EFI_SUCCESSThe requested command completed successfully.
EFI_INVALID_PARAMETERThis is NULL.
EFI_INVALID_PARAMETERNo connection for SCardHandle value.
EFI_INVALID_PARAMETERKeyId is not valid.
EFI_INVALID_PARAMETERKeyType is not valid or not corresponding to KeyId.
EFI_INVALID_PARAMETERHashAlgorithm is NULL.
EFI_INVALID_PARAMETERHashAlgorithm is not valid.
EFI_INVALID_PARAMETERPaddingMethod is NULL.
EFI_INVALID_PARAMETERPaddingMethod is not valid.
EFI_INVALID_PARAMETERHashedData is NULL.
EFI_INVALID_PARAMETERSignatureData is NULL.
EFI_ACCESS_DENIEDOperation not performed, conditions not fulfilled. PIN not verified.
EFI_NO_MEDIASmart 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.

Parameters
[in]ThisIndicates a pointer to the calling context.
[in]SCardHandleHandle on Smart Card connection.
[in]KeyIdIdentifier of the key container, retrieved in a key index item of credentials.
[in]HashAlgorithmHash algorithm used to hash the, one of:
  • EFI_HASH_ALGORITHM_SHA1_GUID
  • EFI_HASH_ALGORITHM_SHA256_GUID
  • EFI_HASH_ALGORITHM_SHA384_GUID
  • EFI_HASH_ALGORITHM_SHA512_GUID
[in]PaddingMethodPadding method used jointly with hash algorithm, one of:
  • EFI_PADDING_NONE_GUID
  • EFI_PADDING_RSAES_PKCS1V1P5_GUID
  • EFI_PADDING_RSAES_OAEP_GUID
[in]EncryptedSizeSize of data to decrypt.
[in]EncryptedDataData to decrypt
[in,out]PlaintextSizeOn 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]PlaintextDataBuffer for decrypted data, padding removed.
Return values
EFI_SUCCESSThe requested command completed successfully.
EFI_INVALID_PARAMETERThis is NULL.
EFI_INVALID_PARAMETERNo connection for SCardHandle value.
EFI_INVALID_PARAMETERKeyId is not valid or associated key not of type SC_EDGE_RSA_EXCHANGE.
EFI_INVALID_PARAMETERHashAlgorithm is NULL.
EFI_INVALID_PARAMETERHashAlgorithm is not valid.
EFI_INVALID_PARAMETERPaddingMethod is NULL.
EFI_INVALID_PARAMETERPaddingMethod is not valid.
EFI_INVALID_PARAMETEREncryptedSize is 0.
EFI_INVALID_PARAMETEREncryptedData is NULL.
EFI_INVALID_PARAMETERPlaintextSize is NULL.
EFI_INVALID_PARAMETERPlaintextData is NULL.
EFI_ACCESS_DENIEDOperation not performed, conditions not fulfilled. PIN not verified.
EFI_BUFFER_TOO_SMALLPlaintextSize is too small for the plaintext data and the required size is returned in PlaintextSize.
EFI_NO_MEDIASmart 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.

Parameters
[in]ThisIndicates a pointer to the calling context.
[in]SCardHandleHandle on Smart Card connection.
[in]KeyIdIdentifier of the key container, retrieved in a key index item of credentials.
[in]dataQxPublic key x coordinate. Size is the same as key size for KeyId. Stored in big endian format.
[in]dataQyPublic key y coordinate. Size is the same as key size for KeyId. Stored in big endian format.
[out]DHAgreementBuffer for DH agreement computed. Size must be bigger or equal to key size for KeyId.
Return values
EFI_SUCCESSThe requested command completed successfully.
EFI_INVALID_PARAMETERThis is NULL.
EFI_INVALID_PARAMETERNo connection for SCardHandle value.
EFI_INVALID_PARAMETERKeyId is not valid.
EFI_INVALID_PARAMETERdataQx is NULL.
EFI_INVALID_PARAMETERdataQy is NULL.
EFI_INVALID_PARAMETERDHAgreement is NULL.
EFI_ACCESS_DENIEDOperation not performed, conditions not fulfilled. PIN not verified.
EFI_NO_MEDIASmart 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.

Parameters
[in]ThisPointer to EFI_REST_PROTOCOL instance.
[out]TimeA pointer to storage to receive a snapshot of the current time of the REST service.
Return values
EFI_SUCCESSOperation succeeded
EFI_INVALID_PARAMETERThis or Time are NULL.
EFI_UNSUPPORTEDThe RESTful service does not support returning the time.
EFI_DEVICE_ERRORAn unexpected system or network error occurred.

ProcessPacket() is called to Supplicant driver to encrypt or decrypt the data depending type of authentication type.

Parameters
[in]ThisPointer to the EFI_SUPPLICANT_PROTOCOL instance.
[in,out]FragmentTablePointer to a list of fragment. The caller will take responsible to handle the original FragmentTable while it may be reallocated in Supplicant driver.
[in]FragmentCountNumber of fragment.
[in]CryptModeCrypt mode.
Return values
EFI_SUCCESSThe operation completed successfully.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: FragmentTable is NULL. FragmentCount is NULL. CryptMode is invalid.
EFI_NOT_READYCurrent supplicant state is NOT Authenticated.
EFI_ABORTEDSomething wrong decryption the message.
EFI_UNSUPPORTEDThis API is not supported.

Set Supplicant configuration data.

Parameters
[in]ThisPointer to the EFI_SUPPLICANT_PROTOCOL instance.
[in]DataTypeThe type of data.
[in]DataPointer to the buffer to hold the data.
[in]DataSizePointer to the buffer size in bytes.
Return values
EFI_SUCCESSThe Supplicant configuration data is set successfully.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: Data is NULL. DataSize is 0.
EFI_UNSUPPORTEDThe DataType is unsupported.
EFI_OUT_OF_RESOURCESRequired system resources could not be allocated.

Get Supplicant configuration data.

Parameters
[in]ThisPointer to the EFI_SUPPLICANT_PROTOCOL instance.
[in]DataTypeThe type of data.
[out]DataPointer to the buffer to hold the data. Ignored if DataSize is 0.
[in,out]DataSizePointer 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.
Return values
EFI_SUCCESSThe Supplicant configuration data is got successfully.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: This is NULL. DataSize is NULL. Data is NULL if *DataSize is not zero.
EFI_UNSUPPORTEDThe DataType is unsupported.
EFI_NOT_FOUNDThe Supplicant configuration data is not found.
EFI_BUFFER_TOO_SMALLThe 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.

Parameters
ThisA pointer to the EFI_NVDIMM_LABEL_PROTOCOL instance.
OffsetThe byte offset within the Label Storage Area to read from.
TransferLengthNumber of bytes to read from the Label Storage Area beginning at the byte Offset specified. A TransferLength of 0 reads no data.
LabelDataThe return label data read at the requested offset and length from within the Label Storage Area.
Return values
EFI_SUCCESSThe 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_PARAMETERAny of the following are true:
  • Offset > SizeOfLabelStorageArea reported in the LabelStorageInformation return data.
  • Offset + TransferLength is > SizeOfLabelStorageArea reported in the LabelStorageInformation return data.
  • TransferLength is > MaxTransferLength reported in the LabelStorageInformation return data.
EFI_ACCESS_DENIEDThe Label Storage Area for the NVDIMM device is not currently accessible and labels cannot be read at this time.
EFI_DEVICE_ERRORA 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.

Parameters
ThisA pointer to the EFI_NVDIMM_LABEL_PROTOCOL instance.
OffsetThe byte offset within the Label Storage Area to write to.
TransferLengthNumber of bytes to write to the Label Storage Area beginning at the byte Offset specified. A TransferLength of 0 writes no data.
LabelDataThe return label data write at the requested offset and length from within the Label Storage Area.
Return values
EFI_SUCCESSThe label data from the Label Storage Area for the NVDIMM written read successfully at the specified Offset and TransferLength.
EFI_INVALID_PARAMETERAny of the following are true:
  • Offset > SizeOfLabelStorageArea reported in the LabelStorageInformation return data.
  • Offset + TransferLength is > SizeOfLabelStorageArea reported in the LabelStorageInformation return data.
  • TransferLength is > MaxTransferLength reported in the LabelStorageInformation return data.
EFI_ACCESS_DENIEDThe Label Storage Area for the NVDIMM device is not currently accessible and labels cannot be written at this time.
EFI_DEVICE_ERRORA physical device error occurred and the data transfer failed to complete.

Unregister a RAM disk specified by DevicePath.

Parameters
[in]DevicePathA pointer to the device path that describes a RAM Disk device.
Return values
EFI_SUCCESSThe RAM disk is unregistered successfully.
EFI_INVALID_PARAMETERDevicePath is NULL.
EFI_UNSUPPORTEDThe device specified by DevicePath is not a valid ramdisk device path and not supported by the driver.
EFI_NOT_FOUNDThe 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.

Parameters
[in]ThisPointer to an EFI_SPI_HC_PROTOCOL structure.
[in]SpiPeripheralPointer 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]ClockHzPointer 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.
Return values
EFI_SUCCESSThe clock was set up successfully
EFI_UNSUPPORTEDThe 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.

Parameters
[in]ThisPointer to an EFI_SPI_HC_PROTOCOL structure.
[in]BusTransactionPointer to a EFI_SPI_BUS_ TRANSACTION containing the description of the SPI transaction to perform.
Return values
EFI_SUCCESSThe transaction completed successfully
EFI_BAD_BUFFER_SIZEThe BusTransaction->WriteBytes value is invalid, or the BusTransaction->ReadinBytes value is invalid
EFI_UNSUPPORTEDThe 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.

Parameters
[in]ThisPointer to the EFI_BLOCK_IO_CRYPTO_PROTOCOL instance.
[out]CapabilitiesPointer to the EFI_BLOCK_IO_CRYPTO_CAPABILITIES structure.
Return values
EFI_SUCCESSThe ICI is ready for use.
EFI_BUFFER_TOO_SMALLThe Capabilities structure was too small. The number of entries needed is returned in the CapabilityCount field of the structure.
EFI_NO_RESPONSENo response was received from the ICI.
EFI_DEVICE_ERRORAn error occurred when attempting to access the ICI.
EFI_INVALID_PARAMETERThis is NULL.
EFI_INVALID_PARAMETERCapabilities 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.

Parameters
[in]ThisPointer to the EFI_BLOCK_IO_CRYPTO_PROTOCOL instance.
[in]ConfigurationCountNumber of entries being configured with this call.
[in]ConfigurationTablePointer to a table used to populate the configuration table.
[out]ResultingTableOptional pointer to a table that receives the newly configured entries.
Return values
EFI_SUCCESSThe ICI is ready for use.
EFI_NO_RESPONSENo response was received from the ICI.
EFI_DEVICE_ERRORAn error occurred when attempting to access the ICI.
EFI_INVALID_PARAMETERThis is NULL.
EFI_INVALID_PARAMETERConfigurationTable is NULL.
EFI_INVALID_PARAMETERConfigurationCount is 0.
EFI_OUT_OF_RESOURCESCould 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.

Parameters
[in]ThisPointer to the EFI_BLOCK_IO_CRYPTO_PROTOCOL instance.
[in]StartIndexConfiguration table index at which to start the configuration query.
[in]ConfigurationCountNumber of entries to return in the response table.
[in]KeyOwnerGuidOptional 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]ConfigurationTableTable of configured configuration table entries (with no CryptoKey returned): configuration table index, KeyOwnerGuid, Capability. Should have sufficient space to store up to ConfigurationCount entries.
Return values
EFI_SUCCESSThe ICI is ready for use.
EFI_NO_RESPONSENo response was received from the ICI.
EFI_DEVICE_ERRORAn error occurred when attempting to access the ICI.
EFI_INVALID_PARAMETERThis is NULL.
EFI_INVALID_PARAMETERConfiguration table is NULL.
EFI_INVALID_PARAMETERStartIndex 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.

Parameters
[in]ThisPointer to the EFI_BLOCK_IO_CRYPTO_PROTOCOL instance.
[in]MediaIdThe media ID that the read request is for.
[in]LBAThe starting logical block address to read from on the device.
[in,out]TokenA pointer to the token associated with the transaction.
[in]BufferSizeThe size of the Buffer in bytes. This must be a multiple of the intrinsic block size of the device.
[out]BufferA pointer to the destination buffer for the data. The caller is responsible for either having implicit or explicit ownership of the buffer.
[in]IndexA pointer to the configuration table index. This is optional.
[in]CryptoIvInputA 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.
Return values
EFI_SUCCESSThe 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_ERRORThe device reported an error while attempting to perform the read operation and/or decryption operation.
EFI_NO_MEDIAThere is no media in the device.
EFI_MEDIA_CHANGEDThe MediaId is not for the current media.
EFI_BAD_BUFFER_SIZEThe BufferSize parameter is not a multiple of the intrinsic block size of the device.
EFI_INVALID_PARAMETERThis is NULL, or the read request contains LBAs that are not valid, or the buffer is not on proper alignment.
EFI_INVALID_PARAMETERCryptoIvInput is incorrect.
EFI_OUT_OF_RESOURCESThe 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.

Parameters
[in]ThisPointer to the EFI_BLOCK_IO_CRYPTO_PROTOCOL instance.
[in]MediaIdThe media ID that the read request is for.
[in]LBAThe starting logical block address to read from on the device.
[in,out]TokenA pointer to the token associated with the transaction.
[in]BufferSizeThe size of the Buffer in bytes. This must be a multiple of the intrinsic block size of the device.
[in]BufferA pointer to the source buffer for the data.
[in]IndexA pointer to the configuration table index. This is optional.
[in]CryptoIvInputA 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.
Return values
EFI_SUCCESSThe 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_PROTECTEDThe device cannot be written to.
EFI_NO_MEDIAThere is no media in the device.
EFI_MEDIA_CHANGEDThe MediaId is not for the current media.
EFI_DEVICE_ERRORThe device reported an error while attempting to encrypt blocks or to perform the write operation.
EFI_BAD_BUFFER_SIZEThe BufferSize parameter is not a multiple of the intrinsic block size of the device.
EFI_INVALID_PARAMETERThis is NULL, or the write request contains LBAs that are not valid, or the buffer is not on proper alignment.
EFI_INVALID_PARAMETERCryptoIvInput is incorrect.
EFI_OUT_OF_RESOURCESThe 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.

Parameters
[in]ThisPointer to the EFI_BLOCK_IO_CRYPTO_PROTOCOL instance.
[in,out]TokenA pointer to the token associated with the transaction.
Return values
EFI_SUCCESSThe 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_ERRORThe device reported an error while attempting to write data.
EFI_WRITE_PROTECTEDThe device cannot be written to.
EFI_NO_MEDIAThere is no media in the device.
EFI_MEDIA_CHANGEDThe MediaId is not for the current media.
EFI_INVALID_PARAMETERThis is NULL.
EFI_OUT_OF_RESOURCESThe request could not be completed due to a lack of resources.

Get TLS session data.

The GetSessionData() function return the TLS session information.

Parameters
[in]ThisPointer to the EFI_TLS_PROTOCOL instance.
[in]DataTypeTLS session data type.
[in,out]DataPointer to session data.
[in,out]DataSizeTotal 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.
Return values
EFI_SUCCESSThe TLS session data is got successfully.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: This is NULL. DataSize is NULL. Data is NULL if *DataSize is not zero.
EFI_UNSUPPORTEDThe DataType is unsupported.
EFI_NOT_FOUNDThe TLS session data is not found.
EFI_NOT_READYThe DataType is not ready in current session state.
EFI_BUFFER_TOO_SMALLThe 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.

Parameters
[in]ThisPointer to the EFI_TLS_PROTOCOL instance.
[in]RequestBufferPointer to the most recently received TLS packet. NULL means TLS need initiate the TLS session and response packet need to be ClientHello.
[in]RequestSizePacket size in bytes for the most recently received TLS packet. 0 is only valid when RequestBuffer is NULL.
[out]BufferPointer to the buffer to hold the built packet.
[in,out]BufferSizePointer 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.
Return values
EFI_SUCCESSThe required TLS packet is built successfully.
EFI_INVALID_PARAMETEROne 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_SMALLBufferSize is too small to hold the response packet.
EFI_NOT_READYCurrent TLS session state is NOT ready to build ResponsePacket.
EFI_ABORTEDSomething 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.

Parameters
[in]ThisPointer to the EFI_TLS_PROTOCOL instance.
[in,out]FragmentTablePointer 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]FragmentCountNumber of fragment.
[in]CryptModeCrypt mode.
Return values
EFI_SUCCESSThe operation completed successfully.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: This is NULL. FragmentTable is NULL. FragmentCount is NULL. CryptoMode is invalid.
EFI_NOT_READYCurrent TLS session state is NOT EfiTlsSessionDataTransferring.
EFI_ABORTEDSomething 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_RESOURCESNo 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.

Parameters
[in]ThisPointer to an EFI_LEGACY_SPI_FLASH_PROTOCOL data structure.
Return values
EFI_SUCCESSThe registers were successfully cleared
EFI_ACCESS_ERRORThe SPI controller is locked
EFI_UNSUPPORTEDNot 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.

Parameters
[in]ThisPointer to an EFI_LEGACY_SPI_FLASH_PROTOCOL data structure.
[in]BiosAddressAddress within a 4 KiB block to start protecting.
[in]BlocksToProtectThe number of 4 KiB blocks to protect.
Return values
EFI_SUCCESSThe register was successfully updated
EFI_ACCESS_ERRORThe SPI controller is locked
EFI_INVALID_PARAMETERBiosAddress < This->BiosBaseAddress, or
EFI_INVALID_PARAMETERBlocksToProtect * 4 KiB > This->MaximumRangeBytes, or BiosAddress - This->BiosBaseAddress
  • (BlocksToProtect * 4 KiB) > This->MaximumRangeBytes
EFI_OUT_OF_RESOURCESNo protect range register available
EFI_UNSUPPORTEDCall 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

Parameters
[in]ThisPointer to an EFI_LEGACY_SPI_FLASH_PROTOCOL data structure.
Return values
EFI_SUCCESSThe SPI controller was successfully locked
EFI_ALREADY_STARTEDThe SPI controller was already locked
EFI_UNSUPPORTEDNot 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.

Parameters
ThisA pointer to this instance of the EFI_ISA_HC_PROTOCOL.
IoApertureHandleThe I/O aperture handle previously returned from a call to OpenIoAperture().
Return values
EFI_SUCCESSThe 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.

Parameters
[in]ThisThe EFI_MM_MP_PROTOCOL instance.
[in]ProcedureA 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]CpuNumberThe 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]TimeoutInMicrosecondsIndicates 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]ProcedureArgumentsAllows 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]TokenThis 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]CPUStatusThis 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.
Return values
EFI_SUCCESSIn 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_PARAMETERThe 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_READYIf the target AP is busy executing another procedure
EFI_ALREADY_STARTEDToken is already in use for another procedure
EFI_TIMEOUTIn 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.

Parameters
[in]ThisThe EFI_MM_MP_PROTOCOL instance.
[in]ProcedureA 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]TimeoutInMicrosecondsIndicates 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]ProcedureArgumentsAllows 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]TokenThis 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]CPUStatusThis 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
Return values
EFI_SUCCESSIn 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_PARAMETERProcedure or Token is NULL.
EFI_NOT_READYIf a target AP is busy executing another procedure.
EFI_TIMEOUTIn blocking mode, the timeout expired before all enabled APs have finished.
EFI_ALREADY_STARTEDBefore 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:

  1. The procedure executes before the processor is handed over to the operating system.
  2. All processors execute the same startup procedure.
  3. The procedure may run in parallel with other procedures invoked through the functions in this protocol, or with processors that are executing an MM handler or running in the operating system.
Parameters
[in]ThisThe EFI_MM_MP_PROTOCOL instance.
[in]ProcedureA 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]ProcedureArgumentsAllows 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
Return values
EFI_SUCCESSThe Procedure has been set successfully.
EFI_INVALID_PARAMETERThe 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.

Parameters
[in]ThisThe EFI_MM_MP_PROTOCOL instance.
[in]TokenThis parameter describes the token that was passed into DispatchProcedure or BroadcastProcedure.
Return values
EFI_SUCCESSProcedure has completed.
EFI_NOT_READYThe Procedure has not completed.
EFI_INVALID_PARAMETERToken or Token->Completion is NULL
EFI_NOT_FOUNDToken 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.

Parameters
[in]ThisThe EFI_MM_MP_PROTOCOL instance.
[in]TokenThis parameter describes the token that was passed into DispatchProcedure or BroadcastProcedure.
Return values
EFI_SUCCESSProcedure has completed.
EFI_INVALID_PARAMETERToken or Token->Completion is NULL
EFI_NOT_FOUNDToken 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.

Parameters
[in]ThisA pointer to the EFI_USBFN_IO_PROTOCOL instance.
[out]DeviceInfoA pointer to EFI_USBFN_DEVICE_INFO instance.
Return values
EFI_SUCCESSThe function returned successfully.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_DEVICE_ERRORThe physical device reported an error.
EFI_NOT_READYThe physical device is busy or not ready to process this request.
EFI_OUT_OF_RESOURCESThe 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.

Parameters
[in]ThisA pointer to the EFI_USBFN_IO_PROTOCOLinstance.
[in]EndpointTypeEndpoint type as defined as EFI_USB_ENDPOINT_TYPE.
[in]BusSpeedBus speed as defined as EFI_USB_BUS_SPEED.
[out]MaxPacketSizeThe maximum packet size, in bytes, of the specified endpoint type.
Return values
EFI_SUCCESSThe function returned successfully.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_DEVICE_ERRORThe physical device reported an error.
EFI_NOT_READYThe 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.

Parameters
[in]ThisA pointer to the EFI_USBFN_IO_PROTOCOLinstance.
[in]IdThe requested information id.
[in]BufferSizeOn input, the size of the Buffer in bytes. On output, the amount of data returned in Buffer in bytes.
[out]BufferA pointer to a buffer to returnthe requested information as a Unicode string.
Return values
EFI_SUCCESSThe function returned successfully.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: BufferSize is NULL. BufferSize is not 0 and Buffer is NULL. Id in invalid.
EFI_DEVICE_ERRORThe physical device reported an error.
EFI_BUFFER_TOO_SMALLThe 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.

Parameters
[in]ThisA pointer to the EFI_USBFN_IO_PROTOCOL instance.
[out]VidReturned vendor-id of the device.
[out]PidReturned product-id of the device.
Return values
EFI_SUCCESSThe function returned successfully.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_NOT_FOUNDUnable 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.

Parameters
[in]ThisA pointer to the EFI_USBFN_IO_PROTOCOL instance.
[in]EndpointIndexIndicates the endpoint on which the ongoing transfer needs to be canceled.
[in]DirectionDirection of the endpoint.
Return values
EFI_SUCCESSThe function returned successfully.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_DEVICE_ERRORThe physical device reported an error.
EFI_NOT_READYThe 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.

Parameters
[in]ThisA pointer to the EFI_USBFN_IO_PROTOCOL instance.
[in]EndpointIndexIndicates the endpoint.
[in]DirectionDirection of the endpoint.
[in,out]StateBoolean, true value indicates that the endpoint is in a stalled state, false otherwise.
Return values
EFI_SUCCESSThe function returned successfully.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_DEVICE_ERRORThe physical device reported an error.
EFI_NOT_READYThe 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.

Parameters
[in]ThisA pointer to the EFI_USBFN_IO_PROTOCOL instance.
[in]EndpointIndexIndicates the endpoint.
[in]DirectionDirection of the endpoint.
[in]StateRequested stall state on the specified endpoint. True value causes the endpoint to stall; false value clears an existing stall.
Return values
EFI_SUCCESSThe function returned successfully.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_DEVICE_ERRORThe physical device reported an error.
EFI_NOT_READYThe 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.

Parameters
[in]ThisA pointer to the EFI_USBFN_IO_PROTOCOL instance.
[out]MessageIndicates the event that initiated this notification.
[in,out]PayloadSizeOn input, the size of the memory pointed by Payload. On output, the amount ofdata returned in Payload.
[out]PayloadA pointer to EFI_USBFN_MESSAGE_PAYLOAD instance to return additional payload for current message.
Return values
EFI_SUCCESSThe function returned successfully.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_DEVICE_ERRORThe physical device reported an error.
EFI_NOT_READYThe physical device is busy or not ready to process this request.
EFI_BUFFER_TOO_SMALLThe 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.

Parameters
[in]ThisA pointer to the EFI_USBFN_IO_PROTOCOL instance.
[in]EndpointIndexIndicates the endpoint on which TX or RX transfer needs to take place.
[in]DirectionDirection of the endpoint.
[in,out]BufferSizeIf 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]BufferIf Direction is EfiUsbEndpointDirectionDeviceRx: The Buffer to return the received data. If Directionis EfiUsbEndpointDirectionDeviceTx: The Buffer that contains the data to be transmitted.
Return values
EFI_SUCCESSThe function returned successfully.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_DEVICE_ERRORThe physical device reported an error.
EFI_NOT_READYThe 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.

Parameters
[in]ThisA pointer to the EFI_USBFN_IO_PROTOCOL instance.
[out]MaxTransferSizeThe maximum supported transfer size, in bytes.
Return values
EFI_SUCCESSThe function returned successfully.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_DEVICE_ERRORThe physical device reported an error.
EFI_NOT_READYThe 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.

Parameters
[in]ThisA pointer to the EFI_USBFN_IO_PROTOCOL instance.
[in]SizeThe number of bytes to allocate for the transfer buffer.
[out]BufferA pointer to a pointer to the allocated buffer if the call succeeds; undefined otherwise.
Return values
EFI_SUCCESSThe function returned successfully.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_OUT_OF_RESOURCESThe 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().

Parameters
[in]ThisA pointer to the EFI_USBFN_IO_PROTOCOL instance.
[in]BufferA pointer to the transfer buffer to deallocate.
Return values
EFI_SUCCESSThe function returned successfully.
EFI_INVALID_PARAMETERA 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.

Parameters
[in]ThisA pointer to the EFI_USBFN_IO_PROTOCOL instance.
Return values
EFI_SUCCESSThe function returned successfully.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_DEVICE_ERRORThe physical device reported an error.

This function stops the USB hardware device.

Parameters
[in]ThisA pointer to the EFI_USBFN_IO_PROTOCOL instance.
Return values
EFI_SUCCESSThe function returned successfully.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_DEVICE_ERRORThe 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.

Parameters
[in]ThisA pointer to the EFI_USBFN_IO_PROTOCOL instance.
[in]EndpointIndexIndicates the non-control endpoint for which the policy needs to be set.
[in]DirectionDirection of the endpoint.
[in]PolicyTypePolicy type the user is trying to set for the specified non-control endpoint.
[in]BufferSizeThe size of the Bufferin bytes.
[in]BufferThe new value for the policy parameter that PolicyType specifies.
Return values
EFI_SUCCESSThe function returned successfully.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_DEVICE_ERRORThe physical device reported an error.
EFI_UNSUPPORTEDChanging 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.

Parameters
[in]ThisA pointer to the EFI_USBFN_IO_PROTOCOL instance.
[in]EndpointIndexIndicates the non-control endpoint for which the policy needs to be set.
[in]DirectionDirection of the endpoint.
[in]PolicyTypePolicy type the user is trying to retrieve for the specified non-control endpoint.
[in,out]BufferSizeOn input, the size of Bufferin bytes. On output, the amount of data returned in Bufferin bytes.
[in,out]BufferA pointer to a buffer to return requested endpoint policy value.
Return values
EFI_SUCCESSThe function returned successfully.
EFI_INVALID_PARAMETERA parameter is invalid.
EFI_DEVICE_ERRORThe specified policy value is not supported.
EFI_BUFFER_TOO_SMALLSupplied buffer is not large enough to hold requested policy value.

Reads a specified number of bytes from a device.

Parameters
ThisIndicates a pointer to the calling context.
MediaIdID of the medium to be read.
OffsetThe starting byte offset on the logical block I/O device to read from.
TokenA pointer to the token associated with the transaction. If this field is NULL, synchronous/blocking IO is performed.
BufferSizeThe size in bytes of Buffer. The number of bytes to read from the device.
BufferA pointer to the destination buffer for the data. The caller is responsible either having implicit or explicit ownership of the buffer.
Return values
EFI_SUCCESSIf 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_ERRORThe device reported an error while performing the write.
EFI_NO_MEDIAThere is no medium in the device.
EFI_MEDIA_CHNAGEDThe MediaId is not for the current medium.
EFI_INVALID_PARAMETERThe read request contains device addresses that are not valid for the device.
EFI_OUT_OF_RESOURCESThe request could not be completed due to a lack of resources.

Writes a specified number of bytes to a device.

Parameters
ThisIndicates a pointer to the calling context.
MediaIdID of the medium to be written.
OffsetThe starting byte offset on the logical block I/O device to write to.
TokenA pointer to the token associated with the transaction. If this field is NULL, synchronous/blocking IO is performed.
BufferSizeThe size in bytes of Buffer. The number of bytes to write to the device.
BufferA pointer to the buffer containing the data to be written.
Return values
EFI_SUCCESSIf 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_PROTECTEDThe device cannot be written to.
EFI_DEVICE_ERRORThe device reported an error while performing the write operation.
EFI_NO_MEDIAThere is no medium in the device.
EFI_MEDIA_CHNAGEDThe MediaId is not for the current medium.
EFI_INVALID_PARAMETERThe write request contains device addresses that are not valid for the device.
EFI_OUT_OF_RESOURCESThe request could not be completed due to a lack of resources.

Flushes all modified data to the physical device.

Parameters
ThisIndicates a pointer to the calling context.
MediaIdID of the medium to be written.
TokenA pointer to the token associated with the transaction. If this field is NULL, synchronous/blocking IO is performed.
Return values
EFI_SUCCESSIf 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_PROTECTEDThe device cannot be written to.
EFI_DEVICE_ERRORThe device reported an error while performing the write operation.
EFI_NO_MEDIAThere is no medium in the device.
EFI_MEDIA_CHNAGEDThe MediaId is not for the current medium.
EFI_OUT_OF_RESOURCESThe request could not be completed due to a lack of resources.

Get EAP configuration data.

The GetData() function gets EAP configuration.

Parameters
[in]ThisPointer to the EFI_EAP_CONFIGURATION_PROTOCOL instance.
[in]EapTypeEAP type.
[in]DataTypeConfiguration data type.
[in,out]DataPointer to configuration data.
[in,out]DataSizeTotal 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.
Return values
EFI_SUCCESSThe EAP configuration data is got successfully.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: Data is NULL. DataSize is NULL.
EFI_UNSUPPORTEDThe EapType or DataType is unsupported.
EFI_NOT_FOUNDThe EAP configuration data is not found.
EFI_BUFFER_TOO_SMALLThe 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).

Parameters
[in]ThisPointer to EFI_PKCS7_VERIFY_PROTOCOL instance.
[in]SignaturePoints to buffer containing ASN.1 DER-encoded PKCS detached signature.
[in]SignatureSizeThe size of Signature buffer in bytes.
[in]InHashInHash points to buffer containing the caller calculated hash of the data. The parameter may not be NULL.
[in]InHashSizeThe size in bytes of InHash buffer.
[in]AllowedDbPointer 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]RevokedDbOptional 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]TimeStampDbOptional 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.
Return values
EFI_SUCCESSSigned 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_VIOLATIONThe 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_DATACaller provided hash differs from signed hash. Or, caller and encrypted hash are different sizes.
EFI_INVALID_PARAMETERSignature is NULL or SignatureSize is zero. InHash is NULL or InHashSize is zero. AllowedDb is NULL.
EFI_ABORTEDUnsupported or invalid format in TimeStampDb, RevokedDb or AllowedDb list contents was detected.
EFI_UNSUPPORTEDThe 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.

Parameters
[in]ThisPointer to EFI_HTTP_PROTOCOL instance.
[in]TokenPointer to storage containing HTTP response token.
Return values
EFI_SUCCESSAllocation succeeded.
EFI_NOT_STARTEDThis EFI HTTP Protocol instance has not been initialized.
EFI_INVALID_PARAMETEROne 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_RESOURCESCould not allocate enough system resources.
EFI_ACCESS_DENIEDAn 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.

Parameters
[in]ThisPointer to EFI_HTTP_PROTOCOL instance.
Return values
EFI_SUCCESSIncoming or outgoing data was processed..
EFI_DEVICE_ERRORAn unexpected system or network error occurred
EFI_INVALID_PARAMETERThis is NULL.
EFI_NOT_READYNo incoming or outgoing data is processed.
EFI_NOT_STARTEDThis 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.

Parameters
[in]ThisThe pointer to the EFI_UFS_DEVICE_CONFIG_PROTOCOL instance.
[in]ReadThe boolean variable to show r/w direction.
[in]FlagIdThe ID of flag to be read or written.
[in,out]FlagThe buffer to set or clear flag.
Return values
EFI_SUCCESSThe flag descriptor is set/clear successfully.
EFI_INVALID_PARAMETERThis is NULL or Flag is NULL. FlagId is an invalid UFS flag ID.
EFI_DEVICE_ERRORThe 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.

Parameters
[in]ThisThe pointer to the EFI_UFS_DEVICE_CONFIG_PROTOCOL instance.
[in]ReadThe boolean variable to show r/w direction.
[in]AttrIdThe ID of Attribute.
[in]IndexThe Index of Attribute.
[in]SelectorThe Selector of Attribute.
[in,out]AttributeThe buffer of Attribute to be read or written.
[in,out]AttrSizeThe 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.
Return values
EFI_SUCCESSThe attribute is read/written successfully.
EFI_INVALID_PARAMETERThis 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_ERRORThe attribute is not read/written successfully.

Unregister a notification function.

The UnregisterResetNotify() function removes the previously registered notification using RegisterResetNotify().

Parameters
[in]ThisA pointer to the EFI_RESET_NOTIFICATION_PROTOCOL instance.
[in]ResetFunctionThe pointer to the ResetFunction being unregistered.
Return values
EFI_SUCCESSThe reset notification function was unregistered.
EFI_INVALID_PARAMETERResetFunction is NULL.
EFI_INVALID_PARAMETERThe 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.

Parameters
[in]ThisPointer to an EFI_I2C_ENUMERATE_PROTOCOL structure.
[in]I2cBusConfigurationI2C bus configuration to access the I2C device
[out]*BusClockHertzPointer to a buffer to receive the I2C bus clock frequency in Hertz
Return values
EFI_SUCCESSThe I2C bus frequency was returned successfully.
EFI_INVALID_PARAMETERBusClockHertz was NULL
EFI_NO_MAPPINGInvalid I2cBusConfiguration value

Connect a wireless network specified by a particular SSID, BSS type and Security type.

Parameters
[in]ThisPointer to the EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL instance.
[in]TokenPointer to the token for connecting wireless network.
Return values
EFI_SUCCESSThe operation started successfully. Results will be notified eventually.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: This is NULL. Token is NULL.
EFI_UNSUPPORTEDOne or more of the input parameters are not supported by this implementation.
EFI_ALREADY_STARTEDThe connection process is already started.
EFI_NOT_FOUNDThe specified wireless network is not found.
EFI_OUT_OF_RESOURCESRequired system resources could not be allocated.

Request a disconnection with current connected wireless network.

Parameters
[in]ThisPointer to the EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL instance.
[in]TokenPointer to the token for disconnecting wireless network.
Return values
EFI_SUCCESSThe operation started successfully. Results will be notified eventually.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: This is NULL. Token is NULL.
EFI_UNSUPPORTEDOne or more of the input parameters are not supported by this implementation.
EFI_NOT_FOUNDNot connected to a wireless network.
EFI_OUT_OF_RESOURCESRequired 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.

Parameters
[in]ThisPointer to an EFI_SPI_NOR_FLASH_PROTOCOL data structure.
[in]FlashAddressAddress in the flash to start reading
[in]LengthInBytesRead length in bytes
[out]BufferAddress of a buffer to receive the data
Return values
EFI_SUCCESSThe data was read successfully.
EFI_INVALID_PARAMETERBuffer 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.

Parameters
[in]ThisPointer to an EFI_SPI_NOR_FLASH_PROTOCOL data structure.
[in]LengthInBytesNumber of status bytes to read.
[out]FlashStatusPointer to a buffer to receive the flash status.
Return values
EFI_SUCCESSThe 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.

Parameters
[in]ThisPointer to an EFI_SPI_NOR_FLASH_PROTOCOL data structure.
[in]LengthInBytesNumber of status bytes to write.
[in]FlashStatusPointer to a buffer containing the new status.
Return values
EFI_SUCCESSThe status write was successful.
EFI_OUT_OF_RESOURCESFailed 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.

Parameters
[in]ThisPointer to an EFI_SPI_NOR_FLASH_PROTOCOL data structure.
[in]FlashAddressAddress in the flash to start writing
[in]LengthInBytesWrite length in bytes
[in]BufferAddress of a buffer containing the data
Return values
EFI_SUCCESSThe data was written successfully.
EFI_INVALID_PARAMETERBuffer is NULL, or FlashAddress >= This->FlashSize, or LengthInBytes > This->FlashSize - FlashAddress
EFI_OUT_OF_RESOURCESInsufficient 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.

Parameters
[in]ThisPointer to an EFI_SPI_NOR_FLASH_PROTOCOL data structure.
[in]FlashAddressAddress within a 4 KiB block to start erasing
[in]BlockCountNumber of 4 KiB blocks to erase
Return values
EFI_SUCCESSThe erase was completed successfully.
EFI_INVALID_PARAMETERFlashAddress >= 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.

Parameters
[in]ThisPointer to EFI_DNS6_PROTOCOL instance.
[in]IpAddressIp Address.
[in]TokenPoint to the completion token to translate host address to host name.
Return values
EFI_SUCCESSThe operation completed successfully.
EFI_UNSUPPORTEDThis function is not supported.
EFI_INVALID_PARAMETEROne 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_MAPPINGThere's no source address is available for use.
EFI_NOT_STARTEDThis instance has not been started.
EFI_OUT_OF_RESOURCESFailed 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.

Parameters
[in]ThisPointer to EFI_DNS6_PROTOCOL instance.
[in]QNamePointer to Query Name.
[in]QTypeQuery Type.
[in]QClassQuery Name.
[in]TokenPoint to the completion token to retrieve arbitrary information.
Return values
EFI_SUCCESSThe operation completed successfully.
EFI_UNSUPPORTEDThis function is not supported. Or the requested QType is not supported
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: This is NULL. Token is NULL. Token.Event is NULL. QName is NULL.
EFI_NO_MAPPINGThere's no source address is available for use.
EFI_NOT_STARTEDThis instance has not been started.
EFI_OUT_OF_RESOURCESFailed 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.

Parameters
[in]ThisPointer to EFI_DNS6_PROTOCOL instance.
[in]DeleteFlagIf FALSE, this function is to add one entry to the DNS Cahce. If TRUE, this function will delete matching DNS Cache entry.
[in]OverrideIf 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]DnsCacheEntryPointer to DNS Cache entry.
Return values
EFI_SUCCESSThe operation completed successfully.
EFI_INVALID_PARAMETEROne 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_DENIEDThe DNS cache entry already exists and Override is not TRUE.
EFI_OUT_OF_RESOURCEFailed 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.

Parameters
[in]ThisPointer to EFI_DNS6_PROTOCOL instance.
Return values
EFI_SUCCESSIncoming or outgoing data was processed.
EFI_NOT_STARTEDThis EFI DNS Protocol instance has not been started.
EFI_INVALID_PARAMETERThis is NULL.
EFI_NO_MAPPINGThere is no source address is available for use.
EFI_DEVICE_ERRORAn unexpected system or network error occurred.
EFI_TIMEOUTData 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.

Parameters
[in]ThisPointer to EFI_DNS6_PROTOCOL instance.
[in]TokenPointer 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.
Return values
EFI_SUCCESSIncoming or outgoing data was processed.
EFI_NOT_STARTEDThis EFI DNS6 Protocol instance has not been started.
EFI_INVALID_PARAMETERThis is NULL.
EFI_NO_MAPPINGThere's no source address is available for use.
EFI_NOT_FOUNDWhen 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).

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL instance.
[in]DataData 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]DataLengthThe length of Data in bytes.
[in]CallbackCallback 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]ContextData passed into Callback function. It is optional parameter and may be NULL.
Return values
EFI_SUCCESSThe request is sent successfully.
EFI_INVALID_PARAMETEROne or more parameters are invalid due to following conditions:
  • The Buffer is NULL.
  • The BufferLength is 0.
  • The opcode in Buffer is not a valid OPCODE according to Bluetooth specification.
  • The Callback is NULL.
EFI_DEVICE_ERRORSending the request failed due to the host controller or the device error.
EFI_NOT_READYA GATT operation is already underway for this device.
EFI_UNSUPPORTEDThe 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.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance.
[in]DataTypeConfiguration data type.
[in,out]DataSizeOn input, indicates the size, in bytes, of the data buffer specified by Data. On output, indicates the amount of data actually returned.
[in,out]DataA pointer to the buffer of data that will be returned.
Return values
EFI_SUCCESSThe BluetoothLE configuration data is returned successfully.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE:
  • DataSize is NULL.
  • *DataSize is 0.
  • Data is NULL.
EFI_UNSUPPORTEDThe DataType is unsupported.
EFI_NOT_FOUNDThe DataType is not found.
EFI_BUFFER_TOO_SMALLThe 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.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance.
[in]DataTypeConfiguration data type.
[in]DataSizeIndicates the size, in bytes, of the data buffer specified by Data.
[in]DataA pointer to the buffer of data that will be set.
Return values
EFI_SUCCESSThe BluetoothLE configuration data is set successfully.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE:
  • DataSize is 0.
  • Data is NULL.
EFI_UNSUPPORTEDThe DataType is unsupported.
EFI_WRITE_PROTECTEDCannot set configuration data.

Get remove BluetoothLE device configuration data.

The GetRemoteData() function returns remote BluetoothLE device configuration data.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance.
[in]DataTypeConfiguration data type.
[in]BDAddrRemote BluetoothLE device address.
[in,out]DataSizeOn input, indicates the size, in bytes, of the data buffer specified by Data. On output, indicates the amount of data actually returned.
[in,out]DataA pointer to the buffer of data that will be returned.
Return values
EFI_SUCCESSThe remote BluetoothLE device configuration data is returned successfully.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE:
  • DataSize is NULL.
  • *DataSize is 0.
  • Data is NULL.
EFI_UNSUPPORTEDThe DataType is unsupported.
EFI_NOT_FOUNDThe DataType is not found.
EFI_BUFFER_TOO_SMALLThe buffer is too small to hold the buffer.

The callback function for SMP.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance.
[in]ContextData passed into callback function. This is optional parameter and may be NULL.
[in]BDAddrRemote BluetoothLE device address.
[in]EventDataTypeEvent data type in EFI_BLUETOOTH_LE_SMP_EVENT_DATA_TYPE.
[in]DataSizeIndicates the size, in bytes, of the data buffer specified by Data.
[in]DataA pointer to the buffer of data.
Return values
EFI_SUCCESSThe 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.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance.
[in]CallbackCallback function for user authentication/authorization.
[in]ContextData passed into Callback function. This is optional parameter and may be NULL.
Return values
EFI_SUCCESSThe SMP callback function is registered successfully.
EFI_ALREADY_STARTEDA callback function is already registered on the same attribute opcode and attribute handle, when the Callback is not NULL.
EFI_NOT_STARTEDA 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().

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance.
[in]BDAddrRemote BluetoothLE device address.
[in]EventDataTypeEvent data type in EFI_BLUETOOTH_LE_SMP_EVENT_DATA_TYPE.
[in]DataSizeThe size of Data in bytes, of the data buffer specified by Data.
[in]DataA pointer to the buffer of data that will be sent. The data format depends on the type of SMP event data being responded to.
Return values
EFI_SUCCESSThe SMP authorization data is sent successfully.
EFI_NOT_READYSMP is not in the correct state to receive the auth data.

The callback function to get SMP data.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance.
[in]ContextData passed into callback function. This is optional parameter and may be NULL.
[in]BDAddrRemote BluetoothLE device address. For Local device setting, it should be NULL.
[in]DataTypeData type in EFI_BLUETOOTH_LE_SMP_DATA_TYPE.
[in,out]DataSizeOn input, indicates the size, in bytes, of the data buffer specified by Data. On output, indicates the amount of data actually returned.
[out]DataA pointer to the buffer of data that will be returned.
Return values
EFI_SUCCESSThe 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.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance.
[in]CallbackCallback function for SMP get data.
[in]ContextData passed into Callback function. This is optional parameter and may be NULL.
Return values
EFI_SUCCESSThe SMP get data callback function is registered successfully.
EFI_ALREADY_STARTEDA callback function is already registered on the same attribute opcode and attribute handle, when the Callback is not NULL.
EFI_NOT_STARTEDA 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.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance.
[in]ContextData passed into callback function. This is optional parameter and may be NULL.
[in]BDAddrRemote BluetoothLE device address.
[in]DataTypeData type in EFI_BLUETOOTH_LE_SMP_DATA_TYPE.
[in]DataSizeIndicates the size, in bytes, of the data buffer specified by Data.
[in]DataA pointer to the buffer of data.
Return values
EFI_SUCCESSThe 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.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance.
[in]CallbackCallback function for SMP set data.
[in]ContextData passed into Callback function. This is optional parameter and may be NULL.
Return values
EFI_SUCCESSThe SMP set data callback function is registered successfully.
EFI_ALREADY_STARTEDA callback function is already registered on the same attribute opcode and attribute handle, when the Callback is not NULL.
EFI_NOT_STARTEDA 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.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance.
[in]ContextData passed into callback function. This is optional parameter and may be NULL.
[in]CallbackTypeThe value defined in EFI_BLUETOOTH_CONNECT_COMPLETE_CALLBACK_TYPE.
[in]BDAddrRemote BluetoothLE device address.
[in]InputBufferA pointer to the buffer of data that is input from callback caller.
[in]InputBufferSizeIndicates the size, in bytes, of the data buffer specified by InputBuffer.
Return values
EFI_SUCCESSThe 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

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance.
[in]CallbackThe callback function. NULL means unregister.
[in]ContextData passed into Callback function. This is optional parameter and may be NULL.
Return values
EFI_SUCCESSThe link connect complete callback function is registered successfully.
EFI_ALREADY_STARTEDA callback function is already registered on the same attribute opcode and attribute handle, when the Callback is not NULL.
EFI_NOT_STARTEDA 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.

Parameters
[in]ThisPointer to EFI_DNS4_PROTOCOL instance.
[in]DnsConfigDataPoint to the Configuration data.
Return values
EFI_SUCCESSThe operation completed successfully.
EFI_UNSUPPORTEDThe designated protocol is not supported.
EFI_INVALID_PARAMETERThis 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_RESOURCESThe DNS instance data or required space could not be allocated.
EFI_DEVICE_ERRORAn unexpected system or network error occurred. The EFI DNSv4 Protocol instance is not configured.
EFI_ALREADY_STARTEDSecond 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.

Parameters
[in]ThisPointer to EFI_DNS4_PROTOCOL instance.
[in]HostNameHost name.
[in]TokenPoint to the completion token to translate host name to host address.
Return values
EFI_SUCCESSThe operation completed successfully.
EFI_INVALID_PARAMETEROne 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_MAPPINGThere's no source address is available for use.
EFI_NOT_STARTEDThis 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.

Parameters
[in]ThisPointer to EFI_DNS4_PROTOCOL instance.
[in]IpAddressIp Address.
[in]TokenPoint to the completion token to translate host address to host name.
Return values
EFI_SUCCESSThe operation completed successfully.
EFI_UNSUPPORTEDThis function is not supported.
EFI_INVALID_PARAMETEROne 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_MAPPINGThere's no source address is available for use.
EFI_ALREADY_STARTEDThis Token is being used in another DNS session.
EFI_OUT_OF_RESOURCESFailed 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.

Parameters
[in]ThisPointer to EFI_DNS4_PROTOCOL instance.
[in]QNamePointer to Query Name.
[in]QTypeQuery Type.
[in]QClassQuery Name.
[in]TokenPoint to the completion token to retrieve arbitrary information.
Return values
EFI_SUCCESSThe operation completed successfully.
EFI_UNSUPPORTEDThis function is not supported. Or the requested QType is not supported
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: This is NULL. Token is NULL. Token.Event is NULL. QName is NULL.
EFI_NO_MAPPINGThere's no source address is available for use.
EFI_ALREADY_STARTEDThis Token is being used in another DNS session.
EFI_OUT_OF_RESOURCESFailed 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.

Parameters
[in]ThisPointer to EFI_DNS4_PROTOCOL instance.
[in]DeleteFlagIf FALSE, this function is to add one entry to the DNS Cahce. If TRUE, this function will delete matching DNS Cache entry.
[in]OverrideIf 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]DnsCacheEntryPointer to DNS Cache entry.
Return values
EFI_SUCCESSThe operation completed successfully.
EFI_INVALID_PARAMETEROne 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_DENIEDThe 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.

Parameters
[in]ThisPointer to EFI_DNS4_PROTOCOL instance.
Return values
EFI_SUCCESSIncoming or outgoing data was processed.
EFI_NOT_STARTEDThis EFI DNS Protocol instance has not been started.
EFI_INVALID_PARAMETERThis is NULL.
EFI_DEVICE_ERRORAn unexpected system or network error occurred.
EFI_TIMEOUTData 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.

Parameters
[in]ThisPointer to EFI_DNS4_PROTOCOL instance.
[in]TokenPointer 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.
Return values
EFI_SUCCESSIncoming or outgoing data was processed.
EFI_NOT_STARTEDThis EFI DNS4 Protocol instance has not been started.
EFI_INVALID_PARAMETERThis is NULL.
EFI_NOT_FOUNDWhen 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.

Parameters
[in]ThisIndicates the calling context
[in]EventLogFormatThe type of the event log for which the information is requested.
[out]EventLogLocationA pointer to the memory address of the event log.
[out]EventLogLastEntryIf 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]EventLogTruncatedIf 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.
Return values
EFI_SUCCESSOperation completed successfully.
EFI_INVALID_PARAMETEROne 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).

Parameters
[in]ThisIndicates the calling context
[in]FlagsBitmap providing additional information.
[in]DataToHashPhysical address of the start of the data buffer to be hashed.
[in]DataToHashLenThe length in bytes of the buffer referenced by DataToHash.
[in]EventPointer to data buffer containing information about the event.
Return values
EFI_SUCCESSOperation completed successfully.
EFI_DEVICE_ERRORThe command was unsuccessful.
EFI_VOLUME_FULLThe extend operation occurred, but the event could not be written to one or more event logs.
EFI_INVALID_PARAMETEROne or more of the parameters are incorrect.
EFI_UNSUPPORTEDThe PE/COFF image type is not supported.

This service enables the sending of commands to the TrEE.

Parameters
[in]ThisIndicates the calling context
[in]InputParameterBlockSizeSize of the TrEE input parameter block.
[in]InputParameterBlockPointer to the TrEE input parameter block.
[in]OutputParameterBlockSizeSize of the TrEE output parameter block.
[in]OutputParameterBlockPointer to the TrEE output parameter block.
Return values
EFI_SUCCESSThe command byte stream was successfully sent to the device and a response was successfully received.
EFI_DEVICE_ERRORThe command was not successfully sent to the device or a response was not successfully received from the device.
EFI_INVALID_PARAMETEROne or more of the parameters are incorrect.
EFI_BUFFER_TOO_SMALLThe output parameter block is too small.

Writes data to a file.

Parameters
ThisA pointer to the EFI_FILE_PROTOCOL instance that is the file handle to write data to.
TokenA pointer to the token associated with the transaction.
Return values
EFI_SUCCESSIf 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_UNSUPPORTEDWrites to open directory files are not supported.
EFI_NO_MEDIAThe device has no medium.
EFI_DEVICE_ERRORThe device reported an error.
EFI_DEVICE_ERRORAn attempt was made to write to a deleted file.
EFI_VOLUME_CORRUPTEDThe file system structures are corrupted.
EFI_WRITE_PROTECTEDThe file or medium is write-protected.
EFI_ACCESS_DENIEDThe file was opened read only.
EFI_VOLUME_FULLThe volume is full.
EFI_OUT_OF_RESOURCESUnable to queue the request due to lack of resources.

Flushes all modified data associated with a file to a device.

Parameters
ThisA pointer to the EFI_FILE_PROTOCOL instance that is the file handle to flush.
TokenA pointer to the token associated with the transaction.
Return values
EFI_SUCCESSIf 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_MEDIAThe device has no medium.
EFI_DEVICE_ERRORThe device reported an error.
EFI_VOLUME_CORRUPTEDThe file system structures are corrupted.
EFI_WRITE_PROTECTEDThe file or medium is write-protected.
EFI_ACCESS_DENIEDThe file was opened read-only.
EFI_VOLUME_FULLThe volume is full.
EFI_OUT_OF_RESOURCESUnable 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.

Parameters
[in]ThisPointer to the EFI_IP4_CONFIG2_PROTOCOL instance.
[in]DataTypeThe type of data to get.
[out]DataSizeOn input, in bytes, the size of Data. On output, in bytes, the size of buffer required to store the specified configuration data.
[in]DataThe 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.
Return values
EFI_SUCCESSThe specified configuration data is got successfully.
EFI_INVALID_PARAMETEROne or more of the followings are TRUE: This is NULL. DataSize is NULL. Data is NULL if *DataSizeis not zero.
EFI_BUFFER_TOO_SMALLThe size of Data is too small for the specified configuration data and the required size is returned in DataSize.
EFI_NOT_READYThe specified configuration data is not ready due to an already in progress asynchronous configuration process.
EFI_NOT_FOUNDThe 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.

Parameters
[in]ThisPointer to the EFI_IP4_CONFIG2_PROTOCOL instance.
[in]DataTypeThe type of data to unregister the event for.
[in]EventThe event to register.
Return values
EFI_SUCCESSThe notification event for the specified configuration data is registered.
EFI_INVALID_PARAMETERThis is NULL or Event is NULL.
EFI_UNSUPPORTEDThe configuration data type specified by DataType is not supported.
EFI_OUT_OF_RESOURCESRequired system resources could not be allocated.
EFI_ACCESS_DENIEDThe 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.

Parameters
[in]ThisPointer to the EFI_IP4_CONFIG2_PROTOCOL instance.
[in]DataTypeThe type of data to remove the previously registered event for.
[in]EventThe event to unregister.
Return values
EFI_SUCCESSThe event registered for the specified configuration data is removed.
EFI_INVALID_PARAMETERThis is NULL or Event is NULL.
EFI_NOT_FOUNDThe 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.

Parameters
ThisPointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance.
NameSpaceIdA 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.
KeywordStringA 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.
ProgressOn 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.
ProgressErrIf 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.
ResultsA 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.
Return values
EFI_SUCCESSThe specified action was completed successfully.
EFI_INVALID_PARAMETEROne 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_FOUNDAn element of the KeywordString was not found. See ProgressErr for more data.
EFI_NOT_FOUNDThe NamespaceId specified was not found. See ProgressErr for more data.
EFI_OUT_OF_RESOURCESRequired system resources could not be allocated. See ProgressErr for more data.
EFI_ACCESS_DENIEDThe action violated system policy. See ProgressErr for more data.
EFI_DEVICE_ERRORAn unexpected system error occurred. See ProgressErr for more data.

Produces and returns an RNG value using either the default or specified RNG algorithm.

Parameters
[in]ThisA pointer to the EFI_RNG_PROTOCOL instance.
[in]RNGAlgorithmA 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]RNGValueLengthThe length in bytes of the memory buffer pointed to by RNGValue. The driver shall return exactly this numbers of bytes.
[out]RNGValueA caller-allocated memory buffer filled by the driver with the resulting RNG value.
Return values
EFI_SUCCESSThe RNG value was returned successfully.
EFI_UNSUPPORTEDThe algorithm specified by RNGAlgorithm is not supported by this driver.
EFI_DEVICE_ERRORAn RNG value could not be retrieved due to a hardware or firmware error.
EFI_NOT_READYThere is not enough random data available to satisfy the length requested by RNGValueLength.
EFI_INVALID_PARAMETERRNGValue 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.

Parameters
[in]ThisIndicates a pointer to the calling context.
[in]CardActionCodes for card action.
Return values
EFI_SUCCESSThe requested command completed successfully.
EFI_INVALID_PARAMETERThis is NULL
EFI_INVALID_PARAMETERCardAction value is unknown.
EFI_UNSUPPORTEDReader does not support Eject card feature (disconnect was not performed).
EFI_DEVICE_ERRORAny 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.

Parameters
[in]ThisIndicates a pointer to the calling context.
[out]ReaderNameA pointer to a NULL terminated string that will contain the reader name.
[in,out]ReaderNameLengthOn input, a pointer to the variablethat holds the maximal size, in bytes,of ReaderName. On output, the required size, in bytes, for ReaderName.
[out]StateCurrent state of the smart card reader.
[out]CardProtocolCurrent protocol used to communicate with the smart card.
[out]AtrA pointer to retrieve the ATR of the smart card.
[in,out]AtrLengthOn 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.
Return values
EFI_SUCCESSThe requested command completed successfully.
EFI_INVALID_PARAMETERThis is NULL
EFI_INVALID_PARAMETERReaderName is not NULL but ReaderNameLength is NULL
EFI_INVALID_PARAMETERAtr is not NULL but AtrLength is NULL
EFI_BUFFER_TOO_SMALLReaderNameLength is not big enough to hold the reader name. ReaderNameLength has been updated to the required value.
EFI_BUFFER_TOO_SMALLAtrLength is not big enough to hold the ATR. AtrLength has been updated to the required value.
EFI_DEVICE_ERRORAny 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.

Parameters
[in]ThisA pointer to the EFI_USBFN_IO_PROTOCOLinstance.
[in]CAPDUA pointer to a byte array thatcontains the Command APDU to send to the smart card or reader.
[in]CAPDULengthCommand APDU size, in bytes.
[out]RAPDUA pointer to a byte array that will contain the Response APDU.
[in,out]RAPDULengthOn input, the maximum size, inbytes, of the Response APDU. On output, the size, in bytes, of the Response APDU.
Return values
EFI_SUCCESSThe requested command completed successfully.
EFI_INVALID_PARAMETERThis is NULL.
EFI_INVALID_PARAMETERCAPDU is NULL or CAPDULength is 0.
EFI_BUFFER_TOO_SMALLRAPDULength is not big enough to hold the response APDU. RAPDULength has been updated to the required value.
EFI_NO_MEDIAThere is no card in the reader.
EFI_NOT_READYCard is not powered.
EFI_PROTOCOL_ERRORA protocol error has occurred.
EFI_TIMEOUTThe reader did not respond.
EFI_ACCESS_DENIEDA communication with the reader/card is already pending.
EFI_DEVICE_ERRORAny 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.

Parameters
[in]ThisIndicates a pointer to the calling context.
[in]ControlCodeThe control code for the operation to perform.
[in]InBufferA pointer to the input parameters.
[in]InBufferLengthSize, in bytes, of input parameters.
[out]OutBufferA pointer to the output parameters.
[in,out]OutBufferLengthOn input, maximal size, in bytes, to store output parameters. On output, the size, in bytes, of output parameters.
Return values
EFI_SUCCESSThe requested command completed successfully.
EFI_INVALID_PARAMETERThis is NULL.
EFI_INVALID_PARAMETERControlCode requires input parameters but: InBuffer is NULL or InBufferLenth is NULL or InBuffer is not NULL but InBufferLenth is less than expected.
EFI_INVALID_PARAMETEROutBuffer is not NULL but OutBufferLength is NULL.
EFI_UNSUPPORTEDControlCode is not supported.
EFI_BUFFER_TOO_SMALLOutBufferLength is not big enough to hold the output parameters. OutBufferLength has been updated to the required value.
EFI_NO_MEDIAThere is no card in the reader and the control code specified requires one.
EFI_NOT_READYControlCode requires a powered card to operate.
EFI_PROTOCOL_ERRORA protocol error has occurred.
EFI_TIMEOUTThe reader did not respond.
EFI_ACCESS_DENIEDA communication with the reader/card is already pending.
EFI_DEVICE_ERRORAny 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".

Parameters
[in]ThisIndicates a pointer to the calling context.
[in]AttribIdentifier for the attribute to retrieve.
[out]OutBufferA pointer to a buffer that will contain attribute data.
[in,out]OutBufferLengthOn input, maximal size, in bytes, to store attribute data. On output, the size, in bytes, of attribute data.
Return values
EFI_SUCCESSThe requested command completed successfully.
EFI_INVALID_PARAMETERThis is NULL.
EFI_INVALID_PARAMETEROutBuffer is NULL or OutBufferLength is 0.
EFI_BUFFER_TOO_SMALLOutBufferLength is not big enough to hold the output parameters. OutBufferLength has been updated to the required value.
EFI_UNSUPPORTEDAttribis not supported
EFI_NO_MEDIAThere is no card in the reader and Attrib value requires one.
EFI_NOT_READYAttrib requires a powered card to operate.
EFI_PROTOCOL_ERRORA protocol error has occurred.
EFI_TIMEOUTThe reader did not respond.
EFI_DEVICE_ERRORAny 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.

Parameters
[in]ThisPointer to an EFI_SPI_IO_PROTOCOL structure.
[in]SpiPeripheralPointer to an EFI_SPI_PERIPHERAL structure.
Return values
EFI_SUCCESSThe SPI peripheral was updated successfully
EFI_INVALID_PARAMETERThe 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.

Parameters
[in]ThisIndicates a pointer to the calling context.
[in]MediaIdId of the media, changes every time the media is replaced.
[in]LbaThe starting Logical Block Address to read from.
[in,out]TokenA pointer to the token associated with the transaction.
[in]BufferSizeSize of Buffer, must be a multiple of device block size.
[out]BufferA pointer to the destination buffer for the data. The caller is responsible for either having implicit or explicit ownership of the buffer.
Return values
EFI_SUCCESSThe 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_ERRORThe device reported an error while performing the read.
EFI_NO_MEDIAThere is no media in the device.
EFI_MEDIA_CHANGEDThe MediaId is not for the current media.
EFI_BAD_BUFFER_SIZEThe BufferSize parameter is not a multiple of the intrinsic block size of the device.
EFI_INVALID_PARAMETERThe read request contains LBAs that are not valid, or the buffer is not on proper alignment.
EFI_OUT_OF_RESOURCESThe 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.

Parameters
[in]ThisIndicates a pointer to the calling context.
[in]MediaIdThe media ID that the write request is for.
[in]LbaThe starting logical block address to be written. The caller is responsible for writing to only legitimate locations.
[in,out]TokenA pointer to the token associated with the transaction.
[in]BufferSizeSize of Buffer, must be a multiple of device block size.
[in]BufferA pointer to the source buffer for the data.
Return values
EFI_SUCCESSThe write request was queued if Event is not NULL. The data was written correctly to the device if the Event is NULL.
EFI_WRITE_PROTECTEDThe device can not be written to.
EFI_NO_MEDIAThere is no media in the device.
EFI_MEDIA_CHNAGEDThe MediaId does not matched the current device.
EFI_DEVICE_ERRORThe device reported an error while performing the write.
EFI_BAD_BUFFER_SIZEThe Buffer was not a multiple of the block size of the device.
EFI_INVALID_PARAMETERThe write request contains LBAs that are not valid, or the buffer is not on proper alignment.
EFI_OUT_OF_RESOURCESThe 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.

Parameters
[in]ThisIndicates a pointer to the calling context.
[in,out]TokenA pointer to the token associated with the transaction
Return values
EFI_SUCCESSThe 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_ERRORThe device reported an error while writting back the data.
EFI_WRITE_PROTECTEDThe device cannot be written to.
EFI_NO_MEDIAThere is no media in the device.
EFI_MEDIA_CHANGEDThe MediaId is not for the current media.
EFI_OUT_OF_RESOURCESThe 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.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_HC_PROTOCOL instance.
[in]IsNewTransferIf TRUE, a new transfer will be submitted. If FALSE, the request is deleted.
[in]PollingIntervalIndicates the periodic rate, in milliseconds, that the transfer is to be executed.
[in]DataLengthSpecifies the length, in bytes, of the data to be received.
[in]CallbackThe callback function. This function is called if the asynchronous transfer is completed.
[in]ContextData passed into Callback function. This is optional parameter and may be NULL.
Return values
EFI_SUCCESSThe HCI asynchronous receive request is submitted successfully.
EFI_INVALID_PARAMETEROne 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.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_HC_PROTOCOL instance.
[in]IsNewTransferIf TRUE, a new transfer will be submitted. If FALSE, the request is deleted.
[in]PollingIntervalIndicates the periodic rate, in milliseconds, that the transfer is to be executed.
[in]DataLengthSpecifies the length, in bytes, of the data to be received.
[in]CallbackThe callback function. This function is called if the asynchronous transfer is completed.
[in]ContextData passed into Callback function. This is optional parameter and may be NULL.
Return values
EFI_SUCCESSThe HCI asynchronous receive request is submitted successfully.
EFI_INVALID_PARAMETEROne 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.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_HC_PROTOCOL instance.
[in]IsNewTransferIf TRUE, a new transfer will be submitted. If FALSE, the request is deleted.
[in]PollingIntervalIndicates the periodic rate, in milliseconds, that the transfer is to be executed.
[in]DataLengthSpecifies the length, in bytes, of the data to be received.
[in]CallbackThe callback function. This function is called if the asynchronous transfer is completed.
[in]ContextData passed into Callback function. This is optional parameter and may be NULL.
Return values
EFI_SUCCESSThe HCI asynchronous receive request is submitted successfully.
EFI_INVALID_PARAMETEROne 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.

Parameters
[in]ThisPointer to the EFI_KMS_PROTOCOL instance.
[in]ClientPointer to a valid EFI_KMS_CLIENT_INFO structure.
[in,out]ClientDataSizePointer 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]ClientDataPointer 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.
Return values
EFI_SUCCESSThe client information has been accepted by the KMS.
EFI_NOT_READYNo connection to the KMS is available.
EFI_NO_RESPONSEThere was no response from the device or the key server.
EFI_ACCESS_DENIEDAccess was denied by the device or the key server.
EFI_DEVICE_ERRORAn error occurred when attempting to access the KMS.
EFI_OUT_OF_RESOURCESRequired resources were not available to perform the function.
EFI_INVALID_PARAMETERThis is NULL.
EFI_UNSUPPORTEDThe 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.

Parameters
[in]ThisPointer to the EFI_KMS_PROTOCOL instance.
[in]ClientPointer to a valid EFI_KMS_CLIENT_INFO structure.
[in,out]KeyDescriptorCountPointer 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]KeyDescriptorsPointer 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]ClientDataSizePointer 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]ClientDataPointer 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.
Return values
EFI_SUCCESSSuccessfully generated and retrieved all requested keys.
EFI_UNSUPPORTEDThis 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_RESOURCESRequired resources were not available to perform the function.
EFI_TIMEOUTTimed out waiting for device or key server. Check individual key request(s) to see which ones may have been processed.
EFI_ACCESS_DENIEDAccess 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_ERRORAn error occurred when attempting to access the KMS. Check individual key request(s) to see which ones may have been processed.
EFI_INVALID_PARAMETERThis is NULL, ClientId is required but it is NULL, KeyDescriptorCount is NULL, or Keys is NULL.
EFI_NOT_FOUNDOne 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.

Parameters
[in]ThisPointer to the EFI_KMS_PROTOCOL instance.
[in]ClientPointer to a valid EFI_KMS_CLIENT_INFO structure.
[in,out]KeyDescriptorCountPointer 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]KeyDescriptorsPointer 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]ClientDataSizePointer 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]ClientDataPointer 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.
Return values
EFI_SUCCESSSuccessfully retrieved all requested keys.
EFI_OUT_OF_RESOURCESCould not allocate resources for the method processing.
EFI_TIMEOUTTimed out waiting for device or key server. Check individual key request(s) to see which ones may have been processed.
EFI_BUFFER_TOO_SMALLIf 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_DENIEDAccess 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_ERRORDevice or key server error. Check individual key request(s) to see which ones may have been processed.
EFI_INVALID_PARAMETERThis is NULL, ClientId is required but it is NULL, KeyDescriptorCount is NULL, or Keys is NULL.
EFI_NOT_FOUNDOne 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_UNSUPPORTEDThe implementation/KMS does not support this function.

Add a new key.

Parameters
[in]ThisPointer to the EFI_KMS_PROTOCOL instance.
[in]ClientPointer to a valid EFI_KMS_CLIENT_INFO structure.
[in,out]KeyDescriptorCountPointer 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]KeyDescriptorsPointer 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]ClientDataSizePointer 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]ClientDataPointer 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.
Return values
EFI_SUCCESSSuccessfully added all requested keys.
EFI_OUT_OF_RESOURCESCould not allocate required resources.
EFI_TIMEOUTTimed out waiting for device or key server. Check individual key request(s) to see which ones may have been processed.
EFI_BUFFER_TOO_SMALLIf 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_DENIEDAccess 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_ERRORDevice or key server error. Check individual key request(s) to see which ones may have been processed.
EFI_INVALID_PARAMETERThis is NULL, ClientId is required but it is NULL, KeyDescriptorCount is NULL, or Keys is NULL.
EFI_NOT_FOUNDOne 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_UNSUPPORTEDThe implementation/KMS does not support this function.

Delete an existing key from the KMS database.

Parameters
[in]ThisPointer to the EFI_KMS_PROTOCOL instance.
[in]ClientPointer to a valid EFI_KMS_CLIENT_INFO structure.
[in,out]KeyDescriptorCountPointer 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]KeyDescriptorsPointer 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]ClientDataSizePointer 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]ClientDataPointer 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.
Return values
EFI_SUCCESSSuccessfully deleted all requested keys.
EFI_OUT_OF_RESOURCESCould not allocate required resources.
EFI_TIMEOUTTimed out waiting for device or key server. Check individual key request(s) to see which ones may have been processed.
EFI_ACCESS_DENIEDAccess 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_ERRORDevice or key server error. Check individual key request(s) to see which ones may have been processed.
EFI_INVALID_PARAMETERThis is NULL, ClientId is required but it is NULL, KeyDescriptorCount is NULL, or Keys is NULL.
EFI_NOT_FOUNDOne 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_UNSUPPORTEDThe 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.

Parameters
[in]ThisPointer to the EFI_KMS_PROTOCOL instance.
[in]ClientPointer to a valid EFI_KMS_CLIENT_INFO structure.
[in]KeyIdentifierSizePointer to the size in bytes of the KeyIdentifier variable.
[in]KeyIdentifierPointer to the key identifier associated with this key.
[in,out]KeyAttributesCountPointer 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]KeyAttributesPointer 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]ClientDataSizePointer 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]ClientDataPointer 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.
Return values
EFI_SUCCESSSuccessfully retrieved all key attributes.
EFI_OUT_OF_RESOURCESCould not allocate resources for the method processing.
EFI_TIMEOUTTimed out waiting for device or key server. Check individual key attribute request(s) to see which ones may have been processed.
EFI_BUFFER_TOO_SMALLIf 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_DENIEDAccess 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_ERRORDevice 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_PARAMETERThis 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_FOUNDThe KeyIdentifier could not be found. KeyAttributesCount contains zero. Individual structures will reflect the status of the processing for that structure.
EFI_UNSUPPORTEDThe implementation/KMS does not support this function.

Add one or more attributes to a key specified by a key identifier.

Parameters
[in]ThisPointer to the EFI_KMS_PROTOCOL instance.
[in]ClientPointer to a valid EFI_KMS_CLIENT_INFO structure.
[in]KeyIdentifierSizePointer to the size in bytes of the KeyIdentifier variable.
[in]KeyIdentifierPointer to the key identifier associated with this key.
[in,out]KeyAttributesCountPointer 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]KeyAttributesPointer 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]ClientDataSizePointer 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]ClientDataPointer 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.
Return values
EFI_SUCCESSSuccessfully added all requested key attributes.
EFI_OUT_OF_RESOURCESCould not allocate required resources.
EFI_TIMEOUTTimed out waiting for device or key server. Check individual key attribute request(s) to see which ones may have been processed.
EFI_BUFFER_TOO_SMALLIf 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_DENIEDAccess 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_ERRORDevice 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_PARAMETERThis 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_FOUNDThe 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_UNSUPPORTEDThe implementation/KMS does not support this function.

Delete attributes to a key specified by a key identifier.

Parameters
[in]ThisPointer to the EFI_KMS_PROTOCOL instance.
[in]ClientPointer to a valid EFI_KMS_CLIENT_INFO structure.
[in]KeyIdentifierSizePointer to the size in bytes of the KeyIdentifier variable.
[in]KeyIdentifierPointer to the key identifier associated with this key.
[in,out]KeyAttributesCountPointer 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]KeyAttributesPointer 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]ClientDataSizePointer 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]ClientDataPointer 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.
Return values
EFI_SUCCESSSuccessfully deleted all requested key attributes.
EFI_OUT_OF_RESOURCESCould not allocate required resources.
EFI_TIMEOUTTimed out waiting for device or key server. Check individual key attribute request(s) to see which ones may have been processed.
EFI_ACCESS_DENIEDAccess 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_ERRORDevice 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_PARAMETERThis 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_FOUNDThe 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_UNSUPPORTEDThe implementation/KMS does not support this function.

Retrieve one or more key that has matched all of the specified key attributes.

Parameters
[in]ThisPointer to the EFI_KMS_PROTOCOL instance.
[in]ClientPointer to a valid EFI_KMS_CLIENT_INFO structure.
[in,out]KeyAttributesCountPointer 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]KeyAttributesPointer 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]KeyDescriptorCountPointer 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]KeyDescriptorsPointer 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]ClientDataSizePointer 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]ClientDataPointer 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.
Return values
EFI_SUCCESSSuccessfully retrieved all requested keys.
EFI_OUT_OF_RESOURCESCould not allocate required resources.
EFI_TIMEOUTTimed out waiting for device or key server. Check individual key attribute request(s) to see which ones may have been processed.
EFI_BUFFER_TOO_SMALLIf 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_DENIEDAccess 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_ERRORDevice 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_PARAMETERThis 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_FOUNDOne 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_UNSUPPORTEDThe 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.

Parameters
[in]FileListThe file list to free. Type EFI_SHELL_FILE_INFO is defined in OpenFileList().
Return values
EFI_SUCCESSFree 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.

Parameters
[in]DeviceHandleThe handle of the device.
[in]FlagsDetermines the possible sources of component names.
[in]LanguageA pointer to the language specified for the device name, in the same format as described in the UEFI specification, Appendix M.
[out]BestDeviceNameOn 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...
Return values
EFI_SUCCESSGet the name successfully.
EFI_NOT_FOUNDFail 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.

Parameters
[in]CommandPoints to the NULL-terminated UEFI Shell command name.
[in]SectionsPoints to the NULL-terminated comma-delimited section names to return. If NULL, then all sections will be returned.
[out]HelpTextOn return, points to a callee-allocated buffer containing all specified help text.
Return values
EFI_SUCCESSThe help text was returned.
EFI_OUT_OF_RESOURCESThe necessary buffer could not be allocated to hold the returned help text.
EFI_INVALID_PARAMETERHelpText is NULL.
EFI_NOT_FOUNDThere 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.

Parameters
[in]FileNamePoints to the NULL-terminated UCS-2 encoded file name.
[out]FileHandleOn return, points to the file handle.
[in]OpenModeFile open mode. Either EFI_FILE_MODE_READ or EFI_FILE_MODE_WRITE from section 12.4 of the UEFI Specification.
Return values
EFI_SUCCESSThe file was opened. FileHandle has the opened file's handle.
EFI_INVALID_PARAMETEROne of the parameters has an invalid value. FileHandle is NULL.
EFI_UNSUPPORTEDCould not open the file path. FileHandle is NULL.
EFI_NOT_FOUNDThe 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_MEDIAThe device has no medium. FileHandle is NULL.
EFI_MEDIA_CHANGEDThe device has a different medium in it or the medium is no longer supported. FileHandle is NULL.
EFI_DEVICE_ERRORThe device reported an error or can't get the file path according the FileName. FileHandle is NULL.
EFI_VOLUME_CORRUPTEDThe file system structures are corrupted. FileHandle is NULL.
EFI_WRITE_PROTECTEDAn attempt was made to create a file, or open a file for write when the media is write-protected. FileHandle is NULL.
EFI_ACCESS_DENIEDThe service denied access to the file. FileHandle is NULL.
EFI_OUT_OF_RESOURCESNot enough resources were available to open the file. FileHandle is NULL.
EFI_VOLUME_FULLThe 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.

Parameters
[in]PathA pointer to the path string.
[in]OpenModeSpecifies the mode used to open each file, EFI_FILE_MODE_READ or EFI_FILE_MODE_WRITE.
[in,out]FileListPoints to the start of a list of files opened.
Return values
EFI_SUCCESSCreate the file list successfully.
Returns
Can't create the file list.

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.

Parameters
[in]FileHandleThe opened file handle for read.
[in]ReadSizeOn input, the size of Buffer, in bytes. On output, the amount of data read.
[in,out]BufferThe buffer in which data is read.
Return values
EFI_SUCCESSData was read.
EFI_NO_MEDIAThe device has no media.
EFI_DEVICE_ERRORThe device reported an error.
EFI_VOLUME_CORRUPTEDThe file system structures are corrupted.
EFI_BUFFER_TO_SMALLBuffer is too small. ReadSize contains required size.

Deletes the duplicate file names files in the given file list.

Parameters
[in]FileListA pointer to the first entry in the file list.
Return values
EFI_SUCCESSAlways 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.

Parameters
[in]FileSystemA pointer to the file system's mapped name. If NULL, then the current working directory is changed.
[in]DirPoints to the NULL-terminated directory on the device specified by FileSystem.
Return values
NULLCurrent directory does not exist.
Returns
The current directory.

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.

Parameters
[in]NamePoints to the NULL-terminated environment variable name.
[in]ValuePoints to the NULL-terminated environment variable value. If the value is an empty string then the environment variable is deleted.
[in]VolatileIndicates whether the variable is non-volatile (FALSE) or volatile (TRUE).
Return values
EFI_SUCCESSThe 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.

Parameters
[in]SpiPeripheralPointer 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]ClockHzPointer 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.
Return values
EFI_SUCCESSThe clock was set up successfully
EFI_UNSUPPORTEDThe 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.

Return values
EFI_SUCCESSThe regular expression string matching completed successfully.
EFI_UNSUPPORTEDThe regular expression syntax specified by SyntaxTypeis not supported by this driver.
EFI_DEVICE_ERRORThe regular expression string matching failed due to a hardware or firmware error.
EFI_INVALID_PARAMETERString, Pattern, Result, or CapturesCountis NULL.

Callback function, it is called when asynchronous transfer is completed.

Parameters
[in]DataData received via asynchronous transfer.
[in]DataLengthThe length of Data in bytes, received via asynchronous transfer.
[in]ContextContext passed from asynchronous transfer request.
Return values
EFI_SUCCESSThe 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.

Parameters
[in]ThisPointer to EFI_HTTP_UTILITIES_PROTOCOL instance.
[in]HttpMessageContains raw unformatted HTTP header string.
[in]HttpMessageSizeSize of HTTP header.
[out]HeaderFieldsArray of key/value header pairs.
[out]FieldCountNumber of headers in HeaderFields.
Return values
EFI_SUCCESSAllocation succeeded.
EFI_NOT_STARTEDThis EFI HTTP Protocol instance has not been initialized.
EFI_INVALID_PARAMETEROne 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().

Parameters
[in]ThisPointer to an EFI_I2C_MASTER_PROTOCOL structure.
Return values
EFI_SUCCESSThe reset completed successfully.
EFI_ALREADY_STARTEDThe controller is busy with another transaction.
EFI_DEVICE_ERRORThe 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.

Parameters
[in]ThisPointer to an EFI_I2C_MASTER_PROTOCOL structure.
[in]SlaveAddressAddress 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]RequestPacketPointer to an EFI_I2C_REQUEST_PACKET structure describing the I2C transaction.
[in]EventEvent to signal for asynchronous transactions, NULL for asynchronous transactions
[out]I2cStatusOptional buffer to receive the I2C transaction completion status
Return values
EFI_SUCCESSThe asynchronous transaction was successfully started when Event is not NULL.
EFI_SUCCESSThe transaction completed successfully when Event is NULL.
EFI_ALREADY_STARTEDThe controller is busy with another transaction.
EFI_BAD_BUFFER_SIZEThe RequestPacket->LengthInBytes value is too large.
EFI_DEVICE_ERRORThere was an I2C error (NACK) during the transaction.
EFI_INVALID_PARAMETERRequestPacket is NULL
EFI_NOT_FOUNDReserved bit set in the SlaveAddress parameter
EFI_NO_RESPONSEThe 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_RESOURCESInsufficient memory for I2C transaction
EFI_UNSUPPORTEDThe 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.

Parameters
[in]ThisA pointer to the EFI_SD_MMMC_PASS_THRU_PROTOCOL instance.
[in,out]SlotOn 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.
Return values
EFI_SUCCESSThe next slot number on the SD controller was returned in Slot.
EFI_NOT_FOUNDThere are no more slots on this SD controller.
EFI_INVALID_PARAMETERSlot 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.

Parameters
[in]ThisA pointer to the EFI_SD_MMMC_PASS_THRU_PROTOCOL instance.
[in]SlotSpecifies the slot number of the SD card for which a device path node is to be allocated and built.
[out]DevicePathA 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.
Return values
EFI_SUCCESSThe device path node that describes the SD card specified by Slot was allocated and returned in DevicePath.
EFI_NOT_FOUNDThe SD card specified by Slot does not exist on the SD controller.
EFI_INVALID_PARAMETERDevicePath is NULL.
EFI_OUT_OF_RESOURCESThere 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.

Parameters
[in]ThisA pointer to the EFI_SD_MMC_PASS_THRU_PROTOCOL instance.
[in]DevicePathA pointer to the device path node that describes a SD card on the SD controller.
[out]SlotOn return, points to the slot number of an SD card on the SD controller.
Return values
EFI_SUCCESSSD card slot number is returned in Slot.
EFI_INVALID_PARAMETERSlot or DevicePath is NULL.
EFI_UNSUPPORTEDDevicePath 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.

Parameters
[in]ThisA pointer to the EFI_SD_MMC_PASS_THRU_PROTOCOL instance.
[in]SlotSpecifies the slot number of the SD card to be reset.
Return values
EFI_SUCCESSThe SD card specified by Slot was reset.
EFI_UNSUPPORTEDThe SD controller does not support a device reset operation.
EFI_INVALID_PARAMETERSlot number is invalid.
EFI_NO_MEDIASD Device not present in the Slot.
EFI_DEVICE_ERRORThe 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.

Parameters
[in]ThisPointer to an EFI_LEGACY_SPI_CONTROLLER_PROTOCOL structure.
[in]WriteStatusPrefixPrefix opcode for the write status command.
Return values
EFI_SUCCESSThe prefix table was updated
EFI_ACCESS_ERRORThe 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.

Parameters
[in]ThisPointer to an EFI_LEGACY_SPI_CONTROLLER_PROTOCOL structure.
[in]BiosBaseAddressThe BIOS base address.
Return values
EFI_SUCCESSThe BIOS base address was properly set
EFI_ACCESS_ERRORThe SPI controller is locked
EFI_INVALID_PARAMETERThe BIOS base address is greater than This->Maxi.mumOffset
EFI_UNSUPPORTEDThe 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.

Parameters
[in]ThisPointer to an EFI_LEGACY_SPI_CONTROLLER_PROTOCOL structure.
Return values
EFI_SUCCESSThe registers were successfully cleared
EFI_ACCESS_ERRORThe 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.

Parameters
[in]ThisPointer to an EFI_LEGACY_SPI_CONTROLLER_PROTOCOL structure.
[in]BiosAddressAddress within a 4 KiB block to start protecting.
[in]BlocksToProtectThe number of 4 KiB blocks to protect.
Return values
EFI_SUCCESSThe register was successfully updated
EFI_ACCESS_ERRORThe SPI controller is locked
EFI_INVALID_PARAMETERBiosAddress < This->BiosBaseAddress, or BlocksToProtect * 4 KiB > This->MaximumRangeBytes, or BiosAddress - This->BiosBaseAddress
  • (BlocksToProtect * 4 KiB) > This->MaximumRangeBytes
EFI_OUT_OF_RESOURCESNo protect range register available
EFI_UNSUPPORTEDCall 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

Parameters
[in]ThisPointer to an EFI_LEGACY_SPI_CONTROLLER_PROTOCOL structure.
Return values
EFI_SUCCESSThe SPI controller was successfully locked
EFI_ALREADY_STARTEDThe 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.

Parameters
[in]ThisIndicates the calling context
[in]EventLogFormatThe type of the event log for which the information is requested.
[out]EventLogLocationA pointer to the memory address of the event log.
[out]EventLogLastEntryIf 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]EventLogTruncatedIf 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.
Return values
EFI_SUCCESSOperation completed successfully.
EFI_INVALID_PARAMETEROne 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).

Parameters
[in]ThisIndicates the calling context
[in]FlagsBitmap providing additional information.
[in]DataToHashPhysical address of the start of the data buffer to be hashed.
[in]DataToHashLenThe length in bytes of the buffer referenced by DataToHash.
[in]EfiTcgEventPointer to data buffer containing information about the event.
Return values
EFI_SUCCESSOperation completed successfully.
EFI_DEVICE_ERRORThe command was unsuccessful.
EFI_VOLUME_FULLThe extend operation occurred, but the event could not be written to one or more event logs.
EFI_INVALID_PARAMETEROne or more of the parameters are incorrect.
EFI_UNSUPPORTEDThe PE/COFF image type is not supported.

This service enables the sending of commands to the TPM.

Parameters
[in]ThisIndicates the calling context
[in]InputParameterBlockSizeSize of the TPM input parameter block.
[in]InputParameterBlockPointer to the TPM input parameter block.
[in]OutputParameterBlockSizeSize of the TPM output parameter block.
[in]OutputParameterBlockPointer to the TPM output parameter block.
Return values
EFI_SUCCESSThe command byte stream was successfully sent to the device and a response was successfully received.
EFI_DEVICE_ERRORThe command was not successfully sent to the device or a response was not successfully received from the device.
EFI_INVALID_PARAMETEROne or more of the parameters are incorrect.
EFI_BUFFER_TOO_SMALLThe output parameter block is too small.

This service returns the currently active PCR banks.

Parameters
[in]ThisIndicates the calling context
[out]ActivePcrBanksPointer to the variable receiving the bitmap of currently active PCR banks.
Return values
EFI_SUCCESSThe bitmap of active PCR banks was stored in the ActivePcrBanks parameter.
EFI_INVALID_PARAMETEROne or more of the parameters are incorrect.

This service sets the currently active PCR banks.

Parameters
[in]ThisIndicates the calling context
[in]ActivePcrBanksBitmap of the requested active PCR banks. At least one bit SHALL be set.
Return values
EFI_SUCCESSThe bitmap in ActivePcrBank parameter is already active.
EFI_INVALID_PARAMETEROne or more of the parameters are incorrect.

This service retrieves the result of a previous invocation of SetActivePcrBanks.

Parameters
[in]ThisIndicates the calling context
[out]OperationPresentNon-zero value to indicate a SetActivePcrBank operation was invoked during the last boot.
[out]ResponseThe response from the SetActivePcrBank request.
Return values
EFI_SUCCESSThe result value could be returned.
EFI_INVALID_PARAMETEROne or more of the parameters are incorrect.
typedef UINTN EFI_TPL

Task priority level.

64-bit virtual memory address.