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

Data Structures

struct  _EFI_PEI_GRAPHICS_PPI
 

Macros

#define EFI_PEI_GRAPHICS_PPI_GUID
 

Typedefs

typedef struct
_EFI_PEI_GRAPHICS_PPI 
EFI_PEI_GRAPHICS_PPI
 

Functions

typedef EFI_STATUS (EFIAPI *EFI_PEI_GRAPHICS_INIT)(IN VOID *GraphicsPolicyPtr)
 

Variables

EFI_GUID gEfiPeiGraphicsPpiGuid
 

Detailed Description

This file declares Graphics PPI. This PPI is the main interface exposed by the Graphics PEIM to be used by the other firmware modules.

Copyright (c) 2015, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Revision Reference:
This PPI is introduced in PI Version 1.4.

Macro Definition Documentation

#define EFI_PEI_GRAPHICS_PPI_GUID
Value:
{ \
0x6ecd1463, 0x4a4a, 0x461b, { 0xaf, 0x5f, 0x5a, 0x33, 0xe3, 0xb2, 0x16, 0x2b } \
}

Typedef Documentation

Function Documentation

typedef EFI_STATUS ( EFIAPI EFI_HII_CREATE_POPUP)

The GraphicsPpiInit initializes the graphics subsystem in phases.

Parameters
[in]GraphicsPolicyPtrGraphicsPolicyPtr points to a configuration data block of policy settings required by Graphics PEIM.
Return values
EFI_SUCCESSThe invocation was successful.
EFI_INVALID_PARAMETERThe phase parameter is not valid.
EFI_NOT_ABORTEDThe stages was not called in the proper order.
EFI_NOT_FOUNDThe PeiGraphicsPlatformPolicyPpi is not located.
EFI_DEVICE_ERRORThe initialization failed due to device error.
EFI_NOT_READYThe previous init stage is still in progress and not ready for the current initialization phase yet. The platform code should call this again sometime later.

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.

Frees memory pages.

Parameters
[in]PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
[in]MemoryThe base physical address of the pages to be freed.
[in]PagesThe number of contiguous 4 KB pages to free.
Return values
EFI_SUCCESSThe requested pages were freed.
EFI_INVALID_PARAMETERMemory is not a page-aligned address or Pages is invalid.
EFI_NOT_FOUNDThe requested memory pages were not allocated with AllocatePages().

Modifies the capabilities for a memory region in the global coherency domain of the processor.

Parameters
BaseAddressThe physical address that is the start address of a memory region.
LengthThe size in bytes of the memory region.
CapabilitiesThe bit mask of capabilities that the memory region supports.
Return values
EFI_SUCCESSThe capabilities were set for the memory region.
EFI_INVALID_PARAMETERLength is zero.
EFI_UNSUPPORTEDThe capabilities specified by Capabilities do not include the memory region attributes currently in use.
EFI_ACCESS_DENIEDThe capabilities for the memory resource range specified by BaseAddress and Length cannot be modified.
EFI_OUT_OF_RESOURCESThere are not enough system resources to modify the capabilities of the memory resource range.

Return a pointer to a buffer containing zero or more HOBs that will be installed into the PEI HOB List.

This function returns a pointer to a pointer to zero or more HOBs, terminated with a HOB of type EFI_HOB_TYPE_END_OF_HOB_LIST. Note: The HobList must not contain a EFI_HOB_HANDOFF_INFO_TABLE HOB (PHIT) HOB.

Parameters
[in]ThisPointer to this PPI structure.
[out]HobListA pointer to a returned pointer to zero or more HOBs. If no HOBs are to be returned, then the returned pointer is a pointer to a HOB of type EFI_HOB_TYPE_END_OF_HOB_LIST.
Return values
EFI_SUCCESSThis function completed successfully.
EFI_NOT_FOUNDNo HOBS are available.

Retrieve additional information associated with a PCD token in the default token space.

This includes information such as the type of value the TokenNumber is associated with as well as possible human readable name that is associated with the token.

