hdcp22_rx
Vitis Drivers API Documentation
|
Data Structures | |
struct | XHdcp22_Rx_TestDdcReg |
This typedef is the test DDC register definition. More... | |
struct | XHdcp22_Rx_Test |
This typedef is the test structure used for standalone driver testing. More... | |
struct | XHdcp22_Rx_Handles |
This typedef is used to store handles to function pointers. More... | |
struct | XHdcp22_Rx_Parameters |
This typedef is used to store temporary parameters for computations. More... | |
struct | XHdcp22_Rx_LogItem |
This typedef is used to store logging events. More... | |
struct | XHdcp22_Rx_Log |
This typedef contains the HDCP22 log list. More... | |
struct | XHdcp22_Rx_Info |
This typedef provides information about status of HDCP-RX authentication. More... | |
struct | XHdcp22_Rx_Topology |
This typedef is the repeater topology table used to communicate topology information to the receiver upstream interface. More... | |
struct | XHdcp22_Rx_Config |
This typedef contains configuration information for the device. More... | |
struct | XHdcp22_Rx |
The XHdcp driver instance data. More... | |
struct | XHdcp22_Rx_KprivRx |
This typedef is the RSA private key quintuple definition. More... | |
struct | XHdcp22_Rx_KpubRx |
This typedef is the RSA public key definition. More... | |
struct | XHdcp22_Rx_CertRx |
This typedef is the DCP public certificate definition. More... | |
struct | XHdcp22_Rx_AKEInit |
This typedef is the AKE_Init message definition. More... | |
struct | XHdcp22_Rx_AKESendCert |
This typedef is the AKE_Send_Cert message definition. More... | |
struct | XHdcp22_Rx_AKENoStoredKm |
This typedef is the AKE_No_Stored_km message definition. More... | |
struct | XHdcp22_Rx_AKEStoredKm |
This typedef is the AKE_Stored_km message definition. More... | |
struct | XHdcp22_Rx_AKESendHPrime |
This typedef is the AKE_Send_H_prime message definition. More... | |
struct | XHdcp22_Rx_AKESendPairingInfo |
This typedef is the AKE_Send_Pairing_Info message definition. More... | |
struct | XHdcp22_Rx_LCInit |
This typedef is the LC_Init message definition. More... | |
struct | XHdcp22_Rx_LCSendLPrime |
This typdef is the LC_Send_L_prime message definition. More... | |
struct | XHdcp22_Rx_SKESendEks |
This typedef is the SKE_Send_Eks message definition. More... | |
struct | XHdcp22_Rx_RepeaterAuthSendRxIdList |
This typedef is the RepeaterAuth_Send_RceiverID_List message definition. More... | |
struct | XHdcp22_Rx_RepeaterAuthSendAck |
This typedef is the RepeaterAuth_Send_Ack message definition. More... | |
struct | XHdcp22_Rx_RepeaterAuthStreamManage |
This typedef is the RepeaterAuth_Stream_Manage message definition. More... | |
struct | XHdcp22_Rx_RepeaterAuthStreamReady |
This typedef is the RepeaterAuth_Stream_Ready message definition. More... | |
union | XHdcp22_Rx_Message |
This typedef is the union of all the message types. More... | |
Macros | |
#define | XHDCP22_RX_MAX_MESSAGE_SIZE 534 |
Maximum message size. More... | |
#define | XHDCP22_RX_LOG_BUFFER_SIZE 256 |
The size of the log buffer. More... | |
#define | XHDCP22_RX_ENCRYPTION_STATUS_INTERVAL 1000 |
1sec encryption status check interval More... | |
#define | XHDCP22_RX_REPEATERAUTH_ACK_INTERVAL 2000 |
2sec RepeaterAuth Ack interval More... | |
Typedefs | |
typedef void *(* | XHdcp22_Rx_StateFunc )(void *InstancePtr) |
Type for pointer to state function. More... | |
typedef void(* | XHdcp22_Rx_RunHandler )(void *HandlerRef) |
Type for pointer to single input function. More... | |
typedef void(* | XHdcp22_Rx_SetHandler )(void *HandlerRef, u32 Data) |
Type for pointer to two input function. More... | |
typedef u32(* | XHdcp22_Rx_GetHandler )(void *HandlerRef) |
Type for pointer to single input function with a return value. More... | |
Functions | |
int | XHdcp22Rx_CfgInitialize (XHdcp22_Rx *InstancePtr, XHdcp22_Rx_Config *ConfigPtr, UINTPTR EffectiveAddr) |
Initialize the instance provided by the caller based on the given configuration data. More... | |
int | XHdcp22Rx_Reset (XHdcp22_Rx *InstancePtr) |
This function resets the HDCP22-RX system to the default state. More... | |
int | XHdcp22Rx_Enable (XHdcp22_Rx *InstancePtr) |
This function enables the HDCP22-RX state machine. More... | |
int | XHdcp22Rx_Disable (XHdcp22_Rx *InstancePtr) |
This function disables the HDCP22-RX state machine. More... | |
int | XHdcp22Rx_SetCallback (XHdcp22_Rx *InstancePtr, XHdcp22_Rx_HandlerType HandlerType, void *CallbackFunc, void *CallbackRef) |
This function installs callback functions for the given HandlerType: More... | |
int | XHdcp22Rx_Poll (XHdcp22_Rx *InstancePtr) |
This function executes the HDCP22-RX state machine. More... | |
u8 | XHdcp22Rx_IsEnabled (XHdcp22_Rx *InstancePtr) |
This function checks if the HDCP22-RX state machine is enabled. More... | |
u8 | XHdcp22Rx_IsEncryptionEnabled (XHdcp22_Rx *InstancePtr) |
This function checks if the HDCP22-RX cipher encryption is enabled. More... | |
u8 | XHdcp22Rx_IsInProgress (XHdcp22_Rx *InstancePtr) |
This function checks if the HDCP22-RX state machine is enabled but not yet in the Authenticated state. More... | |
u8 | XHdcp22Rx_IsAuthenticated (XHdcp22_Rx *InstancePtr) |
This function checks if the HDCP22-RX state machine is in the Authenticated state. More... | |
u8 | XHdcp22Rx_IsError (XHdcp22_Rx *InstancePtr) |
This function checks if the HDCP22-RX state machine has detected an error condition. More... | |
u8 | XHdcp22Rx_IsRepeater (XHdcp22_Rx *InstancePtr) |
This function returns the current repeater mode status. More... | |
void | XHdcp22Rx_SetRepeater (XHdcp22_Rx *InstancePtr, u8 Set) |
This function sets the repeater mode status. More... | |
void | XHdcp22Rx_SetLinkError (XHdcp22_Rx *InstancePtr) |
This function is called when 50 consecutive data island ECC errors are detected indicating a link integrity problem. More... | |
void | XHdcp22Rx_SetDdcError (XHdcp22_Rx *InstancePtr) |
This function is called when a DDC read/write burst stops prior to completing the expected message size. More... | |
void | XHdcp22Rx_SetWriteMessageAvailable (XHdcp22_Rx *InstancePtr) |
This function is called when a complete message is available in the write message buffer. More... | |
void | XHdcp22Rx_SetReadMessageComplete (XHdcp22_Rx *InstancePtr) |
This function is called when a message has been read out of the read message buffer. More... | |
void | XHdcp22Rx_LoadLc128 (XHdcp22_Rx *InstancePtr, const u8 *Lc128Ptr) |
This function is used to load the Lc128 value by copying the contents of the array referenced by Lc128Ptr into the cipher. More... | |
void | XHdcp22Rx_LoadPublicCert (XHdcp22_Rx *InstancePtr, const u8 *PublicCertPtr) |
This function is used to load the public certificate. More... | |
int | XHdcp22Rx_LoadPrivateKey (XHdcp22_Rx *InstancePtr, const u8 *PrivateKeyPtr) |
This function is used to load the private key. More... | |
u32 | XHdcp22Rx_GetVersion (XHdcp22_Rx *InstancePtr) |
This function reads the version. More... | |
XTmrCtr * | XHdcp22Rx_GetTimer (XHdcp22_Rx *InstancePtr) |
This function returns the pointer to the internal timer control instance needed for connecting the timer interrupt to an interrupt controller. More... | |
void | XHdcp22Rx_SetTopology (XHdcp22_Rx *InstancePtr, const XHdcp22_Rx_Topology *TopologyPtr) |
This function copies a complete repeater topology table into the instance repeater topology table. More... | |
void | XHdcp22Rx_SetTopologyReceiverIdList (XHdcp22_Rx *InstancePtr, const u8 *ListPtr, u32 ListSize) |
This function copies the RECEIVER_ID_LIST into the repeater topology table. More... | |
void | XHdcp22Rx_SetTopologyField (XHdcp22_Rx *InstancePtr, XHdcp22_Rx_TopologyField Field, u8 Value) |
This function is used to set various fields inside the topology structure. More... | |
void | XHdcp22Rx_SetTopologyUpdate (XHdcp22_Rx *InstancePtr) |
This function is used to indicate that the topology table has been updated and is ready for upstream propagation. More... | |
u8 | XHdcp22Rx_GetContentStreamType (XHdcp22_Rx *InstancePtr) |
This function is gets the type information received from the RepeaterAuth_Stream_Manage message for downstream propagation of management information. More... | |
void | XHdcp22Rx_LogReset (XHdcp22_Rx *InstancePtr, u8 Verbose) |
This function clears the log pointers. More... | |
u32 | XHdcp22Rx_LogGetTimeUSecs (XHdcp22_Rx *InstancePtr) |
This function returns the time expired since a log reset was called. More... | |
void | XHdcp22Rx_LogWr (XHdcp22_Rx *InstancePtr, u16 Evt, u16 Data) |
This function writes HDCP22-RX log event into buffer. More... | |
XHdcp22_Rx_LogItem * | XHdcp22Rx_LogRd (XHdcp22_Rx *InstancePtr) |
This function provides the log information from the log buffer. More... | |
void | XHdcp22Rx_LogDisplay (XHdcp22_Rx *InstancePtr) |
This function prints the contents of the log buffer. More... | |
void | XHdcp22Rx_Info (XHdcp22_Rx *InstancePtr) |
This function prints the state machine information. More... | |
XHdcp22_Rx_Config * | XHdcp22Rx_LookupConfig (u16 DeviceId) |
This function returns a reference to an XHdcp22_Rx_Config structure based on the core id, DeviceId. More... | |
int | XHdcp22Rx_CalcMontNPrime (u8 *NPrime, const u8 *N, int NDigits) |
This function is used to calculate the Montgomery NPrime. More... | |
int | XHdcp22Rx_RsaesOaepEncrypt (const XHdcp22_Rx_KpubRx *KpubRx, const u8 *Message, const u32 MessageLen, const u8 *MaskingSeed, u8 *EncryptedMessage) |
This function implements the RSAES-OAEP-Encrypt operation. More... | |
int | XHdcp22Rx_RsaesOaepDecrypt (XHdcp22_Rx *InstancePtr, const XHdcp22_Rx_KprivRx *KprivRx, u8 *EncryptedMessage, u8 *Message, int *MessageLen) |
This function implements the RSAES-OAEP-Decrypt operation. More... | |
void | XHdcp22Rx_GenerateRandom (XHdcp22_Rx *InstancePtr, int NumOctets, u8 *RandomNumberPtr) |
This function generates random octets. More... | |
void | XHdcp22Rx_ComputeHPrime (const u8 *Rrx, const u8 *RxCaps, const u8 *Rtx, const u8 *TxCaps, const u8 *Km, u8 *HPrime) |
This function computes HPrime used during HDCP 2.2 authentication and key exchange. More... | |
void | XHdcp22Rx_ComputeEkh (const u8 *KprivRx, const u8 *Km, const u8 *M, u8 *Ekh) |
This function computes Ekh used during HDCP 2.2 authentication and key exchange for pairing with receiver. More... | |
void | XHdcp22Rx_ComputeLPrime (const u8 *Rn, const u8 *Km, const u8 *Rrx, const u8 *Rtx, u8 *LPrime) |
This function computes LPrime used during HDCP 2.2 locality check. More... | |
void | XHdcp22Rx_ComputeKs (const u8 *Rrx, const u8 *Rtx, const u8 *Km, const u8 *Rn, const u8 *Eks, u8 *Ks) |
This function computes the Ks used during HDCP 2.2 session key exchange. More... | |
void | XHdcp22Rx_ComputeVPrime (const u8 *ReceiverIdList, u32 ReceiverIdListSize, const u8 *RxInfo, const u8 *SeqNumV, const u8 *Km, const u8 *Rrx, const u8 *Rtx, u8 *VPrime) |
This function computes VPrime used during HDCP 2.2 repeater authentication. More... | |
void | XHdcp22Rx_ComputeMPrime (const u8 *StreamIdType, const u8 *SeqNumM, const u8 *Km, const u8 *Rrx, const u8 *Rtx, u8 *MPrime) |
This function computes VPrime used during HDCP 2.2 repeater authentication. More... | |
#define XHDCP22_RX_ENCRYPTION_STATUS_INTERVAL 1000 |
1sec encryption status check interval
#define XHDCP22_RX_LOG_BUFFER_SIZE 256 |
The size of the log buffer.
Referenced by XHdcp22Rx_LogRd(), and XHdcp22Rx_LogWr().
#define XHDCP22_RX_MAX_MESSAGE_SIZE 534 |
Maximum message size.
#define XHDCP22_RX_REPEATERAUTH_ACK_INTERVAL 2000 |
2sec RepeaterAuth Ack interval
typedef u32(* XHdcp22_Rx_GetHandler)(void *HandlerRef) |
Type for pointer to single input function with a return value.
typedef void(* XHdcp22_Rx_RunHandler)(void *HandlerRef) |
Type for pointer to single input function.
typedef void(* XHdcp22_Rx_SetHandler)(void *HandlerRef, u32 Data) |
Type for pointer to two input function.
typedef void*(* XHdcp22_Rx_StateFunc)(void *InstancePtr) |
Type for pointer to state function.
enum XHdcp22_Rx_DdcFlag |
These constants defines the DDC flags used to determine when messages are available in the write message buffer or when a message has been read out of the read message buffer.
enum XHdcp22_Rx_ErrorFlag |
These constants define the error conditions encountered during authentication and key exchange.
These constants are used to identify callback functions.
enum XHdcp22_Rx_LogData |
These constants are the detailed logging events.
enum XHdcp22_Rx_LogEvt |
These constants are the general logging events.
These constants are the message identification codes.
enum XHdcp22_Rx_Mode |
enum XHdcp22_Rx_Protocol |
enum XHdcp22_Rx_StateType |
These constants are the authentication and key exchange states.
enum XHdcp22_Rx_TestFlags |
These constants are used for setting up the desired unit test for standalong testing.
enum XHdcp22_Rx_TestMode |
These constants are used to set the cores test mode.
enum XHdcp22_Rx_TestState |
These constants are the discrete event states for standalone self testing.
These constants are used to identify fields inside the topology structure.
int XHdcp22Rx_CalcMontNPrime | ( | u8 * | NPrime, |
const u8 * | N, | ||
int | NDigits | ||
) |
This function is used to calculate the Montgomery NPrime.
NPrime is calculated from the following equation R*Rinv - N*NPrime == 1. For the HDCP2.2 receiver the modulus N has a fixed size of k = 512bits. Given k, the value R = 2^(k), and Rinv is the modular inverse of R.
Reference: Analyzing and Comparing Montgomery Multiplication Algorithms IEEE Micro, 16(3):26-33,June 1996 By: Cetin Koc, Tolga Acar, and Burton Kaliski
NPrime | is the calculated value and 2*NDigits in Size. |
N | is modulus |
NDigits | is the integer precision of arguments (N, NPrime), which should always be 16 for the HDCP2.2 receiver. |
Referenced by XHdcp22Rx_LoadPrivateKey().
int XHdcp22Rx_CfgInitialize | ( | XHdcp22_Rx * | InstancePtr, |
XHdcp22_Rx_Config * | ConfigPtr, | ||
UINTPTR | EffectiveAddr | ||
) |
Initialize the instance provided by the caller based on the given configuration data.
InstancePtr | is a pointer to an XHdcp22_Rx instance. The memory the pointer references must be pre-allocated by the caller. Further calls to manipulate the driver through the HDCP22-RX API must be made with this pointer. |
Config | is a reference to a structure containing information about a specific HDCP22-RX device. This function initializes an InstancePtr object for a specific device specified by the contents of Config. This function can initialize multiple instance objects with the use of multiple calls giving different Config information on each call. |
EffectiveAddr | is the base address of the device. If address translation is being used, then this parameter must reflect the virtual base address. Otherwise, the physical address should be used. |
References XHdcp22_Rx_Handles::AuthenticatedCallback, XHdcp22_Rx_Handles::AuthenticationRequestCallback, XHdcp22_Rx_Info::AuthenticationStatus, XHdcp22_Rx_Info::AuthRequestCnt, XHdcp22_Rx_Config::BaseAddress, XHdcp22_Rx::Config, XHdcp22_Rx_Info::CurrentState, XHdcp22_Rx_Handles::DdcClearReadBufferCallback, XHdcp22_Rx_Handles::DdcClearWriteBufferCallback, XHdcp22_Rx_Info::DdcErrorCnt, XHdcp22_Rx_Handles::DdcGetDataCallback, XHdcp22_Rx_Handles::DdcGetReadBufferSizeCallback, XHdcp22_Rx_Handles::DdcGetWriteBufferSizeCallback, XHdcp22_Rx_Handles::DdcIsReadBufferEmptyCallback, XHdcp22_Rx_Handles::DdcIsWriteBufferEmptyCallback, XHdcp22_Rx_Handles::DdcSetAddressCallback, XHdcp22_Rx_Handles::DdcSetDataCallback, XHdcp22_Rx_Info::ErrorFlag, XHdcp22_Rx_Info::ErrorFlagSticky, XHdcp22_Rx::Handles, XHdcp22_Rx_Info::HasStreamManagementInfo, XHdcp22_Rx::Info, XHdcp22_Rx_Handles::IsAuthenticatedCallbackSet, XHdcp22_Rx_Handles::IsAuthenticationRequestCallbackSet, XHdcp22_Rx_Handles::IsDdcAllCallbacksSet, XHdcp22_Rx_Handles::IsDdcClearReadBufferCallbackSet, XHdcp22_Rx_Handles::IsDdcClearWriteBufferCallbackSet, XHdcp22_Rx_Handles::IsDdcGetDataCallbackSet, XHdcp22_Rx_Handles::IsDdcGetReadBufferSizeCallbackRefSet, XHdcp22_Rx_Handles::IsDdcGetWriteBufferSizeCallbackSet, XHdcp22_Rx_Handles::IsDdcIsReadBufferEmptyCallbackSet, XHdcp22_Rx_Handles::IsDdcIsWriteBufferEmptyCallbackSet, XHdcp22_Rx_Handles::IsDdcSetAddressCallbackSet, XHdcp22_Rx_Handles::IsDdcSetDataCallbackSet, XHdcp22_Rx_Info::IsEnabled, XHdcp22_Rx_Info::IsEncrypted, XHdcp22_Rx_Info::IsNoStoredKm, XHdcp22_Rx::IsReady, XHdcp22_Rx_Handles::IsStreamManageRequestCallbackSet, XHdcp22_Rx_Handles::IsTopologyUpdateCallbackSet, XHdcp22_Rx_Info::IsTopologyValid, XHdcp22_Rx_Info::LCInitAttempts, XHdcp22_Rx_Info::LinkErrorCnt, XHdcp22_Rx_Config::Mode, XHdcp22_Rx_Info::NextState, XHdcp22_Rx_Info::ReauthReq, XHdcp22_Rx_Info::ReauthRequestCnt, XHdcp22_Rx_Info::ReturnState, XHdcp22_Rx::RxCaps, XHdcp22_Rx_Info::SeqNumV, XHdcp22_Rx_Info::SkipRead, XHdcp22_Rx::StateFunc, XHdcp22_Rx_Handles::StreamManageRequestCallback, XHdcp22_Rx_Info::TopologyReady, XHdcp22_Rx_Handles::TopologyUpdateCallback, XHDCP22_RX_ERROR_FLAG_NONE, XHDCP22_RX_RECEIVER, XHDCP22_RX_STATE_B0_WAIT_AKEINIT, XHDCP22_RX_STATE_UNDEFINED, XHDCP22_RX_UNAUTHENTICATED, and XHdcp22Rx_LogReset().
void XHdcp22Rx_ComputeEkh | ( | const u8 * | KprivRx, |
const u8 * | Km, | ||
const u8 * | M, | ||
u8 * | Ekh | ||
) |
This function computes Ekh used during HDCP 2.2 authentication and key exchange for pairing with receiver.
Reference: HDCP v2.2, section 2.2.1
KprivRx | is the RSA private key structure containing the quintuple. |
Km | is the master key generated by tx. |
M | is constructed by concatenating Rtx || Rrx. |
Ekh | is the encrypted Km used for pairing. |
void XHdcp22Rx_ComputeHPrime | ( | const u8 * | Rrx, |
const u8 * | RxCaps, | ||
const u8 * | Rtx, | ||
const u8 * | TxCaps, | ||
const u8 * | Km, | ||
u8 * | HPrime | ||
) |
This function computes HPrime used during HDCP 2.2 authentication and key exchange.
Reference: HDCP v2.2, section 2.2
Rrx | is the Rx random generated value. |
RxCaps | are the capabilities of the receiver. |
Rtx | is the Tx random generated value. |
TxCaps | are the capabilities of the receiver. |
Km | is the master key generated by tx. |
HPrime | is a pointer to the HPrime hash from the HDCP2.2 receiver. |
void XHdcp22Rx_ComputeKs | ( | const u8 * | Rrx, |
const u8 * | Rtx, | ||
const u8 * | Km, | ||
const u8 * | Rn, | ||
const u8 * | Eks, | ||
u8 * | Ks | ||
) |
This function computes the Ks used during HDCP 2.2 session key exchange.
Reference: HDCP v2.2, section 2.4
Rrx | is the Rx random generated value. |
Rtx | is the Tx random generated value. |
Km | is the master key generated by the transmitter. |
Rn | is the 64-bit psuedo-random nonce generated by the transmitter. |
Eks | is the encrypted session generated by the transmitter. |
Ks | is the decrypted session key. |
void XHdcp22Rx_ComputeLPrime | ( | const u8 * | Rn, |
const u8 * | Km, | ||
const u8 * | Rrx, | ||
const u8 * | Rtx, | ||
u8 * | LPrime | ||
) |
This function computes LPrime used during HDCP 2.2 locality check.
Reference: HDCP v2.2, section 2.3
Rn | is the 64-bit psuedo-random nonce generated by the transmitter. |
Km | is the 128-bit master key generated by tx. |
Rrx | is the 64-bit pseudo-random number generated by the receiver. |
Rtx | is the 64-bit pseudo-random number generated by the transmitter. |
LPrime | is the 256-bit value generated for locality check. |
void XHdcp22Rx_ComputeMPrime | ( | const u8 * | StreamIdType, |
const u8 * | SeqNumM, | ||
const u8 * | Km, | ||
const u8 * | Rrx, | ||
const u8 * | Rtx, | ||
u8 * | MPrime | ||
) |
This function computes VPrime used during HDCP 2.2 repeater authentication.
Reference: HDCP v2.2, section 2.3
StreamIdType | is the 16-bit field in the RepeaterAuth_Send_ReceiverID_List message. |
SeqNumM | is the 24-bit field in the RepeaterAuth_Stream_Manage message. |
Km | is the 128-bit master key generated by tx. |
Rrx | is the 64-bit pseudo-random number generated by the receiver. |
Rtx | is the 64-bit pseudo-random number generated by the transmitter. |
MPrime | is the 256-bit value generated for repeater stream management ready. |
void XHdcp22Rx_ComputeVPrime | ( | const u8 * | ReceiverIdList, |
u32 | ReceiverIdListSize, | ||
const u8 * | RxInfo, | ||
const u8 * | SeqNumV, | ||
const u8 * | Km, | ||
const u8 * | Rrx, | ||
const u8 * | Rtx, | ||
u8 * | VPrime | ||
) |
This function computes VPrime used during HDCP 2.2 repeater authentication.
Reference: HDCP v2.2, section 2.3
ReceiverIdList | is a list of downstream receivers IDs in big-endian order. Each receiver ID is 5 Bytes. |
ReceiverIdListSize | is the number of receiver Ids in ReceiverIdList. There can be between 1 and 31 devices in the list. |
RxInfo | is the 16-bit field in the RepeaterAuth_Send_ReceiverID_List message. |
Km | is the 128-bit master key generated by tx. |
Rrx | is the 64-bit pseudo-random number generated by the receiver. |
Rtx | is the 64-bit pseudo-random number generated by the transmitter. |
VPrime | is the 256-bit value generated for repeater authentication. |
int XHdcp22Rx_Disable | ( | XHdcp22_Rx * | InstancePtr | ) |
This function disables the HDCP22-RX state machine.
The HDCP2Version register is cleared, and the ReauthReq bit is set in the RxStatus register to allow the transmitter to recover when it has already authenticated. Without setting the ReauthReq bit the transmitter will not know that HDCP 2.2 protocol has been disabled by the Receiver after it has already authenticated.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
References XHdcp22_Rx::CipherInst, XHdcp22_Rx::Info, XHdcp22_Rx_Info::IsEnabled, XHdcp22_Rx::RngInst, XHDCP22_RX_LOG_EVT_INFO, XHDCP22_RX_LOG_INFO_DISABLE, and XHdcp22Rx_LogWr().
int XHdcp22Rx_Enable | ( | XHdcp22_Rx * | InstancePtr | ) |
This function enables the HDCP22-RX state machine.
The HDCP2Version register is set to active.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
References XHdcp22_Rx::CipherInst, XHdcp22_Rx::Handles, XHdcp22_Rx::Info, XHdcp22_Rx_Handles::IsDdcAllCallbacksSet, XHdcp22_Rx_Info::IsEnabled, XHdcp22_Rx::IsReady, XHdcp22_Rx::MmultInst, XHdcp22_Rx::PrivateKeyPtr, XHdcp22_Rx::PublicCertPtr, XHdcp22_Rx::RngInst, XHdcp22_Rx::TimerInst, XHDCP22_RX_LOG_EVT_INFO, XHDCP22_RX_LOG_INFO_ENABLE, and XHdcp22Rx_LogWr().
void XHdcp22Rx_GenerateRandom | ( | XHdcp22_Rx * | InstancePtr, |
int | NumOctets, | ||
u8 * | RandomNumberPtr | ||
) |
This function generates random octets.
NumOctets | is the number of octets in the random number. |
RandomNumberPtr | is a pointer to the random number. |
References XHdcp22_Rx::RngInst.
u8 XHdcp22Rx_GetContentStreamType | ( | XHdcp22_Rx * | InstancePtr | ) |
This function is gets the type information received from the RepeaterAuth_Stream_Manage message for downstream propagation of management information.
This function should be called only after the RepeaterAuth_Stream_Manage message has been received, and can be called inside the user callback function type XHDCP22_RX_HANDLER_STREAM_MANAGE_REQUEST.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
References XHdcp22_Rx::Params.
Referenced by XHdcp22Rx_Info().
XTmrCtr * XHdcp22Rx_GetTimer | ( | XHdcp22_Rx * | InstancePtr | ) |
This function returns the pointer to the internal timer control instance needed for connecting the timer interrupt to an interrupt controller.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
References XHdcp22_Rx::TimerInst.
u32 XHdcp22Rx_GetVersion | ( | XHdcp22_Rx * | InstancePtr | ) |
This function reads the version.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
References XHdcp22_Rx::CipherInst.
void XHdcp22Rx_Info | ( | XHdcp22_Rx * | InstancePtr | ) |
This function prints the state machine information.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
References XHdcp22_Rx_Info::AuthenticationStatus, XHdcp22_Rx_Info::AuthRequestCnt, XHdcp22_Rx_Info::DdcErrorCnt, XHdcp22_Rx_Topology::Depth, XHdcp22_Rx_Topology::DeviceCnt, XHdcp22_Rx_Topology::Hdcp1DeviceDownstream, XHdcp22_Rx_Topology::Hdcp2LegacyDeviceDownstream, XHdcp22_Rx::Info, XHdcp22_Rx_Info::LinkErrorCnt, XHdcp22_Rx_Topology::MaxCascadeExceeded, XHdcp22_Rx_Topology::MaxDevsExceeded, XHdcp22_Rx_Info::ReauthRequestCnt, XHdcp22_Rx::Topology, XHDCP22_RX_AUTHENTICATED, XHDCP22_RX_AUTHENTICATION_BUSY, XHDCP22_RX_REAUTHENTICATE_REQUESTED, XHDCP22_RX_UNAUTHENTICATED, XHdcp22Rx_GetContentStreamType(), XHdcp22Rx_IsEnabled(), XHdcp22Rx_IsEncryptionEnabled(), and XHdcp22Rx_IsRepeater().
u8 XHdcp22Rx_IsAuthenticated | ( | XHdcp22_Rx * | InstancePtr | ) |
This function checks if the HDCP22-RX state machine is in the Authenticated state.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
References XHdcp22_Rx_Info::AuthenticationStatus, XHdcp22_Rx::Info, and XHDCP22_RX_AUTHENTICATED.
u8 XHdcp22Rx_IsEnabled | ( | XHdcp22_Rx * | InstancePtr | ) |
This function checks if the HDCP22-RX state machine is enabled.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
References XHdcp22_Rx::Info, and XHdcp22_Rx_Info::IsEnabled.
Referenced by XHdcp22Rx_Info().
u8 XHdcp22Rx_IsEncryptionEnabled | ( | XHdcp22_Rx * | InstancePtr | ) |
This function checks if the HDCP22-RX cipher encryption is enabled.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
References XHdcp22_Rx::CipherInst.
Referenced by XHdcp22Rx_Info().
u8 XHdcp22Rx_IsError | ( | XHdcp22_Rx * | InstancePtr | ) |
This function checks if the HDCP22-RX state machine has detected an error condition.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
References XHdcp22_Rx_Info::ErrorFlagSticky, XHdcp22_Rx::Info, and XHDCP22_RX_ERROR_FLAG_NONE.
u8 XHdcp22Rx_IsInProgress | ( | XHdcp22_Rx * | InstancePtr | ) |
This function checks if the HDCP22-RX state machine is enabled but not yet in the Authenticated state.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
References XHdcp22_Rx_Info::AuthenticationStatus, XHdcp22_Rx::Info, and XHDCP22_RX_AUTHENTICATION_BUSY.
u8 XHdcp22Rx_IsRepeater | ( | XHdcp22_Rx * | InstancePtr | ) |
This function returns the current repeater mode status.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
References XHdcp22_Rx::Config, XHdcp22_Rx_Config::Mode, and XHDCP22_RX_RECEIVER.
Referenced by XHdcp22Rx_Info().
void XHdcp22Rx_LoadLc128 | ( | XHdcp22_Rx * | InstancePtr, |
const u8 * | Lc128Ptr | ||
) |
This function is used to load the Lc128 value by copying the contents of the array referenced by Lc128Ptr into the cipher.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
Lc128Ptr | is a pointer to an array. |
References XHdcp22_Rx::CipherInst.
int XHdcp22Rx_LoadPrivateKey | ( | XHdcp22_Rx * | InstancePtr, |
const u8 * | PrivateKeyPtr | ||
) |
This function is used to load the private key.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
PrivateKeyPtr | is a pointer to an array. |
References XHdcp22_Rx::NPrimeP, XHdcp22_Rx::NPrimeQ, XHdcp22_Rx::PrivateKeyPtr, and XHdcp22Rx_CalcMontNPrime().
void XHdcp22Rx_LoadPublicCert | ( | XHdcp22_Rx * | InstancePtr, |
const u8 * | PublicCertPtr | ||
) |
This function is used to load the public certificate.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
PublicCertPtr | is a pointer to an array. |
References XHdcp22_Rx::PublicCertPtr.
void XHdcp22Rx_LogDisplay | ( | XHdcp22_Rx * | InstancePtr | ) |
This function prints the contents of the log buffer.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
References XHdcp22_Rx_LogItem::Data, XHdcp22_Rx_LogItem::LogEvent, XHdcp22_Rx_LogItem::TimeStamp, XHDCP22_RX_ERROR_FLAG_DDC_BURST, XHDCP22_RX_ERROR_FLAG_EMPTY_REPEATER_TOPOLOGY, XHDCP22_RX_ERROR_FLAG_FORCE_RESET, XHDCP22_RX_ERROR_FLAG_LINK_INTEGRITY, XHDCP22_RX_ERROR_FLAG_MAX_LCINIT_ATTEMPTS, XHDCP22_RX_ERROR_FLAG_MAX_REPEATER_TOPOLOGY, XHDCP22_RX_ERROR_FLAG_MESSAGE_SIZE, XHDCP22_RX_ERROR_FLAG_PROCESSING_AKEINIT, XHDCP22_RX_ERROR_FLAG_PROCESSING_AKENOSTOREDKM, XHDCP22_RX_ERROR_FLAG_PROCESSING_AKESTOREDKM, XHDCP22_RX_ERROR_FLAG_PROCESSING_LCINIT, XHDCP22_RX_ERROR_FLAG_PROCESSING_REPEATERAUTHSENDACK, XHDCP22_RX_ERROR_FLAG_PROCESSING_REPEATERAUTHSTREAMMANAGE, XHDCP22_RX_ERROR_FLAG_PROCESSING_SKESENDEKS, XHDCP22_RX_LOG_DEBUG_COMPUTE_EKH, XHDCP22_RX_LOG_DEBUG_COMPUTE_EKH_DONE, XHDCP22_RX_LOG_DEBUG_COMPUTE_HPRIME, XHDCP22_RX_LOG_DEBUG_COMPUTE_HPRIME_DONE, XHDCP22_RX_LOG_DEBUG_COMPUTE_KM, XHDCP22_RX_LOG_DEBUG_COMPUTE_KM_DONE, XHDCP22_RX_LOG_DEBUG_COMPUTE_KS, XHDCP22_RX_LOG_DEBUG_COMPUTE_KS_DONE, XHDCP22_RX_LOG_DEBUG_COMPUTE_LPRIME, XHDCP22_RX_LOG_DEBUG_COMPUTE_LPRIME_DONE, XHDCP22_RX_LOG_DEBUG_COMPUTE_MPRIME, XHDCP22_RX_LOG_DEBUG_COMPUTE_MPRIME_DONE, XHDCP22_RX_LOG_DEBUG_COMPUTE_RSA, XHDCP22_RX_LOG_DEBUG_COMPUTE_RSA_DONE, XHDCP22_RX_LOG_DEBUG_COMPUTE_VPRIME, XHDCP22_RX_LOG_DEBUG_COMPUTE_VPRIME_DONE, XHDCP22_RX_LOG_DEBUG_READ_MESSAGE_COMPLETE, XHDCP22_RX_LOG_DEBUG_TIMER_EXPIRED, XHDCP22_RX_LOG_DEBUG_TIMER_START, XHDCP22_RX_LOG_DEBUG_WRITE_MESSAGE_AVAILABLE, XHDCP22_RX_LOG_EVT_DEBUG, XHDCP22_RX_LOG_EVT_ERROR, XHDCP22_RX_LOG_EVT_INFO, XHDCP22_RX_LOG_EVT_INFO_MESSAGE, XHDCP22_RX_LOG_EVT_INFO_STATE, XHDCP22_RX_LOG_EVT_USER, XHDCP22_RX_LOG_INFO_DISABLE, XHDCP22_RX_LOG_INFO_ENABLE, XHDCP22_RX_LOG_INFO_ENCRYPTION_ENABLE, XHDCP22_RX_LOG_INFO_REQAUTH_REQ, XHDCP22_RX_LOG_INFO_RESET, XHDCP22_RX_LOG_INFO_TOPOLOGY_UPDATE, XHDCP22_RX_MSG_ID_AKEINIT, XHDCP22_RX_MSG_ID_AKENOSTOREDKM, XHDCP22_RX_MSG_ID_AKESENDCERT, XHDCP22_RX_MSG_ID_AKESENDHPRIME, XHDCP22_RX_MSG_ID_AKESENDPAIRINGINFO, XHDCP22_RX_MSG_ID_AKESTOREDKM, XHDCP22_RX_MSG_ID_LCINIT, XHDCP22_RX_MSG_ID_LCSENDLPRIME, XHDCP22_RX_MSG_ID_REPEATERAUTHSENDACK, XHDCP22_RX_MSG_ID_REPEATERAUTHSENDRXIDLIST, XHDCP22_RX_MSG_ID_REPEATERAUTHSTREAMMANAGE, XHDCP22_RX_MSG_ID_REPEATERAUTHSTREAMREADY, XHDCP22_RX_MSG_ID_SKESENDEKS, XHDCP22_RX_STATE_B0_WAIT_AKEINIT, XHDCP22_RX_STATE_B1_SEND_AKESENDCERT, XHDCP22_RX_STATE_B1_SEND_AKESENDHPRIME, XHDCP22_RX_STATE_B1_SEND_AKESENDPAIRINGINFO, XHDCP22_RX_STATE_B1_WAIT_AKEKM, XHDCP22_RX_STATE_B1_WAIT_LCINIT, XHDCP22_RX_STATE_B2_SEND_LCSENDLPRIME, XHDCP22_RX_STATE_B2_WAIT_SKESENDEKS, XHDCP22_RX_STATE_B3_COMPUTE_KS, XHDCP22_RX_STATE_B4_AUTHENTICATED, XHDCP22_RX_STATE_C4_WAIT_FOR_DOWNSTREAM, XHDCP22_RX_STATE_C5_SEND_RECEIVERIDLIST, XHDCP22_RX_STATE_C5_SEND_RECEIVERIDLIST_DONE, XHDCP22_RX_STATE_C6_VERIFY_RECEIVERIDLISTACK, XHDCP22_RX_STATE_C7_SEND_STREAM_READY, XHDCP22_RX_STATE_C7_SEND_STREAM_READY_DONE, XHDCP22_RX_STATE_C7_WAIT_STREAM_MANAGEMENT, XHDCP22_RX_STATE_C8_AUTHENTICATED, and XHdcp22Rx_LogRd().
u32 XHdcp22Rx_LogGetTimeUSecs | ( | XHdcp22_Rx * | InstancePtr | ) |
This function returns the time expired since a log reset was called.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
References XHdcp22_Rx::TimerInst.
Referenced by XHdcp22Rx_LogWr().
XHdcp22_Rx_LogItem * XHdcp22Rx_LogRd | ( | XHdcp22_Rx * | InstancePtr | ) |
This function provides the log information from the log buffer.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
References XHdcp22_Rx_LogItem::Data, XHdcp22_Rx_Log::Head, XHdcp22_Rx::Log, XHdcp22_Rx_LogItem::LogEvent, XHdcp22_Rx_Log::LogItems, XHdcp22_Rx_Log::Tail, XHdcp22_Rx_LogItem::TimeStamp, and XHDCP22_RX_LOG_BUFFER_SIZE.
Referenced by XHdcp22Rx_LogDisplay().
void XHdcp22Rx_LogReset | ( | XHdcp22_Rx * | InstancePtr, |
u8 | Verbose | ||
) |
This function clears the log pointers.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
Verbose | allows to add debug logging. |
References XHdcp22_Rx_Log::Head, XHdcp22_Rx::Log, XHdcp22_Rx_Log::Tail, XHdcp22_Rx::TimerInst, and XHdcp22_Rx_Log::Verbose.
Referenced by XHdcp22Rx_CfgInitialize().
void XHdcp22Rx_LogWr | ( | XHdcp22_Rx * | InstancePtr, |
u16 | Evt, | ||
u16 | Data | ||
) |
This function writes HDCP22-RX log event into buffer.
If the log event is of type error, the sticky error flag is set. The sticky error flag is used to keep history of error conditions.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
Evt | specifies an action to be carried out. |
Data | specifies the information that gets written into log buffer. |
References XHdcp22_Rx_LogItem::Data, XHdcp22_Rx_Info::ErrorFlagSticky, XHdcp22_Rx_Log::Head, XHdcp22_Rx::Info, XHdcp22_Rx::Log, XHdcp22_Rx_LogItem::LogEvent, XHdcp22_Rx_Log::LogItems, XHdcp22_Rx_Log::Tail, XHdcp22_Rx_LogItem::TimeStamp, XHdcp22_Rx_Log::Verbose, XHDCP22_RX_LOG_BUFFER_SIZE, XHDCP22_RX_LOG_EVT_DEBUG, XHDCP22_RX_LOG_EVT_ERROR, XHDCP22_RX_LOG_EVT_INFO_MESSAGE, XHDCP22_RX_LOG_EVT_INVALID, and XHdcp22Rx_LogGetTimeUSecs().
Referenced by XHdcp22Rx_Disable(), XHdcp22Rx_Enable(), XHdcp22Rx_Poll(), XHdcp22Rx_Reset(), XHdcp22Rx_RsaesOaepDecrypt(), XHdcp22Rx_SetDdcError(), XHdcp22Rx_SetLinkError(), XHdcp22Rx_SetReadMessageComplete(), XHdcp22Rx_SetTopologyUpdate(), and XHdcp22Rx_SetWriteMessageAvailable().
XHdcp22_Rx_Config * XHdcp22Rx_LookupConfig | ( | u16 | DeviceId | ) |
This function returns a reference to an XHdcp22_Rx_Config structure based on the core id, DeviceId.
The return value will refer to an entry in the device configuration table defined in the xhdcp22_rx_g.c file.
DeviceId | is the unique core ID of the HDCP RX core for the lookup operation. |
int XHdcp22Rx_Poll | ( | XHdcp22_Rx * | InstancePtr | ) |
This function executes the HDCP22-RX state machine.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
References XHdcp22_Rx_Info::AuthenticationStatus, XHdcp22_Rx_Info::CurrentState, XHdcp22_Rx::Info, XHdcp22_Rx_Info::IsEnabled, XHdcp22_Rx_Info::NextState, XHdcp22_Rx::StateFunc, XHDCP22_RX_LOG_EVT_INFO_STATE, and XHdcp22Rx_LogWr().
int XHdcp22Rx_Reset | ( | XHdcp22_Rx * | InstancePtr | ) |
This function resets the HDCP22-RX system to the default state.
The HDCP22-RX DDC registers are set to their default value and the message buffer is reset.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
References XHdcp22_Rx_Info::AuthenticationStatus, XHdcp22_Rx_Info::AuthRequestCnt, XHdcp22_Rx::CipherInst, XHdcp22_Rx_Info::CurrentState, XHdcp22_Rx_Info::DdcErrorCnt, XHdcp22_Rx_Info::ErrorFlag, XHdcp22_Rx_Info::ErrorFlagSticky, XHdcp22_Rx::Handles, XHdcp22_Rx_Info::HasStreamManagementInfo, XHdcp22_Rx::Info, XHdcp22_Rx_Handles::IsDdcAllCallbacksSet, XHdcp22_Rx_Info::IsEncrypted, XHdcp22_Rx_Info::IsNoStoredKm, XHdcp22_Rx_Info::IsTopologyValid, XHdcp22_Rx_Handles::IsUnauthenticatedCallbackSet, XHdcp22_Rx_Info::LCInitAttempts, XHdcp22_Rx_Info::LinkErrorCnt, XHdcp22_Rx::MessageBuffer, XHdcp22_Rx::MessageSize, XHdcp22_Rx_Info::NextState, XHdcp22_Rx_Info::ReauthReq, XHdcp22_Rx_Info::ReauthRequestCnt, XHdcp22_Rx_Info::ReturnState, XHdcp22_Rx_Info::SeqNumV, XHdcp22_Rx_Info::SkipRead, XHdcp22_Rx::StateFunc, XHdcp22_Rx::Topology, XHdcp22_Rx_Info::TopologyReady, XHdcp22_Rx_Handles::UnauthenticatedCallback, XHdcp22_Rx_Handles::UnauthenticatedCallbackRef, XHDCP22_RX_AUTHENTICATED, XHDCP22_RX_ERROR_FLAG_NONE, XHDCP22_RX_LOG_EVT_INFO, XHDCP22_RX_LOG_INFO_RESET, XHDCP22_RX_STATE_B0_WAIT_AKEINIT, XHDCP22_RX_STATE_UNDEFINED, XHDCP22_RX_UNAUTHENTICATED, and XHdcp22Rx_LogWr().
int XHdcp22Rx_RsaesOaepDecrypt | ( | XHdcp22_Rx * | InstancePtr, |
const XHdcp22_Rx_KprivRx * | KprivRx, | ||
u8 * | EncryptedMessage, | ||
u8 * | Message, | ||
int * | MessageLen | ||
) |
This function implements the RSAES-OAEP-Decrypt operation.
The message is decrypted using RSADP and then decoded using EME-OAEP.
Reference: PKCS#1 v2.1, Section 7.1.2
InstancePtr | is a pointer to the MMULT instance. |
KprivRx | is the RSA private key structure containing the quintuple. |
EncryptedMessage | is the 128 byte octet string to be decrypted. |
Message | is the octet string after decryption. |
MessageLen | is the length of the message octet string after decryption. |
References XHDCP22_RX_LOG_DEBUG_COMPUTE_RSA, XHDCP22_RX_LOG_DEBUG_COMPUTE_RSA_DONE, XHDCP22_RX_LOG_EVT_DEBUG, and XHdcp22Rx_LogWr().
int XHdcp22Rx_RsaesOaepEncrypt | ( | const XHdcp22_Rx_KpubRx * | KpubRx, |
const u8 * | Message, | ||
const u32 | MessageLen, | ||
const u8 * | MaskingSeed, | ||
u8 * | EncryptedMessage | ||
) |
This function implements the RSAES-OAEP-Encrypt operation.
The message is encoded using EME-OAEP and then encrypted with the public key using RSAEP.
Reference: PKCS#1 v2.1, Section 7.1.1
KpubRx | is the RSA public key structure containing the 1024 bit modulus and 24 bit public exponent. |
Message | is the octet string to be encrypted. |
MessageLen | is the length of octet string to be encrypted and must be less than or equal to (nLen - 2*hLen - 2) |
MaskingSeed | is the random octet string seed of length hLen used by EME-OAEP encoding function. |
int XHdcp22Rx_SetCallback | ( | XHdcp22_Rx * | InstancePtr, |
XHdcp22_Rx_HandlerType | HandlerType, | ||
void * | CallbackFunc, | ||
void * | CallbackRef | ||
) |
This function installs callback functions for the given HandlerType:
HandlerType Callback Function Type ------------------------- --------------------------- (XHDCP22_RX_HANDLER_DDC_SETREGADDR) DdcSetAddressCallback (XHDCP22_RX_HANDLER_DDC_SETREGDATA) DdcSetDataCallback (XHDCP22_RX_HANDLER_DDC_GETREGDATA) DdcGetDataCallback (XHDCP22_RX_HANDLER_DDC_GETWBUFSIZE) DdcGetWriteBufferSizeCallback (XHDCP22_RX_HANDLER_DDC_GETRBUFSIZE) DdcGetReadBufferSizeCallback (XHDCP22_RX_HANDLER_DDC_ISWBUFEMPTY) DdcIsWriteBufferEmptyCallback (XHDCP22_RX_HANDLER_DDC_ISRBUFEMPTY) DdcIsReadBufferEmptyCallback (XHDCP22_RX_HANDLER_DDC_CLEARRBUF) DdcClearReadBufferCallback (XHDCP22_RX_HANDLER_DDC_CLEARWBUF) DdcClearWriteBufferCallback (XHDCP22_RX_HANDLER_AUTHENTICATED) AuthenticatedCallback (XHDCP22_RX_HANDLER_UNAUTHENTICATED) UnauthenticatedCallback (XHDCP22_RX_HANDLER_AUTHENTICATION_REQUEST) AuthenticationRequestCallback (XHDCP22_RX_HANDLER_STREAM_MANAGE_REQUEST) StreamManageRequestCallback (XHDCP22_RX_HANDLER_TOPOLOGY_UPDATE) TopologyUpdateCallback
InstancePtr | is a pointer to the HDMI RX core instance. |
HandlerType | specifies the type of handler. |
CallbackFunc | is the address of the callback function. |
CallbackRef | is a user data item that will be passed to the callback function when it is invoked. |
References XHdcp22_Rx_Handles::AuthenticatedCallback, XHdcp22_Rx_Handles::AuthenticatedCallbackRef, XHdcp22_Rx_Handles::AuthenticationRequestCallback, XHdcp22_Rx_Handles::AuthenticationRequestCallbackRef, XHdcp22_Rx_Handles::DdcClearReadBufferCallback, XHdcp22_Rx_Handles::DdcClearReadBufferCallbackRef, XHdcp22_Rx_Handles::DdcClearWriteBufferCallback, XHdcp22_Rx_Handles::DdcClearWriteBufferCallbackRef, XHdcp22_Rx_Handles::DdcGetDataCallback, XHdcp22_Rx_Handles::DdcGetDataCallbackRef, XHdcp22_Rx_Handles::DdcGetReadBufferSizeCallback, XHdcp22_Rx_Handles::DdcGetReadBufferSizeCallbackRef, XHdcp22_Rx_Handles::DdcGetWriteBufferSizeCallback, XHdcp22_Rx_Handles::DdcGetWriteBufferSizeCallbackRef, XHdcp22_Rx_Handles::DdcIsReadBufferEmptyCallback, XHdcp22_Rx_Handles::DdcIsReadBufferEmptyCallbackRef, XHdcp22_Rx_Handles::DdcIsWriteBufferEmptyCallback, XHdcp22_Rx_Handles::DdcIsWriteBufferEmptyCallbackRef, XHdcp22_Rx_Handles::DdcSetAddressCallback, XHdcp22_Rx_Handles::DdcSetAddressCallbackRef, XHdcp22_Rx_Handles::DdcSetDataCallback, XHdcp22_Rx_Handles::DdcSetDataCallbackRef, XHdcp22_Rx_Handles::EncryptionStatusCallback, XHdcp22_Rx_Handles::EncryptionStatusCallbackRef, XHdcp22_Rx::Handles, XHdcp22_Rx_Handles::IsAuthenticatedCallbackSet, XHdcp22_Rx_Handles::IsAuthenticationRequestCallbackSet, XHdcp22_Rx_Handles::IsDdcAllCallbacksSet, XHdcp22_Rx_Handles::IsDdcClearReadBufferCallbackSet, XHdcp22_Rx_Handles::IsDdcClearWriteBufferCallbackSet, XHdcp22_Rx_Handles::IsDdcGetDataCallbackSet, XHdcp22_Rx_Handles::IsDdcGetReadBufferSizeCallbackRefSet, XHdcp22_Rx_Handles::IsDdcGetWriteBufferSizeCallbackSet, XHdcp22_Rx_Handles::IsDdcIsReadBufferEmptyCallbackSet, XHdcp22_Rx_Handles::IsDdcIsWriteBufferEmptyCallbackSet, XHdcp22_Rx_Handles::IsDdcSetAddressCallbackSet, XHdcp22_Rx_Handles::IsDdcSetDataCallbackSet, XHdcp22_Rx_Handles::IsEncryptionStatusCallbackSet, XHdcp22_Rx_Handles::IsStreamManageRequestCallbackSet, XHdcp22_Rx_Handles::IsTopologyUpdateCallbackSet, XHdcp22_Rx_Handles::IsUnauthenticatedCallbackSet, XHdcp22_Rx_Handles::StreamManageRequestCallback, XHdcp22_Rx_Handles::StreamManageRequestCallbackRef, XHdcp22_Rx_Handles::TopologyUpdateCallback, XHdcp22_Rx_Handles::TopologyUpdateCallbackRef, XHdcp22_Rx_Handles::UnauthenticatedCallback, XHdcp22_Rx_Handles::UnauthenticatedCallbackRef, XHDCP22_RX_HANDLER_AUTHENTICATED, XHDCP22_RX_HANDLER_AUTHENTICATION_REQUEST, XHDCP22_RX_HANDLER_DDC_CLEARRBUF, XHDCP22_RX_HANDLER_DDC_CLEARWBUF, XHDCP22_RX_HANDLER_DDC_GETRBUFSIZE, XHDCP22_RX_HANDLER_DDC_GETREGDATA, XHDCP22_RX_HANDLER_DDC_GETWBUFSIZE, XHDCP22_RX_HANDLER_DDC_ISRBUFEMPTY, XHDCP22_RX_HANDLER_DDC_ISWBUFEMPTY, XHDCP22_RX_HANDLER_DDC_SETREGADDR, XHDCP22_RX_HANDLER_DDC_SETREGDATA, XHDCP22_RX_HANDLER_ENCRYPTION_UPDATE, XHDCP22_RX_HANDLER_INVALID, XHDCP22_RX_HANDLER_STREAM_MANAGE_REQUEST, XHDCP22_RX_HANDLER_TOPOLOGY_UPDATE, XHDCP22_RX_HANDLER_UNAUTHENTICATED, and XHDCP22_RX_HANDLER_UNDEFINED.
void XHdcp22Rx_SetDdcError | ( | XHdcp22_Rx * | InstancePtr | ) |
This function is called when a DDC read/write burst stops prior to completing the expected message size.
This will cause the message buffers to be flushed and state machine reset.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
References XHdcp22_Rx_Info::DdcErrorCnt, XHdcp22_Rx_Info::ErrorFlag, XHdcp22_Rx::Info, XHDCP22_RX_ERROR_FLAG_DDC_BURST, XHDCP22_RX_LOG_EVT_ERROR, and XHdcp22Rx_LogWr().
void XHdcp22Rx_SetLinkError | ( | XHdcp22_Rx * | InstancePtr | ) |
This function is called when 50 consecutive data island ECC errors are detected indicating a link integrity problem.
The error flag is set indicating to the state machine that REAUTH_REQ bit in the RXSTATUS register be set. Setting this flag only takes effect when the authentication state machine is in the Authenticated state B4.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
References XHdcp22_Rx_Info::ErrorFlag, XHdcp22_Rx::Info, XHdcp22_Rx_Info::LinkErrorCnt, XHDCP22_RX_ERROR_FLAG_LINK_INTEGRITY, XHDCP22_RX_LOG_EVT_ERROR, and XHdcp22Rx_LogWr().
void XHdcp22Rx_SetReadMessageComplete | ( | XHdcp22_Rx * | InstancePtr | ) |
This function is called when a message has been read out of the read message buffer.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
References XHdcp22_Rx_Info::DdcFlag, XHdcp22_Rx::Info, XHDCP22_RX_DDC_FLAG_READ_MESSAGE_READY, XHDCP22_RX_LOG_DEBUG_READ_MESSAGE_COMPLETE, XHDCP22_RX_LOG_EVT_DEBUG, and XHdcp22Rx_LogWr().
void XHdcp22Rx_SetRepeater | ( | XHdcp22_Rx * | InstancePtr, |
u8 | Set | ||
) |
This function sets the repeater mode status.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
Set | is TRUE to enable repeater mode and FALSE to disable. |
References XHdcp22_Rx::Config, XHdcp22_Rx_Config::Mode, XHdcp22_Rx::RxCaps, XHDCP22_RX_RECEIVER, and XHDCP22_RX_REPEATER.
void XHdcp22Rx_SetTopology | ( | XHdcp22_Rx * | InstancePtr, |
const XHdcp22_Rx_Topology * | TopologyPtr | ||
) |
This function copies a complete repeater topology table into the instance repeater topology table.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
TopologyPtr | is a pointer to the repeater topology table. |
References XHdcp22_Rx::Topology.
void XHdcp22Rx_SetTopologyField | ( | XHdcp22_Rx * | InstancePtr, |
XHdcp22_Rx_TopologyField | Field, | ||
u8 | Value | ||
) |
This function is used to set various fields inside the topology structure.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
Field | indicates what field of the topology structure to update. |
Value | is the value assigned to the field of the topology structure. |
void XHdcp22Rx_SetTopologyReceiverIdList | ( | XHdcp22_Rx * | InstancePtr, |
const u8 * | ListPtr, | ||
u32 | ListSize | ||
) |
This function copies the RECEIVER_ID_LIST into the repeater topology table.
Receiver ID list is constructed by appending Receiver IDs in big-endian order.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
ListPtr | is a pointer to the Receiver ID list. The list consists of a contiguous set of bytes stored in big-endian order, with each Receiver ID occuping five bytes with a maximum of 31 Receiver IDs. |
ListSize | is the number of Receiver IDs in the list. The list size cannot exceed 31 devices. |
References XHdcp22_Rx_Topology::ReceiverIdList, and XHdcp22_Rx::Topology.
void XHdcp22Rx_SetTopologyUpdate | ( | XHdcp22_Rx * | InstancePtr | ) |
This function is used to indicate that the topology table has been updated and is ready for upstream propagation.
Before calling this function ensure that all the fields in the repeater topology table have been updated.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
References XHdcp22_Rx::Info, XHdcp22_Rx_Info::IsTopologyValid, XHDCP22_RX_LOG_EVT_INFO, XHDCP22_RX_LOG_INFO_TOPOLOGY_UPDATE, and XHdcp22Rx_LogWr().
void XHdcp22Rx_SetWriteMessageAvailable | ( | XHdcp22_Rx * | InstancePtr | ) |
This function is called when a complete message is available in the write message buffer.
InstancePtr | is a pointer to the XHdcp22_Rx core instance. |
References XHdcp22_Rx_Info::DdcFlag, XHdcp22_Rx::Info, XHDCP22_RX_DDC_FLAG_WRITE_MESSAGE_READY, XHDCP22_RX_LOG_DEBUG_WRITE_MESSAGE_AVAILABLE, XHDCP22_RX_LOG_EVT_DEBUG, and XHdcp22Rx_LogWr().