Parameters
[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.

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.

Open I/O aperture.

This function opens an I/O aperture in a ISA Host Controller for the I/O addresses specified by IoAddress to IoAddress + IoLength - 1. It is possible that more than one caller may be assigned to the same aperture. It may be possible that a single hardware aperture may be used for more than one device. This function tracks the number of times that each aperture is referenced, and does not close the hardware aperture (via CloseIoAperture()) until there are no more references to it.

Parameters
ThisA pointer to this instance of the EFI_ISA_HC_PPI.
IoAddressAn unsigned integer that specifies the first byte of the I/O space required.
IoLengthAn unsigned integer that specifies the number of bytes of the I/O space required.
IoApertureHandleA pointer to the returned I/O aperture handle. This value can be used on subsequent calls to CloseIoAperture().
Return values
EFI_SUCCESSThe I/O aperture was opened successfully.
EFI_UNSUPPORTEDThe ISA Host Controller is a subtractive-decode controller.
EFI_OUT_OF_RESOURCESThere is no available I/O aperture.

Close I/O aperture.

This function closes a previously opened I/O aperture handle. If there are no more I/O aperture handles that refer to the hardware I/O aperture resource, then the hardware I/O aperture is closed. It may be possible that a single hardware aperture may be used for more than one device. This function tracks the number of times that each aperture is referenced, and does not close the hardware aperture (via CloseIoAperture()) until there are no more references to it.

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.

Invokes PPI activation from the PI PEI environment.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisThe PEI_MM_CONTROL_PPI instance.
ArgumentBufferThe value passed to the MMI handler. This value corresponds to the SwMmiInputValue in the RegisterContext parameter for the Register() function in the EFI_MM_SW_DISPATCH_PROTOCOL and in the Context parameter in the call to the DispatchFunction
ArgumentBufferSizeThe size of the data passed in ArgumentBuffer or NULL if ArgumentBuffer is NULL.
PeriodicAn optional mechanism to periodically repeat activation.
ActivationIntervalAn optional 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 timing is unsupported.
EFI_INVALID_PARAMETERThe activation period is unsupported.
EFI_NOT_STARTEDThe MM base service has not been initialized.

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 the number of CPU's.

Parameters
[in]PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
[in]ThisPointer to this instance of the PPI.
[out]NumberOfProcessorsPointer to the total number of logical processors in the system, including the BSP and disabled APs.
[out]NumberOfEnabledProcessorsNumber of processors in the system that are enabled.
Return values
EFI_SUCCESSThe number of logical processors and enabled logical processors was retrieved.
EFI_DEVICE_ERRORThe calling processor is an AP.
EFI_INVALID_PARAMETERNumberOfProcessors is NULL. NumberOfEnabledProcessors is NULL.

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.

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.

This function registers the MM Foundation entry point with the processor code. This entry point will be invoked by the MM Processor entry code as defined in PI specification.

Parameters
[in]ThisThe EFI_PEI_MM_CONFIGURATION_PPI instance.
[in]MmEntryPointMM Foundation entry point.
Return values
EFI_SUCCESSThe entry-point was successfully registered.

Set the frequency for the I2C clock line.

Parameters
ThisPointer to an EFI_PEI_I2C_MASTER_PPI structure.
BusClockHertzPointer to the requested I2C bus clock frequency in Hertz. Upon return this value contains the actual frequency in use by the I2C controller.
Return values
EFI_SUCCESSThe bus frequency was set successfully.
EFI_INVALID_PARAMETERBusClockHertz is NULL
EFI_UNSUPPORTEDThe controller does not support this frequency.

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.

Callback function that is invoked when the HTTP Boot driver is about to transmit or has received a packet.

This function is invoked when the HTTP Boot driver is about to transmit or has received packet. Parameters DataType and Received specify the type of event and the format of the buffer pointed to by Data. Due to the polling nature of UEFI device drivers, this callback function should not execute for more than 5 ms. The returned status code determines the behavior of the HTTP Boot driver.

Parameters
[in]ThisPointer to the EFI_HTTP_BOOT_CALLBACK_PROTOCOL instance.
[in]DataTypeThe event that occurs in the current state.
[in]ReceivedTRUE if the callback is being invoked due to a receive event. FALSE if the callback is being invoked due to a transmit event.
[in]DataLengthThe length in bytes of the buffer pointed to by Data.
[in]DataA pointer to the buffer of data, the data type is specified by DataType.
Return values
EFI_SUCCESSTells the HTTP Boot driver to continue the HTTP Boot process.
EFI_ABORTEDTells the HTTP Boot driver to abort the current HTTP Boot process.

Enable access to an I2C bus configuration.

This routine must be called at or below TPL_NOTIFY. For synchronous requests this routine must be called at or below TPL_CALLBACK.

Reconfigure the switches and multiplexers in the I2C bus to enable access to a specific I2C bus configuration. Also select the maximum clock frequency for this I2C bus configuration.

This routine uses the I2C Master protocol to perform I2C transactions on the local bus. This eliminates any recursion in the I2C stack for configuration transactions on the same I2C bus. This works because the local I2C bus is idle while the I2C bus configuration is being enabled.

If I2C transactions must be performed on other I2C busses, then the EFI_I2C_HOST_PROTOCOL, the EFI_I2C_IO_PROTCOL, or a third party I2C driver interface for a specific device must be used. This requirement is because the I2C host protocol controls the flow of requests to the I2C controller. Use the EFI_I2C_HOST_PROTOCOL when the I2C device is not enumerated by the EFI_I2C_ENUMERATE_PROTOCOL. Use a protocol produced by a third party driver when it is available or the EFI_I2C_IO_PROTOCOL when the third party driver is not available but the device is enumerated with the EFI_I2C_ENUMERATE_PROTOCOL.

When Event is NULL, EnableI2cBusConfiguration operates synchronously and returns the I2C completion status as its return value.

Parameters
[in]ThisPointer to an EFI_I2C_BUS_CONFIGURATION_MANAGEMENT_PROTOCOL structure.
[in]I2cBusConfigurationIndex of an I2C bus configuration. All values in the range of zero to N-1 are valid where N is the total number of I2C bus configurations for an I2C bus.
[in]EventEvent to signal when the transaction is complete
[out]I2cStatusBuffer to receive the transaction status.
Returns
When Event is NULL, EnableI2cBusConfiguration operates synchrouously and returns the I2C completion status as its return value. In this case it is recommended to use NULL for I2cStatus. The values returned from EnableI2cBusConfiguration are:
Return values
EFI_SUCCESSThe asynchronous bus configuration request was successfully started when Event is not NULL.
EFI_SUCCESSThe bus configuration request completed successfully when Event is NULL.
EFI_DEVICE_ERRORThe bus configuration failed.
EFI_NO_MAPPINGInvalid I2cBusConfiguration value

This function retrieves the context driver.

The GetContextfunction returns the context of the protocol, the application identifiers supported by the protocol and the number and the CSN unique identifier of Smart Cards that are present and supported by protocol.

If AidTableSize, AidTable, CsnTableSize, CsnTable or VersionProtocol is NULL, the function does not fail but does not fill in such variables.

In case AidTableSize indicates a buffer too small to hold all the protocol AID table, only the first AidTableSize items of the table are returned in AidTable.

In case CsnTableSize indicates a buffer too small to hold the entire table of Smart Card CSN present, only the first CsnTableSize items of the table are returned in CsnTable.

VersionScEdgeProtocol returns the version of the EFI_SMART_CARD_EDGE_PROTOCOL this driver uses. For this protocol specification value is SMART_CARD_EDGE_PROTOCOL_VERSION_1.

In case of Smart Card removal the internal CSN list is immediately updated, even if a connection is opened with that Smart Card.

Parameters
[in]ThisIndicates a pointer to the calling context.
[out]NumberAidSupportedNumber of AIDs this protocol supports.
[in,out]AidTableSizeOn input, number of items allocated for the AID table. On output, number of items returned by protocol.
[out]AidTableTable of the AIDs supported by the protocol.
[out]NumberSCPresentNumber of currently present Smart Cards that are supported by protocol.
[in,out]CsnTableSizeOn input, the number of items the buffer CSN table can contain. On output, the number of items returned by the protocol.
[out]CsnTableTable of the CSN of the Smart Card present and supported by protocol.
[out]VersionScEdgeProtocolEFI_SMART_CARD_EDGE_PROTOCOL version.
Return values
EFI_SUCCESSThe requested command completed successfully.
EFI_INVALID_PARAMETERThis is NULL.
EFI_INVALID_PARAMETERNumberSCPresent is NULL.

This function establish a connection with a Smart Card the protocol support.

In case of success the SCardHandle can be used.

If the ScardCsn is NULL the connection is established with the first Smart Card the protocol finds in its table of Smart Card present and supported. Else it establish context with the Smart Card whose CSN given by ScardCsn.

If ScardAid is not NULL the function returns the Smart Card AID the protocol supports. After a successful connect the SCardHandle will remain existing even in case Smart Card removed from Smart Card reader, but all function invoking this SCardHandle will fail. SCardHandle is released only on Disconnect.

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.

Provides a simple HTTP-like interface to send and receive resources from a REST service.

The SendReceive() function sends an HTTP request to this REST service, and returns a response when the data is retrieved from the service. RequestMessage contains the HTTP request to the REST resource identified by RequestMessage.Request.Url. The ResponseMessage is the returned HTTP response for that request, including any HTTP status.

Parameters
[in]ThisPointer to EFI_REST_PROTOCOL instance for a particular REST service.
[in]RequestMessagePointer to the HTTP request data for this resource.
[out]ResponseMessagePointer to the HTTP response data obtained for this requested.
Return values
EFI_SUCCESSOperation succeeded.
EFI_INVALID_PARAMETERThis, RequestMessage, or ResponseMessage are NULL.
EFI_DEVICE_ERRORAn unexpected system or network error occurred.

The GetServiceTime() function is an optional interface to obtain the current time from this REST service instance. If this REST service does not support retrieving the time, this function returns EFI_UNSUPPORTED.

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.

Return key generated through EAP process.

The GetKey() function return the key generated through EAP process, so that the 802.11 MAC layer driver can use MSK to derive more keys, e.g. PMK (Pairwise Master Key).

Parameters
[in]ThisPointer to the EFI_EAP_MANAGEMENT2_PROTOCOL instance.
[in,out]MskPointer to MSK (Master Session Key) buffer.
[in,out]MskSizeMSK buffer size.
[in,out]EmskPointer to EMSK (Extended Master Session Key) buffer.
[in,out]EmskSizeEMSK buffer size.
Return values
EFI_SUCCESSThe operation completed successfully.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: Msk is NULL. MskSize is NULL. Emsk is NULL. EmskSize is NULL.
EFI_NOT_READYMSK and EMSK are not generated in current session yet.

BuildResponsePacket() is called during STA and AP authentication is in progress. Supplicant derives the PTK or session keys depend on type of authentication is being employed.

Parameters
[in]ThisPointer to the EFI_SUPPLICANT_PROTOCOL instance.
[in]RequestBufferPointer to the most recently received EAPOL packet. NULL means the supplicant need initiate the EAP authentication session and send EAPOL-Start message.
[in]RequestBufferSizePacket size in bytes for the most recently received EAPOL 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 EAPOL packet is built successfully.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: RequestBuffer is NULL, but RequestSize is NOT 0. RequestBufferSize is 0. Buffer is NULL, but RequestBuffer is NOT 0. BufferSize is NULL.
EFI_BUFFER_TOO_SMALLBufferSize is too small to hold the response packet.
EFI_NOT_READYCurrent EAPOL session state is NOT ready to build ResponsePacket.

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

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 Storage Area size and the maximum transfer size for the LabelStorageRead and LabelStorageWrite methods.

Parameters
ThisA pointer to the EFI_NVDIMM_LABEL_PROTOCOL instance.
SizeOfLabelStorageAreaThe size of the Label Storage Area for the NVDIMM in bytes.
MaxTransferLengthThe maximum number of bytes that can be transferred in a single call to LabelStorageRead or LabelStorageWrite.
Return values
EFI_SUCCESSThe size of theLabel Storage Area and maximum transfer size returned are valid.
EFI_ACCESS_DENIEDThe Label Storage Area for the NVDIMM device is not currently accessible.
EFI_DEVICE_ERRORA physical device error occurred and the data transfer failed to complete.

Retrieves the label data for the requested offset and length from within the Label Storage Area for the NVDIMM.

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.

Handles IPsec processing for both inbound and outbound IP packets. Compare with Process() in EFI_IPSEC_PROTOCOL, this interface has the capability to process Option(Extension Header).

The EFI_IPSEC2_PROCESS process routine handles each inbound or outbound packet. The behavior is that it can perform one of the following actions: bypass the packet, discard the packet, or protect the packet.

Parameters
[in]ThisPointer to the EFI_IPSEC2_PROTOCOL instance.
[in]NicHandleInstance of the network interface.
[in]IpVerIP version.IPv4 or IPv6.
[in,out]IpHeadPointer to the IP Header it is either the EFI_IP4_HEADER or EFI_IP6_HEADER. On input, it contains the IP header. On output, 1) in tunnel mode and the traffic direction is inbound, the buffer will be reset to zero by IPsec; 2) in tunnel mode and the traffic direction is outbound, the buffer will reset to be the tunnel IP header.3) in transport mode, the related fielders (like payload length, Next header) in IP header will be modified according to the condition.
[in,out]LastHeadFor IP4, it is the next protocol in IP header. For IP6 it is the Next Header of the last extension header.
[in,out]OptionsBufferOn input, it contains the options (extensions header) to be processed by IPsec. On output, 1) in tunnel mode and the traffic direction is outbound, it will be set to NULL, and that means this contents was wrapped after inner header and should not be concatenated after tunnel header again; 2) in transport mode and the traffic direction is inbound, if there are IP options (extension headers) protected by IPsec, IPsec will concatenate the those options after the input options (extension headers); 3) on other situations, the output of contents of OptionsBuffer might be same with input's. The caller should take the responsibility to free the buffer both on input and on output.
[in,out]OptionsLengthOn input, the input length of the options buffer. On output, the output length of the options buffer.
[in,out]FragmentTablePointer to a list of fragments. On input, these fragments contain the IP payload. On output, 1) in tunnel mode and the traffic direction is inbound, the fragments contain the whole IP payload which is from the IP inner header to the last byte of the packet; 2) in tunnel mode and the traffic direction is the outbound, the fragments contains the whole encapsulated payload which encapsulates the whole IP payload between the encapsulated header and encapsulated trailer fields. 3) in transport mode and the traffic direction is inbound, the fragments contains the IP payload which is from the next layer protocol to the last byte of the packet; 4) in transport mode and the traffic direction is outbound, the fragments contains the whole encapsulated payload which encapsulates the next layer protocol information between the encapsulated header and encapsulated trailer fields.
[in,out]FragmentCountNumber of fragments.
[in]TrafficDirectionTraffic direction.
[out]RecycleSignalEvent for recycling of resources.
Return values
EFI_SUCCESSThe packet was processed by IPsec successfully.
EFI_ACCESS_DENIEDThe packet was discarded.
EFI_NOT_READYThe IKE negotiation is invoked and the packet was discarded.
EFI_INVALID_PARAMETEROne or more of following are TRUE: If OptionsBuffer is NULL; If OptionsLength is NULL; If FragmentTable is NULL; If FragmentCount is NULL.

Register a RAM disk with specified address, size and type.

Parameters
[in]RamDiskBaseThe base address of registered RAM disk.
[in]RamDiskSizeThe size of registered RAM disk.
[in]RamDiskTypeThe type of registered RAM disk. The GUID can be any of the values defined in section 9.3.6.9, or a vendor defined GUID.
[in]ParentDevicePathPointer to the parent device path. If there is no parent device path then ParentDevicePath is NULL.
[out]DevicePathOn return, points to a pointer to the device path of the RAM disk device. If ParentDevicePath is not NULL, the returned DevicePath is created by appending a RAM disk node to the parent device path. If ParentDevicePath is NULL, the returned DevicePath is a RAM disk device path without appending. This function is responsible for allocating the buffer DevicePath with the boot service AllocatePool().
Return values
EFI_SUCCESSThe RAM disk is registered successfully.
EFI_INVALID_PARAMETERDevicePath or RamDiskType is NULL. RamDiskSize is 0.
EFI_ALREADY_STARTEDA Device Path Protocol instance to be created is already present in the handle database.
EFI_OUT_OF_RESOURCESThe RAM disk register operation fails due to resource limitation.

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.

Assert or deassert the SPI chip select.

This routine is called at TPL_NOTIFY. Update the value of the chip select line for a SPI peripheral. The SPI bus layer calls this routine either in the board layer or in the SPI controller to manipulate the chip select pin at the start and end of a SPI transaction.

Parameters
[in]ThisPointer to an EFI_SPI_HC_PROTOCOL structure.
[in]SpiPeripheralThe address of an EFI_SPI_PERIPHERAL data structure describing the SPI peripheral whose chip select pin is to be manipulated. The routine may access the ChipSelectParameter field to gain sufficient context to complete the operati on.
[in]PinValueThe value to be applied to the chip select line of the SPI peripheral.
Return values
EFI_SUCCESSThe chip select was set as requested
EFI_NOT_READYSupport for the chip select is not properly initialized
EFI_INVALID_PARAMETERThe ChipSeLect value or its contents are invalid

Set up the clock generator to produce the correct clock frequency, phase and polarity for a SPI chip.

This routine is called at TPL_NOTIFY. This routine updates the clock generator to generate the correct frequency and polarity for the SPI clock.

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

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

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.

Reset the block device hardware.

The Reset() function resets the block device hardware.

As part of the initialization process, the firmware/device will make a quick but reasonable attempt to verify that the device is functioning.

If the ExtendedVerificationflag is TRUE the firmware may take an extended amount of time to verify the device is operating on reset. Otherwise the reset operation is to occur as quickly as possible.

The hardware verification process is not defined by this specification and is left up to the platform firmware or driver to implement.

Parameters
[in]ThisPointer to the EFI_BLOCK_IO_CRYPTO_PROTOCOL instance.
[in]ExtendedVerificationIndicates that the driver may perform a more exhausive verification operation of the device during reset.
Return values
EFI_SUCCESSThe block device was reset.
EFI_DEVICE_ERRORThe block device is not functioning correctly and could not be reset.
EFI_INVALID_PARAMETERThis is NULL.

Get the capabilities of the underlying inline cryptographic interface.

The GetCapabilities() function determines whether pre-OS controllable inline crypto is supported by the system for the current disk and, if so, returns the capabilities of the crypto engine.

The caller is responsible for providing the Capabilities structure with a sufficient number of entries.

If the structure is too small, the EFI_BUFFER_TOO_SMALL error code is returned and the CapabilityCount field contains the number of entries needed to contain the capabilities.

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.

Set TLS session data.

The SetSessionData() function set data for a new TLS session. All session data should be set before BuildResponsePacket() invoked.

Parameters
[in]ThisPointer to the EFI_TLS_PROTOCOL instance.
[in]DataTypeTLS session data type.
[in]DataPointer to session data.
[in]DataSizeTotal size of session data.
Return values
EFI_SUCCESSThe TLS session data is set successfully.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: This is NULL. Data is NULL. DataSize is 0.
EFI_UNSUPPORTEDThe DataType is unsupported.
EFI_ACCESS_DENIEDIf the DataType is one of below: EfiTlsClientRandom EfiTlsServerRandom EfiTlsKeyMaterial
EFI_NOT_READYCurrent TLS session state is NOT EfiTlsSessionStateNotStarted.
EFI_OUT_OF_RESOURCESRequired system resources could not be allocated.

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.

Send a security protocol command to a device.

The SendData function sends a security protocol command containing the payload PayloadBuffer to the given MediaId. The security protocol command sent is defined by SecurityProtocolId and contains the security protocol specific data SecurityProtocolSpecificData. If the underlying protocol command requires a specific padding for the command payload, the SendData function shall add padding bytes to the command payload to satisfy the padding requirements.

For devices supporting the SCSI command set, the security protocol command is sent using the SECURITY PROTOCOL OUT command defined in SPC-4.

For devices supporting the ATA command set, the security protocol command is sent using one of the TRUSTED SEND commands defined in ATA8-ACS if PayloadBufferSize is non-zero. If the PayloadBufferSize is zero, the security protocol command is sent using the Trusted Non-Data command defined in ATA8-ACS.

If PayloadBuffer is NULL and PayloadBufferSize is non-zero, the function shall return EFI_INVALID_PARAMETER.

If the given MediaId does not support security protocol commands, the function shall return EFI_UNSUPPORTED. If there is no media in the device, the function returns EFI_NO_MEDIA. If the MediaId is not the ID for the current media in the device, the function returns EFI_MEDIA_CHANGED.

If the security protocol fails to complete within the Timeout period, the function shall return EFI_TIMEOUT.

If the security protocol command completes without an error, the function shall return EFI_SUCCESS. If the security protocol command completes with an error, the function shall return EFI_DEVICE_ERROR.

Parameters
ThisIndicates a pointer to the calling context.
MediaIdID of the medium to receive data from.
TimeoutThe timeout, in 100ns units, to use for the execution of the security protocol command. A Timeout value of 0 means that this function will wait indefinitely for the security protocol command to execute. If Timeout is greater than zero, then this function will return EFI_TIMEOUT if the time required to execute the receive data command is greater than Timeout.
SecurityProtocolIdThe value of the "Security Protocol" parameter of the security protocol command to be sent.
SecurityProtocolSpecificDataThe value of the "Security Protocol Specific" parameter of the security protocol command to be sent.
PayloadBufferSizeSize in bytes of the payload data buffer.
PayloadBufferA pointer to a destination buffer to store the security protocol command specific payload data for the security protocol command.
Return values
EFI_SUCCESSThe security protocol command completed successfully.
EFI_UNSUPPORTEDThe given MediaId does not support security protocol commands.
EFI_DEVICE_ERRORThe security protocol command completed with an error.
EFI_NO_MEDIAThere is no media in the device.
EFI_MEDIA_CHANGEDThe MediaId is not for the current media.
EFI_INVALID_PARAMETERThe PayloadBuffer is NULL and PayloadBufferSize is non-zero.
EFI_TIMEOUTA timeout occurred while waiting for the security protocol command to execute.

Set the BIOS base address.

This routine must be called at or below TPL_NOTIFY. The BIOS base address works with the protect range registers to protect portions of the SPI NOR flash from erase and write operat ions. The BIOS calls this API prior to passing control to the OS loader.

Parameters
[in]ThisPointer to an EFI_LEGACY_SPI_FLASH_PROTOCOL data 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_PARAMETERBiosBaseAddress > This->MaximumOffset
EFI_UNSUPPORTEDThe BIOS base address was already set or not a legacy SPI host controller

Clear the SPI protect range registers.

This routine must be called at or below TPL_NOTIFY. The BIOS uses this routine to set an initial condition on the SPI protect range registers.

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

Open I/O aperture.

This function opens an I/O aperture in a ISA Host Controller for the I/O addresses specified by IoAddress to IoAddress + IoLength - 1. It may be possible that a single hardware aperture may be used for more than one device. This function tracks the number of times that each aperture is referenced, and does not close the hardware aperture (via CloseIoAperture()) until there are no more references to it.

Parameters
ThisA pointer to this instance of the EFI_ISA_HC_PROTOCOL.
IoAddressAn unsigned integer that specifies the first byte of the I/O space required.
IoLengthAn unsigned integer that specifies the number of bytes of the I/O space required.
IoApertureHandleA pointer to the returned I/O aperture handle. This value can be used on subsequent calls to CloseIoAperture().
Return values
EFI_SUCCESSThe I/O aperture was opened successfully.
EFI_UNSUPPORTEDThe ISA Host Controller is a subtractive-decode controller.
EFI_OUT_OF_RESOURCESThere is no available I/O aperture.

Close I/O aperture.

This function closes a previously opened I/O aperture handle. If there are no more I/O aperture handles that refer to the hardware I/O aperture resource, then the hardware I/O aperture is closed. It may be possible that a single hardware aperture may be used for more than one device. This function tracks the number of times that each aperture is referenced, and does not close the hardware aperture (via CloseIoAperture()) until there are no more references to it.

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.

Service to retrieves the number of logical processor in the platform.

Parameters
[in]ThisThe EFI_MM_MP_PROTOCOL instance.
[out]NumberOfProcessorsPointer to the total number of logical processors in the system, including the BSP and all APs.
Return values
EFI_SUCCESSThe number of processors was retrieved successfully
EFI_INVALID_PARAMETERNumberOfProcessors is NULL

This service allows the caller to invoke a procedure one of the application processors (AP). This function uses an optional token parameter to support blocking and non-blocking modes. If the token is passed into the call, the function will operate in a non-blocking fashion and the caller can check for completion with CheckOnProcedure or WaitForProcedure.

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

Erase a specified number of device blocks.

Parameters
[in]ThisIndicates a pointer to the calling context.
[in]MediaIdThe media ID that the erase request is for.
[in]LBAThe starting logical block address to be erased. The caller is responsible for erasing only legitimate locations.
[in,out]TokenA pointer to the token associated with the transaction.
[in]SizeThe size in bytes to be erased. This must be a multiple of the physical block size of the device.
Return values
EFI_SUCCESSThe erase request was queued if Event is not NULL. The data was erased correctly to the device if the Event is NULL.to the device.
EFI_WRITE_PROTECTEDThe device cannot be erased due to write protection.
EFI_DEVICE_ERRORThe device reported an error while attempting to perform the erase operation.
EFI_INVALID_PARAMETERThe erase request contains LBAs that are not valid.
EFI_NO_MEDIAThere is no media in the device.
EFI_MEDIA_CHANGEDThe MediaId is not for the current media.

Queue an I2C transaction for execution on the I2C device.

This routine must be called at or below TPL_NOTIFY. For synchronous requests this routine must be called at or below TPL_CALLBACK.

This routine queues an I2C transaction to the I2C controller for execution on the I2C bus.

When Event is NULL, QueueRequest() operates synchronously and returns the I2C completion status as its return value.

When Event is not NULL, QueueRequest() synchronously returns EFI_SUCCESS indicating that the asynchronous I2C transaction was queued. The values above are returned in the buffer pointed to by I2cStatus upon the completion of the I2C transaction when I2cStatus is not NULL.

The upper layer driver writer provides the following to the platform vendor:

  1. Vendor specific GUID for the I2C part
  2. Guidance on proper construction of the slave address array when the I2C device uses more than one slave address. The I2C bus protocol uses the SlaveAddressIndex to perform relative to physical address translation to access the blocks of hardware within the I2C device.
Parameters
[in]ThisPointer to an EFI_I2C_IO_PROTOCOL structure.
[in]SlaveAddressIndexIndex value into an array of slave addresses for the I2C device. The values in the array are specified by the board designer, with the third party I2C device driver writer providing the slave address order.

For devices that have a single slave address, this value must be zero. If the I2C device uses more than one slave address then the third party (upper level) I2C driver writer needs to specify the order of entries in the slave address array.

Third Party I2C Drivers" section in I2cMaster.h.

Parameters
[in]EventEvent to signal for asynchronous transactions, NULL for synchronous transactions
[in]RequestPacketPointer to an EFI_I2C_REQUEST_PACKET structure describing the I2C transaction
[out]I2cStatusOptional buffer to receive the I2C transaction completion status
Return values
EFI_SUCCESSThe asynchronous transaction was successfully queued when Event is not NULL.
EFI_SUCCESSThe transaction completed successfully when Event is NULL.
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_MAPPINGThe EFI_I2C_HOST_PROTOCOL could not set the bus configuration required to access this I2C device.
EFI_NO_RESPONSEThe I2C device is not responding to the slave address selected by SlaveAddressIndex. EFI_DEVICE_ERROR will be returned if the controller cannot distinguish when the NACK occurred.
EFI_OUT_OF_RESOURCESInsufficient memory for I2C transaction
EFI_UNSUPPORTEDThe controller does not support the requested transaction.

Returns information about what USB port type was attached.

Parameters
[in]ThisA pointer to the EFI_USBFN_IO_PROTOCOL instance.
[out]PortTypeReturns the USB port 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 or there is no USB port attached to the device.

Configures endpoints based on supplied device and configuration descriptors.

Assuming that the hardware has already been initialized, this function configures the endpoints using the device information supplied by DeviceInfo, activates the port, and starts receiving USB events.

This function must ignore the bMaxPacketSize0field of the Standard Device Descriptor and the wMaxPacketSize field of the Standard Endpoint Descriptor that are made available through DeviceInfo.

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.

Terminate outstanding asynchronous requests to a device.

Parameters
ThisIndicates a pointer to the calling context.
Return values
EFI_SUCCESSAll outstanding requests were successfully terminated.
EFI_DEVICE_ERRORThe device reported an error while performing the cancel operation.

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.

Set EAP configuration data.

The SetData() function sets EAP configuration to non-volatile storage or volatile storage.

Parameters
[in]ThisPointer to the EFI_EAP_CONFIGURATION_PROTOCOL instance.
[in]EapTypeEAP type.
[in]DataTypeConfiguration data type.
[in]DataPointer to configuration data.
[in]DataSizeTotal size of configuration data.
Return values
EFI_SUCCESSThe EAP configuration data is set successfully.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: Data is NULL. DataSize is 0.
EFI_UNSUPPORTEDThe EapType or DataType is unsupported.
EFI_OUT_OF_RESOURCESRequired system resources could not be allocated.

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 PKCS7 signature. The signed data content may be embedded within the buffer or separated. Funtion verifies the signature of the content is valid and signing certificate was not revoked and is contained within a list of trusted signers.

Parameters
[in]ThisPointer to EFI_PKCS7_VERIFY_PROTOCOL instance.
[in]SignedDataPoints to buffer containing ASN.1 DER-encoded PKCS7 signature.
[in]SignedDataSizeThe size of SignedData buffer in bytes.
[in]InDataIn case of detached signature, InData points to buffer containing the raw message data previously signed and to be verified by function. In case of SignedData containing embedded data, InData must be NULL.
[in]InDataSizeWhen InData is used, the size of InData buffer in bytes. When InData is NULL. This parameter must be 0.
[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. Except as noted in description of TimeStampDb signature verification will always fail if the signer of the file or the hash of the data component of the buffer is in RevokedDb list. This list is optional and caller may pass Null or pointer to NULL if not required.
[in]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 signers. This list is optional and caller must pass Null or pointer to NULL if not required.
[out]ContentOn input, points to an optional caller-allocated buffer into which the function will copy the content portion of the file after verification succeeds. This parameter is optional and if NULL, no copy of content from file is performed.
[in,out]ContentSizeOn input, points to the size in bytes of the optional buffer Content previously allocated by caller. On output, if the verification succeeds, the value referenced by ContentSize will contain the actual size of the content from signed file. If ContentSize indicates the caller-allocated buffer is too small to contain content, an error is returned, and ContentSize will be updated with the required size. This parameter must be 0 if Content is Null.
Return values
EFI_SUCCESSContent signature was verified against hash of content, the signer's certificate was not found in RevokedDb, and was found in AllowedDb or if in signer is found in both AllowedDb and RevokedDb, the signing was allowed by reference to TimeStampDb as described above, and no hash matching content hash was found in RevokedDb.
EFI_SECURITY_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_DATACalculated hash differs from signed hash.
EFI_INVALID_PARAMETERSignedData is NULL or SignedDataSize is zero. AllowedDb is NULL.
EFI_INVALID_PARAMETERContent is not NULL and ContentSize is NULL.
EFI_ABORTEDUnsupported or invalid format in TimeStampDb, RevokedDb or AllowedDb list contents was detected.
EFI_NOT_FOUNDContent not found because InData is NULL and no content embedded in SignedData.
EFI_UNSUPPORTEDThe SignedData buffer was not correctly formatted for processing by the function.
EFI_UNSUPPORTEDSigned data embedded in SignedData but InData is not NULL.
EFI_BUFFER_TOO_SMALLThe size of buffer indicated by ContentSize is too small to hold the content. ContentSize updated to required size.

Processes a buffer containing binary DER-encoded detached PKCS7 signature. The hash of the signed data content is calculated and passed by the caller. Function verifies the signature of the content is valid and signing certificate was not revoked and is contained within a list of trusted signers.

Note: because this function uses hashes and the specification contains a variety of hash choices, you should be aware that the check against the RevokedDb list will improperly succeed if the signature is revoked using a different hash algorithm. For this reason, you should either cycle through all UEFI supported hashes to see if one is forbidden, or rely on a single hash choice only if the UEFI signature authority only signs and revokes with a single hash (at time of writing, this hash choice is SHA256).

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 Request() function queues an HTTP request to this HTTP instance, similar to Transmit() function in the EFI TCP driver. When the HTTP request is sent successfully, or if there is an error, Status in token will be updated and Event will be signaled.

Parameters
[in]ThisPointer to EFI_HTTP_PROTOCOL instance.
[in]TokenPointer to storage containing HTTP request token.
Return values
EFI_SUCCESSOutgoing data was processed.
EFI_NOT_STARTEDThis EFI HTTP Protocol instance has not been started.
EFI_DEVICE_ERRORAn unexpected system or network error occurred.
EFI_TIMEOUTData was dropped out of the transmit or receive queue.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: This is NULL. Token is NULL. Token->Message is NULL. Token->Message->Body is not NULL, Token->Message->BodyLength is non-zero, and Token->Message->Data is NULL, but a previous call to Request()has not been completed successfully.
EFI_OUT_OF_RESOURCESCould not allocate enough system resources.
EFI_UNSUPPORTEDThe HTTP method is not supported in current implementation.

The Response() function queues an HTTP response to this HTTP instance, similar to Receive() function in the EFI TCP driver. When the HTTP Response is received successfully, or if there is an error, Status in token will be updated and Event will be signaled.

The HTTP driver will queue a receive token to the underlying TCP instance. When data is received in the underlying TCP instance, the data will be parsed and Token will be populated with the response data. If the data received from the remote host contains an incomplete or invalid HTTP header, the HTTP driver will continue waiting (asynchronously) for more data to be sent from the remote host before signaling Event in Token.

It is the responsibility of the caller to allocate a buffer for Body and specify the size in BodyLength. If the remote host provides a response that contains a content body, up to BodyLength bytes will be copied from the receive buffer into Body and BodyLength will be updated with the amount of bytes received and copied to Body. This allows the client to download a large file in chunks instead of into one contiguous block of memory. Similar to HTTP request, if Body is not NULL and BodyLength is non-zero and all other fields are NULL or 0, the HTTP driver will queue a receive token to underlying TCP instance. If data arrives in the receive buffer, up to BodyLength bytes of data will be copied to Body. The HTTP driver will then update BodyLength with the amount of bytes received and copied to Body.

If the HTTP driver does not have an open underlying TCP connection with the host specified in the response URL, Request() will return EFI_ACCESS_DENIED. This is consistent with RFC 2616 recommendation that HTTP clients should attempt to maintain an open TCP connection between client and host.

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 device descriptor of a UFS device.

The service is used to read/write UFS device descriptors. The consumer of this API is responsible for allocating the data buffer pointed by Descriptor.

Parameters
[in]ThisThe pointer to the EFI_UFS_DEVICE_CONFIG_PROTOCOL instance.
[in]ReadThe boolean variable to show r/w direction.
[in]DescIdThe ID of device descriptor.
[in]IndexThe Index of device descriptor.
[in]SelectorThe Selector of device descriptor.
[in,out]DescriptorThe buffer of device descriptor to be read or written.
[in,out]DescSizeThe size of device descriptor buffer. On input, the size, in bytes, of the data buffer specified by Descriptor. On output, the number of bytes that were actually transferred.
Return values
EFI_SUCCESSThe device descriptor is read/written successfully.
EFI_INVALID_PARAMETERThis is NULL or Descriptor is NULL or DescSize is NULL. DescId, Index and Selector are invalid combination to point to a type of UFS device descriptor.
EFI_DEVICE_ERRORThe device descriptor is not read/written successfully.

Read or write specified flag of a UFS device.

The service is used to read/write UFS flag descriptors. The consumer of this API is responsible for allocating the buffer pointed by Flag. The buffer size is 1 byte as UFS flag descriptor is just a single Boolean value that represents a TRUE or FALSE, '0' or '1', ON or OFF type of value.

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.

Register a notification function to be called when ResetSystem() is called.

The RegisterResetNotify() function registers a notification function that is called when ResetSystem()is called and prior to completing the reset of the platform. The registered functions must not perform a platform reset themselves. These notifications are intended only for the notification of components which may need some special-purpose maintenance prior to the platform resetting. The list of registered reset notification functions are processed if ResetSystem()is called before ExitBootServices(). The list of registered reset notification functions is ignored if ResetSystem()is called after ExitBootServices().

Parameters
[in]ThisA pointer to the EFI_RESET_NOTIFICATION_PROTOCOL instance.
[in]ResetFunctionPoints to the function to be called when a ResetSystem() is executed.
Return values
EFI_SUCCESSThe reset notification function was successfully registered.
EFI_INVALID_PARAMETERResetFunction is NULL.
EFI_OUT_OF_RESOURCESThere are not enough resources available to register the reset notification function.
EFI_ALREADY_STARTEDThe reset notification function specified by ResetFunction has already been registered.

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().

Enumerate the I2C devices

This function enables the caller to traverse the set of I2C devices on an I2C bus.

Parameters
[in]ThisThe platform data for the next device on the I2C bus was returned successfully.
[in,out]DevicePointer to a buffer containing an EFI_I2C_DEVICE structure. Enumeration is started by setting the initial EFI_I2C_DEVICE structure pointer to NULL. The buffer receives an EFI_I2C_DEVICE structure pointer to the next I2C device.
Return values
EFI_SUCCESSThe platform data for the next device on the I2C bus was returned successfully.
EFI_INVALID_PARAMETERDevice is NULL
EFI_NO_MAPPING*Device does not point to a valid EFI_I2C_DEVICE structure returned in a previous call Enumerate().

Get the requested I2C bus frequency for a specified bus configuration.

This function returns the requested I2C bus clock frequency for the I2cBusConfiguration. This routine is provided for diagnostic purposes and is meant to be called after calling Enumerate to get the I2cBusConfiguration value.

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

Request a survey of potential wireless networks that administrator can later elect to try to join.

Parameters
[in]ThisPointer to the EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL instance.
[in]TokenPointer to the token for getting wireless network.
Return values
EFI_SUCCESSThe operation started, and an event will eventually be raised for the caller.
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 is not supported by this implementation.
EFI_ALREADY_STARTEDThe operation of getting wireless network is already started.
EFI_OUT_OF_RESOURCESRequired system resources could not be allocated.

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 the 3 byte manufacture and device ID from the SPI flash.

This routine must be called at or below TPL_NOTIFY. This routine reads the 3 byte manufacture and device ID from the flash part filling the buffer provided.

Parameters
[in]ThisPointer to an EFI_SPI_NOR_FLASH_PROTOCOL data structure.
[out]BufferPointer to a 3 byte buffer to receive the manufacture and device ID.
Return values
EFI_SUCCESSThe manufacture and device ID was read successfully.
EFI_INVALID_PARAMETERBuffer is NULL
EFI_DEVICE_ERRORInvalid data received from SPI flash part.

Read data from the SPI flash.

This routine must be called at or below TPL_NOTIFY. This routine reads data from the SPI part in the buffer provided.

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 name to host address translation.

The HostNameToIp () function is used to translate the host name to host IP address. A type AAAA query is used to get the one or more IPv6 addresses for this host.

Parameters
[in]ThisPointer to EFI_DNS6_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 or buffer contained unsupported characters.
EFI_NO_MAPPINGThere's no source address is available for use.
EFI_ALREADY_STARTEDThis Token is being used in another DNS session.
EFI_NOT_STARTEDThis instance has not been started.
EFI_OUT_OF_RESOURCESFailed to allocate needed resources.

Host address to host name translation.

The IpToHostName () function is used to translate the host address to host name. A type PTR query is used to get the primary name of the host. Implementation can choose to support this function or not.

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().

The callback function to send request.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL instance.
[in]DataData received. The first byte is the attribute opcode, followed by opcode specific fields. See Bluetooth specification, Vol 3, Part F, Attribute Protocol. It might be a normal RESPONSE message, or ERROR RESPONSE messag
[in]DataLengthThe length of Data in bytes.
[in]ContextThe context passed from the callback registration request.
Return values
EFI_SUCCESSThe callback function complete successfully.

Send a "REQUEST" or "COMMAND" message to remote server and receive a "RESPONSE" message for "REQUEST" from remote server according to Bluetooth attribute protocol data unit(PDU).

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.

Callback function, it is called if a BluetoothLE device is found during scan process.

Parameters
[in]ThisPointer to the EFI_BLUETOOTH_LE_CONFIG_PROTOCOL instance.
[in]ContextContext passed from scan request.
[in]CallbackInfoData related to scan result. NULL CallbackInfo means scan complete.
Return values
EFI_SUCCESSThe callback function complete successfully.

Get BluetoothLE configuration data.

The GetData() function returns BluetoothLE configuration data. For remote BluetoothLE device configuration data, please use GetRemoteData() function with valid BD_ADDR.

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

Retrieve mode data of this DNS instance.

This function is used to retrieve DNS mode data for this DNS instance.

Parameters
[in]ThisPointer to EFI_DNS4_PROTOCOL instance.
[out]DnsModeDataPoint to the mode data.
Return values
EFI_SUCCESSThe operation completed successfully.
EFI_NOT_STARTEDWhen DnsConfigData is queried, no configuration data is available because this instance has not been configured.
EFI_INVALID_PARAMETERThis is NULL or DnsModeData is NULL.
EFI_OUT_OF_RESOURCESFailed to allocate needed resources.

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 GetCapability function call provides protocol capability information and state information about the TrEE.

Parameters
[in]ThisIndicates the calling context
[out]ProtocolCapabilityThe caller allocates memory for a TREE_BOOT_SERVICE_CAPABILITY structure and sets the size field to the size of the structure allocated. The callee fills in the fields with the EFI protocol capability information and the current TrEE state information up to the number of fields which fit within the size of the structure passed in.
Return values
EFI_SUCCESSOperation completed successfully.
EFI_DEVICE_ERRORThe command was unsuccessful. The ProtocolCapability variable will not be populated.
EFI_INVALID_PARAMETEROne or more of the parameters are incorrect. The ProtocolCapability variable will not be populated.
EFI_BUFFER_TOO_SMALLThe ProtocolCapability variable is too small to hold the full response. It will be partially populated (required Size field will be set).

The EFI_TREE_PROTOCOL Get Event Log function call allows a caller to retrieve the address of a given event log and its last entry.

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.

Reads data from a file.

Parameters
ThisA pointer to the EFI_FILE_PROTOCOL instance that is the file handle to read data from.
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_DEVICE_ERRORAn attempt was made to read from a deleted file.
EFI_DEVICE_ERROROn entry, the current file position is beyond the end of the file.
EFI_VOLUME_CORRUPTEDThe file system structures are corrupted.
EFI_OUT_OF_RESOURCESUnable to queue the request due to lack of resources.

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.

Set the configuration for the EFI IPv4 network stack running on the communication device this EFI IPv4 Configuration II Protocol instance manages.

This function is used to set the configuration data of type DataType for the EFI IPv4 network stack running on the communication device this EFI IPv4 Configuration II Protocol instance manages. The successfully configured data is valid after system reset or power-off. The DataSize is used to calculate the count of structure instances in the Data for some DataType that multiple structure instances are allowed. This function is always non-blocking. When setting some typeof configuration data, an asynchronous process is invoked to check the correctness of the data, such as doing address conflict detection on the manually set local IPv4 address. EFI_NOT_READY is returned immediately to indicate that such an asynchronous process is invoked and the process is not finished yet. The caller willing to get the result of the asynchronous process is required to call RegisterDataNotify() to register an event on the specified configuration data. Once the event is signaled, the caller can call GetData()to get back the configuration data in order to know the result. For other types of configuration data that do not require an asynchronous configuration process, the result of the operation is immediately returned.

Parameters
[in]ThisPointer to the EFI_IP4_CONFIG2_PROTOCOL instance.
[in]DataTypeThe type of data to set.
[in]DataSizeSize of the buffer pointed to by Data in bytes.
[in]DataThe data buffer to set. The type ofthe data buffer is associated with the DataType.
Return values
EFI_SUCCESSThe specified configuration data for the EFI IPv4 network stack is set successfully.
EFI_INVALID_PARAMETEROne or more of the following are TRUE: This is NULL. One or more fields in Data and DataSize do not match the requirement of the data type indicated by DataType.
EFI_WRITE_PROTECTEDThe specified configuration data is read-only or the specified configuration data can not be set under the current policy.
EFI_ACCESS_DENIEDAnother set operation on the specified configuration data is already in process.
EFI_NOT_READYAn asynchronous process is invoked to set the specified configuration data and the process is not finished yet.
EFI_BAD_BUFFER_SIZEThe DataSize does not match the size of the type indicated by DataType.
EFI_UNSUPPORTEDThis DataType is not supported.
EFI_OUT_OF_RESOURCESRequired system resources could not be allocated.
EFI_DEVICE_ERRORAn unexpected system error or network error occurred.

Get the configuration data for the EFI IPv4 network stack running on the communication device this EFI IPv4 Configuration II Protocol instance manages.

This function returns the configuration data of type DataType for the EFI IPv4 network stack running on the communication device this EFI IPv4 Configuration II Protocol instance manages. The caller is responsible for allocating the buffer usedto return the specified configuration data and the required size will be returned to the caller if the size of the buffer is too small. EFI_NOT_READY is returned if the specified configuration data is not ready due to an already in progress asynchronous configuration process. The caller can call RegisterDataNotify() to register an event on the specified configuration data. Once the asynchronous configuration process is finished, the event will be signaled and a subsequent GetData() call will return the specified configuration data.

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.

The DXE Foundation uses this service to measure and/or verify a UEFI image.

This service abstracts the invocation of Trusted Computing Group (TCG) measured boot, UEFI Secure boot, and UEFI User Identity infrastructure. For the former two, the DXE Foundation invokes the FileAuthentication() with a DevicePath and corresponding image in FileBuffer memory. The TCG measurement code will record the FileBuffer contents into the appropriate PCR. The image verification logic will confirm the integrity and provenance of the image in FileBuffer of length FileSize . The origin of the image will be DevicePath in these cases. If the FileBuffer is NULL, the interface will determine if the DevicePath can be connected in order to support the User Identification policy.

Parameters
ThisThe EFI_SECURITY2_ARCH_PROTOCOL instance.
FileA pointer to the device path of the file that is being dispatched. This will optionally be used for logging.
FileBufferA pointer to the buffer with the UEFI file image.
FileSizeThe size of the file.
BootPolicyA boot policy that was used to call LoadImage() UEFI service. If FileAuthentication() is invoked not from the LoadImage(), BootPolicy must be set to FALSE.
Return values
EFI_SUCCESSThe file specified by DevicePath and non-NULL FileBuffer did authenticate, and the platform policy dictates that the DXE Foundation may use the file.
EFI_SUCCESSThe device path specified by NULL device path DevicePath and non-NULL FileBuffer did authenticate, and the platform policy dictates that the DXE Foundation may execute the image in FileBuffer.
EFI_SUCCESSFileBuffer is NULL and current user has permission to start UEFI device drivers on the device path specified by DevicePath.
EFI_SECURITY_VIOLATIONThe file specified by DevicePath and FileBuffer did not authenticate, and the platform policy dictates that the file should be placed in the untrusted state. The image has been added to the file execution table.
EFI_ACCESS_DENIEDThe file specified by File and FileBuffer did not authenticate, and the platform policy dictates that the DXE Foundation may not use File.
EFI_SECURITY_VIOLATIONFileBuffer is NULL and the user has no permission to start UEFI device drivers on the device path specified by DevicePath.
EFI_SECURITY_VIOLATIONFileBuffer is not NULL and the user has no permission to load drivers from the device path specified by DevicePath. The image has been added into the list of the deferred images.

This function accepts a <MultiKeywordResp> formatted string, finds the associated keyword owners, creates a <MultiConfigResp> string from it and forwards it to the EFI_HII_ROUTING_PROTOCOL.RouteConfig function.

If there is an issue in resolving the contents of the KeywordString, then the function returns an error and also sets the Progress and ProgressErr with the appropriate information about where the issue occurred and additional data about the nature of the issue.

In the case when KeywordString containing multiple keywords, when an EFI_NOT_FOUND error is generated during processing the second or later keyword element, the system storage associated with earlier keywords is not modified. All elements of the KeywordString must successfully pass all tests for format and access prior to making any modifications to storage.

In the case when EFI_DEVICE_ERROR is returned from the processing of a KeywordString containing multiple keywords, the state of storage associated with earlier keywords is undefined.

Parameters
ThisPointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance.
KeywordStringA null-terminated string in <MultiKeywordResp> format.
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. The various errors are defined in "Related Definitions" below.
Return values
EFI_SUCCESSThe specified action was completed successfully.
EFI_INVALID_PARAMETEROne or more of the following are TRUE:
  1. KeywordString 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_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.

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.

Returns information about the random number generation implementation.

Parameters
[in]ThisA pointer to the EFI_RNG_PROTOCOL instance.
[in,out]RNGAlgorithmListSizeOn input, the size in bytes of RNGAlgorithmList. On output with a return code of EFI_SUCCESS, the size in bytes of the data returned in RNGAlgorithmList. On output with a return code of EFI_BUFFER_TOO_SMALL, the size of RNGAlgorithmList required to obtain the list.
[out]RNGAlgorithmListA caller-allocated memory buffer filled by the driver with one EFI_RNG_ALGORITHM element for each supported RNG algorithm. The list must not change across multiple calls to the same driver. The first algorithm in the list is the default algorithm for the driver.
Return values
EFI_SUCCESSThe RNG algorithm list was returned successfully.
EFI_UNSUPPORTEDThe services is not supported by this driver.
EFI_DEVICE_ERRORThe list of algorithms could not be retrieved due to a hardware or firmware error.
EFI_INVALID_PARAMETEROne or more of the parameters are incorrect.
EFI_BUFFER_TOO_SMALLThe buffer RNGAlgorithmList is too small to hold the result.

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 requests connection to the smart card or the reader, using the appropriate reset type and protocol.

The SCardConnectfunction requests access to the smart card or the reader. Upon success, it is then possible to call SCardTransmit.

If AccessMode is set to SCARD_AM_READER, PreferredProtocols must be set to SCARD_PROTOCOL_UNDEFINED and CardAction to SCARD_CA_NORESET else function fails with EFI_INVALID_PARAMETER.

Parameters
[in]ThisIndicates a pointer to the calling context.
[in]AccessModeCodes of access mode.
[in]CardActionSCARD_CA_NORESET, SCARD_CA_COLDRESET or SCARD_CA_WARMRESET.
[in]PreferredProtocolsBitmask of acceptable protocols.
[out]ActiveProtocolA flag that indicates the active protocol.
Return values
EFI_SUCCESSThe requested command completed successfully.
EFI_INVALID_PARAMETERThis is NULL
EFI_INVALID_PARAMETERAccessMode is not valid.
EFI_INVALID_PARAMETERCardAction is not valid.
EFI_INVALID_PARAMETERInvalid combination of AccessMode/CardAction/ PreferredProtocols.
EFI_NOT_READYA smart card is inserted but failed to return an ATR.
EFI_UNSUPPORTEDPreferredProtocols does not contain an available protocol to use.
EFI_NO_MEDIAAccessMode is set to SCARD_AM_CARD but there is no smart card inserted.
EFI_ACCESS_DENIEDAccess is already locked by a previous SCardConnectcall.
EFI_DEVICE_ERRORAny other error condition, typically a reader removal.

This function releases a connection previously taken by SCardConnect.

The SCardDisconnect function releases the lock previously taken by SCardConnect. In case the smart card has been removed before this call, thisfunction returns EFI_SUCCESS. If there is no previous call to SCardConnect, this function returns EFI_SUCCESS.

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.

Initiate a SPI transaction between the host and a SPI peripheral.

This routine must be called at or below TPL_NOTIFY. This routine works with the SPI bus layer to pass the SPI transaction to the SPI controller for execution on the SPI bus. There are four types of supported transactions supported by this routine: Full Duplex: WriteBuffer and ReadBuffer are the same size. Write Only: WriteBuffer contains data for SPI peripheral, ReadBytes = 0 Read Only: ReadBuffer to receive data from SPI peripheral, WriteBytes = 0 Write Then Read: WriteBuffer contains control data to write to SPI peripheral before data is placed into the ReadBuffer. Both WriteBytes and ReadBytes must be non-zero.

Parameters
[in]ThisPointer to an EFI_SPI_IO_PROTOCOL structure.
[in]TransactionTypeType of SPI transaction.
[in]DebugTransactionSet TRUE only when debugging is desired. Debugging may be turned on for a single SPI transaction. Only this transaction will display debugging messages. All other transactions with this value set to FALSE will not display any debugging messages.
[in]ClockHzSpecify the ClockHz value as zero (0) to use the maximum clock frequency supported by the SPI controller and part. Specify a non-zero value only when a specific SPI transaction requires a reduced clock rate.
[in]BusWidthWidth of the SPI bus in bits: 1, 2, 4
[in]FrameSizeFrame size in bits, range: 1 - 32
[in]WriteBytesThe length of the WriteBuffer in bytes. Specify zero for read-only operations.
[in]WriteBufferThe buffer containing data to be sent from the host to the SPI chip. Specify NULL for read only operations. Frame sizes 1-8 bits: UINT8 (one byte) per frame Frame sizes 7-16 bits: UINT16 (two bytes) per frame Frame sizes 17-32 bits: UINT32 (four bytes) per frame The transmit frame is in the least significant N bits.
[in]ReadBytesThe length of the ReadBuffer in bytes. Specify zero for write-only operations.
[out]ReadBufferThe buffer to receeive data from the SPI chip during the transaction. Specify NULL for write only operations. Frame sizes 1-8 bits: UINT8 (one byte) per frame Frame sizes 7-16 bits: UINT16 (two bytes) per frame Frame sizes 17-32 bits: UINT32 (four bytes) per frame The received frame is in the least significant N bits.
Return values
EFI_SUCCESSThe SPI transaction completed successfully
EFI_BAD_BUFFER_SIZEThe writeBytes value was invalid
EFI_BAD_BUFFER_SIZEThe ReadBytes value was invalid
EFI_INVALID_PARAMETERTransactionType is not valid, or BusWidth not supported by SPI peripheral or SPI host controller, or WriteBytes non-zero and WriteBuffer is NULL, or ReadBytes non-zero and ReadBuffer is NULL, or ReadBuffer != WriteBuffer for full-duplex type, or WriteBuffer was NULL, or TPL is too high
EFI_OUT_OF_RESOURCESInsufficient memory for SPI transaction
EFI_UNSUPPORTEDThe FrameSize is not supported by the SPI bus layer or the SPI host controller
EFI_UNSUPPORTEDThe SPI controller was not able to support

Update the SPI peripheral associated with this SPI 10 instance.

Support socketed SPI parts by allowing the SPI peripheral driver to replace the SPI peripheral after the connection is made. An example use is socketed SPI NOR flash parts, where the size and parameters change depending upon device is in the socket.

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

Reset the block device hardware.

Parameters
[in]ThisIndicates a pointer to the calling context.
[in]ExtendedVerificationIndicates that the driver may perform a more exhausive verification operation of the device during reset.
Return values
EFI_SUCCESSThe device was reset.
EFI_DEVICE_ERRORThe device is not functioning properly and could not be reset.

Read BufferSize bytes from Lba into Buffer.

This function reads the requested number of blocks from the device. All the blocks are read, or an error is returned. If EFI_DEVICE_ERROR, EFI_NO_MEDIA,_or EFI_MEDIA_CHANGED is returned and non-blocking I/O is being used, the Event associated with this request will not be signaled.

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.

The async callback of AsyncReceiveEvent().

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 does execute successfully.
OthersThe callback doesn't execute successfully.

Receive HCI event packet in non-blocking way.

The AsyncReceiveEvent() function receives HCI event packet in non-blocking way. Data in Callback function holds the whole HCI event packet, including EventCode, parameter length, and parameters.

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.

Get the current status of the key management service.

Parameters
[in]ThisPointer to the EFI_KMS_PROTOCOL instance.
Return values
EFI_SUCCESSThe KMS is ready for use.
EFI_NOT_READYNo connection to the KMS is available.
EFI_NO_MAPPINGNo valid connection configuration exists for the KMS.
EFI_NO_RESPONSENo response was received from the KMS.
EFI_DEVICE_ERRORAn error occurred when attempting to access the KMS.
EFI_INVALID_PARAMETERThis is NULL.

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.

Execute the command line.

This function creates a nested instance of the shell and executes the specified command (CommandLine) with the specified environment (Environment). Upon return, the status code returned by the specified command is placed in StatusCode.

If Environment is NULL, then the current environment is used and all changes made by the commands executed will be reflected in the current environment. If the Environment is non-NULL, then the changes made will be discarded.

The CommandLine is executed from the current working directory on the current device.

Parameters
[in]ParentImageHandleA handle of the image that is executing the specified command line.
[in]CommandLinePoints to the NULL-terminated UCS-2 encoded string containing the command line. If NULL then the command- line will be empty.
[in]EnvironmentPoints to a NULL-terminated array of environment variables with the format 'x=y', where x is the environment variable name and y is the value. If this is NULL, then the current shell environment is used.
[out]ErrorCodePoints to the status code returned by the command.
Return values
EFI_SUCCESSThe command executed successfully. The status code returned by the command is pointed to by StatusCode.
EFI_INVALID_PARAMETERThe parameters are invalid.
EFI_OUT_OF_RESOURCESOut of resources.
EFI_UNSUPPORTEDNested shell invocations are not allowed.

Frees the file list.

This function cleans up the file list and any related data structures. It has no impact on the files themselves.

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.

Manipulate the chip select for a SPI device.

This routine must be called at or below TPL_NOTIFY. Update the value of the chip select line for a SPI peripheral. The SPI bus layer calls this routine either in the board layer or in the SPI controller to manipulate the chip select pin at the start and end of a SPI transaction.

Parameters
[in]SpiPeripheralThe address of an EFI_SPI_PERIPHERAL data structure describing the SPI peripheral whose chip select pin is to be manipulated. The routine may access the ChipSelectParameter field to gain sufficient context to complete the operation.
[in]PinValueThe value to be applied to the chip select line of the SPI peripheral.
Return values
EFI_SUCCESSThe chip select was set successfully
EFI_NOT_READYSupport for the chip select is not properly initialized
EFI_INVALID_PARAMETERThe SpiPeripheral->ChipSelectParameter value is invalid

Set up the clock generator to produce the correct clock frequency, phase and polarity for a SPI chip.

This routine must be called at or below TPL_NOTIFY. This routine updates the clock generator to generate the correct frequency and polarity for the SPI clock.

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

Returns information about the regular expression syntax types supported by the implementation.

This A pointer to the EFI_REGULAR_EXPRESSION_PROTOCOL instance.

RegExSyntaxTypeListSize On input, the size in bytes of RegExSyntaxTypeList. On output with a return code of EFI_SUCCESS, the size in bytes of the data returned in RegExSyntaxTypeList. On output with a return code of EFI_BUFFER_TOO_SMALL, the size of RegExSyntaxTypeListrequired to obtain the list.

RegExSyntaxTypeList A caller-allocated memory buffer filled by the driver with one EFI_REGEX_SYNTAX_TYPEelement for each supported Regular expression syntax type. The list must not change across multiple calls to the same driver. The first syntax type in the list is the default type for the driver.

Return values
EFI_SUCCESSThe regular expression syntax types list was returned successfully.
EFI_UNSUPPORTEDThe service is not supported by this driver.
EFI_DEVICE_ERRORThe list of syntax types could not be retrieved due to a hardware or firmware error.
EFI_BUFFER_TOO_SMALLThe buffer RegExSyntaxTypeList is too small to hold the result.
EFI_INVALID_PARAMETERRegExSyntaxTypeListSize is NULL

Checks if the input string matches to the regular expression pattern.

This A pointer to the EFI_REGULAR_EXPRESSION_PROTOCOL instance. Type EFI_REGULAR_EXPRESSION_PROTOCOL is defined in Section XYZ.

String A pointer to a NULL terminated string to match against the regular expression string specified by Pattern.

Pattern A pointer to a NULL terminated string that represents the regular expression.

SyntaxType A pointer to the EFI_REGEX_SYNTAX_TYPE that identifies the regular expression syntax type to use. May be NULL in which case the function will use its default regular expression syntax type.

Result On return, points to TRUE if String fully matches against the regular expression Pattern using the regular expression SyntaxType. Otherwise, points to FALSE.

Captures A Pointer to an array of EFI_REGEX_CAPTURE objects to receive the captured groups in the event of a match. The full sub-string match is put in Captures[0], and the results of N capturing groups are put in Captures[1:N]. If Captures is NULL, then this function doesn't allocate the memory for the array and does not build up the elements. It only returns the number of matching patterns in CapturesCount. If Captures is not NULL, this function returns a pointer to an array and builds up the elements in the array. CapturesCount is also updated to the number of matching patterns found. It is the caller's responsibility to free the memory pool in Captures and in each CapturePtr in the array elements.

CapturesCount On output, CapturesCount is the number of matching patterns found in String. Zero means no matching patterns were found in the string.

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]ChannelIDBluetooth L2CAP message channel ID.
[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.

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.

Create HTTP header based on a combination of seed header, fields to delete, and fields to append.

The Build() function is used to manage the headers portion of an HTTP message by providing the ability to add, remove, or replace HTTP headers.

Parameters
[in]ThisPointer to EFI_HTTP_UTILITIES_PROTOCOL instance.
[in]SeedMessageSizeSize of the initial HTTP header. This can be zero.
[in]SeedMessageInitial HTTP header to be used as a base for building a new HTTP header. If NULL, SeedMessageSize is ignored.
[in]DeleteCountNumber of null-terminated HTTP header field names in DeleteList.
[in]DeleteListList of null-terminated HTTP header field names to remove from SeedMessage. Only the field names are in this list because the field values are irrelevant to this operation.
[in]AppendCountNumber of header fields in AppendList.
[in]AppendListList of HTTP headers to populate NewMessage with. If SeedMessage is not NULL, AppendList will be appended to the existing list from SeedMessage in NewMessage.
[out]NewMessageSizePointer to number of header fields in NewMessage.
[out]NewMessagePointer to a new list of HTTP headers based on.
Return values
EFI_SUCCESSAdd, remove, and replace operations succeeded.
EFI_OUT_OF_RESOURCESCould not allocate memory for NewMessage.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: This is NULL.

Parses HTTP header and produces an array of key/value pairs.

The Parse() function is used to transform data stored in HttpHeader into a list of fields paired with their corresponding values.

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.

Callback function, it is called if a Bluetooth device is found during scan process.

Parameters
ThisPointer to the EFI_BLUETOOTH_CONFIG_PROTOCOL instance.
ContextContext passed from scan request.
CallbackInfoData related to scan result. NULL CallbackInfo means scan complete.
Return values
EFI_SUCCESSThe callback function complete successfully.

Set the frequency for the I2C clock line.

This routine must be called at or below TPL_NOTIFY.

The software and controller do a best case effort of using the specified frequency for the I2C bus. If the frequency does not match exactly then the I2C master protocol selects the next lower frequency to avoid exceeding the operating conditions for any of the I2C devices on the bus. For example if 400 KHz was specified and the controller's divide network only supports 402 KHz or 398 KHz then the I2C master protocol selects 398 KHz. If there are not lower frequencies available, then return EFI_UNSUPPORTED.

Parameters
[in]ThisPointer to an EFI_I2C_MASTER_PROTOCOL structure
[in]BusClockHertzPointer to the requested I2C bus clock frequency in Hertz. Upon return this value contains the actual frequency in use by the I2C controller.
Return values
EFI_SUCCESSThe bus frequency was set successfully.
EFI_ALREADY_STARTEDThe controller is busy with another transaction.
EFI_INVALID_PARAMETERBusClockHertz is NULL
EFI_UNSUPPORTEDThe controller does not support this frequency.

Reset the I2C controller and configure it for use

This routine must be called at or below TPL_NOTIFY.

The I2C controller is reset. The caller must call SetBusFrequench() after calling Reset().

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.

Sends SD command to an SD card that is attached to the SD controller.

The PassThru() function sends the SD command specified by Packet to the SD card specified by Slot.

If Packet is successfully sent to the SD card, then EFI_SUCCESS is returned.

If a device error occurs while sending the Packet, then EFI_DEVICE_ERROR is returned.

If Slot is not in a valid range for the SD controller, then EFI_INVALID_PARAMETER is returned.

If Packet defines a data command but both InDataBuffer and OutDataBuffer are NULL, EFI_INVALID_PARAMETER is returned.

Parameters
[in]ThisA pointer to the EFI_SD_MMC_PASS_THRU_PROTOCOL instance.
[in]SlotThe slot number of the SD card to send the command to.
[in,out]PacketA pointer to the SD command data structure.
[in]EventIf Event is NULL, blocking I/O is performed. If Event is not NULL, then nonblocking I/O is performed, and Event will be signaled when the Packet completes.
Return values
EFI_SUCCESSThe SD Command Packet was sent by the host.
EFI_DEVICE_ERRORA device error occurred while attempting to send the SD command Packet.
EFI_INVALID_PARAMETERPacket, Slot, or the contents of the Packet is invalid.
EFI_INVALID_PARAMETERPacket defines a data command but both InDataBuffer and OutDataBuffer are NULL.
EFI_NO_MEDIASD Device not present in the Slot.
EFI_UNSUPPORTEDThe command described by the SD Command Packet is not supported by the host controller.
EFI_BAD_BUFFER_SIZEThe InTransferLength or OutTransferLength exceeds the limit supported by SD card ( i.e. if the number of bytes exceed the Last LBA).

Used to retrieve next slot numbers supported by the SD controller. The function returns information about all available slots (populated or not-populated).

The GetNextSlot() function retrieves the next slot number on an SD controller. If on input Slot is 0xFF, then the slot number of the first slot on the SD controller is returned.

If Slot is a slot number that was returned on a previous call to GetNextSlot(), then the slot number of the next slot on the SD controller is returned.

If Slot is not 0xFF and Slot was not returned on a previous call to GetNextSlot(), EFI_INVALID_PARAMETER is returned.

If Slot is the slot number of the last slot on the SD controller, then EFI_NOT_FOUND is returned.

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

Queue an I2C transaction for execution on the I2C controller.

This routine must be called at or below TPL_NOTIFY. For synchronous requests this routine must be called at or below TPL_CALLBACK.

The I2C host protocol uses the concept of I2C bus configurations to describe the I2C bus. An I2C bus configuration is defined as a unique setting of the multiplexers and switches in the I2C bus which enable access to one or more I2C devices. When using a switch to divide a bus, due to bus frequency differences, the I2C bus configuration management protocol defines an I2C bus configuration for the I2C devices on each side of the switch. When using a multiplexer, the I2C bus configuration management defines an I2C bus configuration for each of the selector values required to control the multiplexer. See Figure 1 in the I2C -bus specification and user manual for a complex I2C bus configuration.

The I2C host protocol processes all transactions in FIFO order. Prior to performing the transaction, the I2C host protocol calls EnableI2cBusConfiguration to reconfigure the switches and multiplexers in the I2C bus enabling access to the specified I2C device. The EnableI2cBusConfiguration also selects the I2C bus frequency for the I2C device. After the I2C bus is configured, the I2C host protocol calls the I2C master protocol to start the I2C transaction.

When Event is NULL, QueueRequest() operates synchronously and returns the I2C completion status as its return value.

When Event is not NULL, QueueRequest() synchronously returns EFI_SUCCESS indicating that the asynchronously I2C transaction was queued. The values above are returned in the buffer pointed to by I2cStatus upon the completion of the I2C transaction when I2cStatus is not NULL.

Parameters
[in]ThisPointer to an EFI_I2C_HOST_PROTOCOL structure.
[in]I2cBusConfigurationI2C bus configuration to access the I2C device
[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]EventEvent to signal for asynchronous transactions, NULL for synchronous transactions
[in]RequestPacketPointer to an EFI_I2C_REQUEST_PACKET structure describing the I2C transaction
[out]I2cStatusOptional buffer to receive the I2C transaction completion status
Return values
EFI_SUCCESSThe asynchronous transaction was successfully queued when Event is not NULL.
EFI_SUCCESSThe transaction completed successfully when Event is NULL.
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_MAPPINGInvalid I2cBusConfiguration value
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.

Set the erase block opcode.

This routine must be called at or below TPL_NOTIFY. The menu table contains SPI transaction opcodes which are accessible after the legacy SPI flash controller's configuration is locked. The board layer specifies the erase block size for the SPI NOR flash part. The SPI NOR flash peripheral driver selects the erase block opcode which matches the erase block size and uses this API to load the opcode into the opcode menu table.

Parameters
[in]ThisPointer to an EFI_LEGACY_SPI_CONTROLLER_PROTOCOL structure.
[in]EraseBlockOpcodeErase block opcode to be placed into the opcode menu table.
Return values
EFI_SUCCESSThe opcode menu table was updated
EFI_ACCESS_ERRORThe SPI controller is locked

Set the write status prefix opcode.

This routine must be called at or below TPL_NOTIFY. The prefix table contains SPI transaction write prefix opcodes which are accessible after the legacy SPI flash controller's configuration is locked. The board layer specifies the write status prefix opcode for the SPI NOR flash part. The SPI NOR flash peripheral driver uses this API to load the opcode into the prefix table.

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 GetCapability function call provides protocol capability information and state information.

Parameters
[in]ThisIndicates the calling context
[in,out]ProtocolCapabilityThe caller allocates memory for a EFI_TCG2_BOOT_SERVICE_CAPABILITY structure and sets the size field to the size of the structure allocated. The callee fills in the fields with the EFI protocol capability information and the current EFI TCG2 state information up to the number of fields which fit within the size of the structure passed in.
Return values
EFI_SUCCESSOperation completed successfully.
EFI_DEVICE_ERRORThe command was unsuccessful. The ProtocolCapability variable will not be populated.
EFI_INVALID_PARAMETEROne or more of the parameters are incorrect. The ProtocolCapability variable will not be populated.
EFI_BUFFER_TOO_SMALLThe ProtocolCapability variable is too small to hold the full response. It will be partially populated (required Size field will be set).

The EFI_TCG2_PROTOCOL Get Event Log function call allows a caller to retrieve the address of a given event log and its last entry.

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.

Displays a popup window.

Parameters
ThisA pointer to the EFI_HII_POPUP_PROTOCOL instance.
PopupStylePopup style to use.
PopupTypeType of the popup to display.
HiiHandleHII handle of the string pack containing Message
MessageA message to display in the popup box.
UserSelectionUser selection.
Return values
EFI_SUCCESSThe popup box was successfully displayed.
EFI_INVALID_PARAMETERHiiHandle and Message do not define a valid HII string.
EFI_INVALID_PARAMETERPopupType is not one of the values defined by this specification.
EFI_OUT_OF_RESOURCESThere are not enough resources available to display the popup box.

Variable Documentation

EFI_GUID gEfiPeiGraphicsPpiGuid