| hdcp22_rx_dp Vitis Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List

Data Structures | Macros | Typedefs | Enumerations | Functions
Overview

## 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_Dp_Handles
| This typedef is used to store handles to function pointers. More...
struct | XHdcp22_Rx_Dp_Parameters
| This typedef is used to store temporary parameters for computations. More...
struct | XHdcp22_Rx_Dp_LogItem
| This typedef is used to store logging events. More...
struct | XHdcp22_Rx_Dp_Log
| This typedef contains the HDCP22 log list. More...
struct | XHdcp22_Rx_Dp_Info
| This typedef provides information about status of HDCP-RX authentication. More...
struct | XHdcp22_Rx_Dp_Topology
| This typedef is the repeater topology table used to communicate topology information to the receiver upstream interface. More...
struct | XHdcp22_Rx_Dp_Config
| This typedef contains configuration information for the device. More...
struct | XHdcp22_Rx_Dp
| 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...
typedef u32(* | Xhdcp22_Rx_RdWrHandler )(void *HandlerRef, u32 offset, u8 *buf, u32 size)
| Type for pointer to four input function with a return value. More...

## Enumerations
enum | XHdcp22_Rx_Dp_Protocol { XHDCP22_RX_DP, XHDCP22_RX_HDMI }
| These constants are used to define the protocol. More...
enum | XHdcp22_Rx_Dp_Mode { XHDCP22_RX_RECEIVER, XHDCP22_RX_REPEATER, XHDCP22_RX_CONVERTER }
| These constants are used to define the mode. More...
enum | XHdcp22_Rx_Dp_HandlerType { XHDCP22_RX_HANDLER_UNDEFINED, XHDCP22_RX_HANDLER_DDC_SETREGADDR, XHDCP22_RX_HANDLER_DDC_SETREGDATA, XHDCP22_RX_HANDLER_DDC_GETREGDATA, XHDCP22_RX_HANDLER_DDC_GETWBUFSIZE, XHDCP22_RX_HANDLER_DDC_GETRBUFSIZE, XHDCP22_RX_HANDLER_DDC_ISWBUFEMPTY, XHDCP22_RX_HANDLER_DDC_ISRBUFEMPTY, XHDCP22_RX_HANDLER_DDC_CLEARRBUF, XHDCP22_RX_HANDLER_DDC_CLEARWBUF, XHDCP22_RX_HANDLER_AUTHENTICATED, XHDCP22_RX_HANDLER_UNAUTHENTICATED, XHDCP22_RX_HANDLER_AUTHENTICATION_REQUEST, XHDCP22_RX_HANDLER_TOPOLOGY_UPDATE, XHDCP22_RX_HANDLER_STREAM_MANAGE_REQUEST, XHDCP22_RX_HANDLER_ENCRYPTION_UPDATE, XHDCP22_RX_HANDLER_DP_AUX_READ, XHDCP22_RX_HANDLER_DP_AUX_WRITE, XHDCP22_RX_HANDLER_DP_CP_IRQ_SET, XHDCP22_RX_HANDLER_DP_AUX_DEFER_SET_CLR, XHDCP22_RX_HANDLER_SKE_SEND_EKS, XHDCP22_RX_HANDLER_INVALID }
| These constants are used to identify callback functions. More...
enum | XHdcp22_Rx_Dp_StateType { XHDCP22_RX_STATE_UNDEFINED = 0x000, XHDCP22_RX_STATE_B0_WAIT_AKEINIT = 0xB00, XHDCP22_RX_STATE_B1_SEND_AKESENDCERT = 0xB10, XHDCP22_RX_STATE_B1_WAIT_AKEKM = 0xB11, XHDCP22_RX_STATE_B1_SEND_AKESENDHPRIME = 0xB12, XHDCP22_RX_STATE_B1_SEND_AKESENDPAIRINGINFO = 0xB13, XHDCP22_RX_STATE_B1_WAIT_LCINIT = 0xB14, XHDCP22_RX_STATE_B2_SEND_LCSENDLPRIME = 0xB20, XHDCP22_RX_STATE_B2_WAIT_SKESENDEKS = 0xB21, XHDCP22_RX_STATE_B3_COMPUTE_KS = 0xB30, XHDCP22_RX_STATE_B4_AUTHENTICATED = 0xB40, XHDCP22_RX_STATE_C4_WAIT_FOR_DOWNSTREAM = 0xC40, XHDCP22_RX_STATE_C5_SEND_RECEIVERIDLIST = 0xC50, XHDCP22_RX_STATE_C5_SEND_RECEIVERIDLIST_DONE = 0xC51, XHDCP22_RX_STATE_C6_VERIFY_RECEIVERIDLISTACK = 0xC60, XHDCP22_RX_STATE_C7_WAIT_STREAM_MANAGEMENT = 0xC70, XHDCP22_RX_STATE_C7_SEND_STREAM_READY = 0xC71, XHDCP22_RX_STATE_C7_SEND_STREAM_READY_DONE = 0xC72, XHDCP22_RX_STATE_C8_AUTHENTICATED = 0xC80, XHDCP22_RX_STATE_INVALID }
| These constants are the authentication and key exchange states. More...
enum | XHdcp22_Rx_Dp_AuthenticationType { XHDCP22_RX_UNAUTHENTICATED, XHDCP22_RX_AUTHENTICATION_BUSY, XHDCP22_RX_AUTHENTICATED, XHDCP22_RX_REAUTHENTICATE_REQUESTED }
| These constants define the authentication status. More...
enum | XHdcp22_Rx_Dp_LogEvt { , XHDCP22_RX_LOG_EVT_INFO, XHDCP22_RX_LOG_EVT_INFO_STATE, XHDCP22_RX_LOG_EVT_INFO_MESSAGE, XHDCP22_RX_LOG_EVT_DEBUG, XHDCP22_RX_LOG_EVT_ERROR, XHDCP22_RX_LOG_EVT_USER, XHDCP22_RX_LOG_EVT_INVALID }
| These constants are the general logging events. More...
enum | XHdcp22_Rx_Dp_TopologyField
| These constants are used to identify fields inside the topology structure. More...
enum | XHdcp22_Rx_MessageIds { XHDCP22_RX_MSG_ID_AKEINIT = 2, XHDCP22_RX_MSG_ID_AKESENDCERT = 3, XHDCP22_RX_MSG_ID_AKENOSTOREDKM = 4, XHDCP22_RX_MSG_ID_AKESTOREDKM = 5, XHDCP22_RX_MSG_ID_AKESENDHPRIME = 7, XHDCP22_RX_MSG_ID_AKESENDPAIRINGINFO = 8, XHDCP22_RX_MSG_ID_LCINIT = 9, XHDCP22_RX_MSG_ID_LCSENDLPRIME = 10, XHDCP22_RX_MSG_ID_SKESENDEKS = 11, XHDCP22_RX_MSG_ID_REPEATERAUTHSENDRXIDLIST = 12, XHDCP22_RX_MSG_ID_REPEATERAUTHSENDACK = 15, XHDCP22_RX_MSG_ID_REPEATERAUTHSTREAMMANAGE = 16, XHDCP22_RX_MSG_ID_REPEATERAUTHSTREAMREADY = 17 }
| These constants are the message identification codes. More...
enum | XHdcp22_Rx_ErrorFlag { XHDCP22_RX_ERROR_FLAG_NONE = 0, XHDCP22_RX_ERROR_FLAG_MESSAGE_SIZE = 1, XHDCP22_RX_ERROR_FLAG_FORCE_RESET = 2, XHDCP22_RX_ERROR_FLAG_PROCESSING_AKEINIT = 4, XHDCP22_RX_ERROR_FLAG_PROCESSING_AKENOSTOREDKM = 8, XHDCP22_RX_ERROR_FLAG_PROCESSING_AKESTOREDKM = 16, XHDCP22_RX_ERROR_FLAG_PROCESSING_LCINIT = 32, XHDCP22_RX_ERROR_FLAG_PROCESSING_SKESENDEKS = 64, XHDCP22_RX_ERROR_FLAG_PROCESSING_REPEATERAUTHSENDACK = 128, XHDCP22_RX_ERROR_FLAG_PROCESSING_REPEATERAUTHSTREAMMANAGE = 256, XHDCP22_RX_ERROR_FLAG_LINK_INTEGRITY = 512, XHDCP22_RX_ERROR_FLAG_DDC_BURST = 1024, XHDCP22_RX_ERROR_FLAG_MAX_LCINIT_ATTEMPTS = 2048, XHDCP22_RX_ERROR_FLAG_MAX_REPEATER_TOPOLOGY = 4096, XHDCP22_RX_ERROR_FLAG_EMPTY_REPEATER_TOPOLOGY = 8192 }
| These constants define the error conditions encountered during authentication and key exchange. More...
enum | XHdcp22_Rx_DdcFlag { XHDCP22_RX_DDC_FLAG_NONE = 0, XHDCP22_RX_DDC_FLAG_WRITE_MESSAGE_READY = 1, XHDCP22_RX_DDC_FLAG_READ_MESSAGE_READY = 2 }
| 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. More...
enum | Xhdcp22_Rx_DpcdFlag { XHDCP22_RX_DPCD_FLAG_NONE, XHDCP22_RX_DPCD_FLAG_AKE_INIT_RCVD = 0x001, XHDCP22_RX_DPCD_FLAG_AKE_NO_STORED_KM_RCVD = 0x002, XHDCP22_RX_DPCD_FLAG_AKE_STORED_KM_RCVD = 0x004, XHDCP22_RX_DPCD_FLAG_LC_INIT_RCVD = 0x008, XHDCP22_RX_DPCD_FLAG_SKE_SEND_EKS_RCVD = 0x010, XHDCP22_RX_DPCD_FLAG_HPRIME_READ_DONE = 0x020, XHDCP22_RX_DPCD_FLAG_PAIRING_INFO_READ_DONE = 0x040, XHDCP22_RX_DPCD_FLAG_RPTR_RCVID_LST_ACK_READ_DONE = 0x080, XHDCP22_RX_DPCD_FLAG_RPTR_STREAM_MANAGE_READ_DONE = 0x100 }
| These constants defines the DPCD flags used to determine when messages are available in the DPCD registers. More...
enum | XHdcp22_Rx_LogData { XHDCP22_RX_LOG_INFO_RESET, XHDCP22_RX_LOG_INFO_ENABLE, XHDCP22_RX_LOG_INFO_DISABLE, XHDCP22_RX_LOG_INFO_REQAUTH_REQ, XHDCP22_RX_LOG_INFO_ENCRYPTION_ENABLE, XHDCP22_RX_LOG_INFO_TOPOLOGY_UPDATE, XHDCP22_RX_LOG_DEBUG_WRITE_MESSAGE_AVAILABLE, XHDCP22_RX_LOG_DEBUG_READ_MESSAGE_COMPLETE, XHDCP22_RX_LOG_DEBUG_COMPUTE_RSA, XHDCP22_RX_LOG_DEBUG_COMPUTE_RSA_DONE, XHDCP22_RX_LOG_DEBUG_COMPUTE_KM, XHDCP22_RX_LOG_DEBUG_COMPUTE_KM_DONE, XHDCP22_RX_LOG_DEBUG_COMPUTE_HPRIME, XHDCP22_RX_LOG_DEBUG_COMPUTE_HPRIME_DONE, XHDCP22_RX_LOG_DEBUG_COMPUTE_EKH, XHDCP22_RX_LOG_DEBUG_COMPUTE_EKH_DONE, XHDCP22_RX_LOG_DEBUG_COMPUTE_LPRIME, XHDCP22_RX_LOG_DEBUG_COMPUTE_LPRIME_DONE, XHDCP22_RX_LOG_DEBUG_COMPUTE_KS, XHDCP22_RX_LOG_DEBUG_COMPUTE_KS_DONE, XHDCP22_RX_LOG_DEBUG_COMPUTE_VPRIME, XHDCP22_RX_LOG_DEBUG_COMPUTE_VPRIME_DONE, XHDCP22_RX_LOG_DEBUG_COMPUTE_MPRIME, XHDCP22_RX_LOG_DEBUG_COMPUTE_MPRIME_DONE, XHDCP22_RX_LOG_DEBUG_TIMER_START, XHDCP22_RX_LOG_DEBUG_TIMER_EXPIRED }
| These constants are the detailed logging events. More...
enum | XHdcp22_Rx_TestFlags { XHDCP22_RX_TEST_FLAG_NONE, XHDCP22_RX_TEST_FLAG_NOSTOREDKM_WITH_RECEIVER, XHDCP22_RX_TEST_FLAG_STOREDKM_WITH_RECEIVER, XHDCP22_RX_TEST_FLAG_NOSTOREDKM_WITH_REPEATER, XHDCP22_RX_TEST_FLAG_STOREDKM_WITH_REPEATER, XHDCP22_RX_TEST_FLAG_REPEATER_MISORDERED_SEQUENCE_1, XHDCP22_RX_TEST_FLAG_REPEATER_MISORDERED_SEQUENCE_2, XHDCP22_RX_TEST_FLAG_REPEATER_MISORDERED_SEQUENCE_3, XHDCP22_RX_TEST_FLAG_REPEATER_TOPOLOGY_CHANGE, XHDCP22_RX_TEST_FLAG_REPEATER_TOPOLOGY_TIMEOUT, XHDCP22_RX_TEST_FLAG_INVALID }
| These constants are used for setting up the desired unit test for standalong testing. More...
enum | XHdcp22_Rx_TestMode { XHDCP22_RX_TESTMODE_DISABLED, XHDCP22_RX_TESTMODE_NO_TX, XHDCP22_RX_TESTMODE_SW_TX, XHDCP22_RX_TESTMODE_INVALID }
| These constants are used to set the cores test mode. More...
enum | XHdcp22_Rx_TestDdcAccess { XHDCP22_RX_TEST_DDC_ACCESS_WO, XHDCP22_RX_TEST_DDC_ACCESS_RO, XHDCP22_RX_TEST_DDC_ACCESS_RW }
| These constants define the test ddc access types for standalone self testing. More...
enum | XHdcp22_Rx_TestState
| These constants are the discrete event states for standalone self testing. More...

## Functions
int | XHdcp22Rx_Dp_CfgInitialize (XHdcp22_Rx_Dp *InstancePtr, XHdcp22_Rx_Dp_Config *ConfigPtr, UINTPTR EffectiveAddr)
| Initialize the instance provided by the caller based on the given configuration data. More...
int | XHdcp22Rx_Dp_Reset (XHdcp22_Rx_Dp *InstancePtr)
| This function resets the HDCP22-RX system to the default state. More...
int | XHdcp22Rx_Dp_Enable (XHdcp22_Rx_Dp *InstancePtr)
| This function enables the HDCP22-RX state machine. More...
int | XHdcp22Rx_Dp_Disable (XHdcp22_Rx_Dp *InstancePtr)
| This function disables the HDCP22-RX state machine. More...
int | XHdcp22Rx_Dp_SetCallback (XHdcp22_Rx_Dp *InstancePtr, XHdcp22_Rx_Dp_HandlerType HandlerType, void *CallbackFunc, void *CallbackRef)
| This function installs callback functions for the given HandlerType: More...
int | XHdcp22Rx_Dp_Poll (XHdcp22_Rx_Dp *InstancePtr)
| This function executes the HDCP22-RX state machine. More...
u8 | XHdcp22Rx_Dp_IsEnabled (XHdcp22_Rx_Dp *InstancePtr)
| This function checks if the HDCP22-RX state machine is enabled. More...
u8 | XHdcp22Rx_Dp_IsEncryptionEnabled (XHdcp22_Rx_Dp *InstancePtr)
| This function checks if the HDCP22-RX cipher encryption is enabled. More...
u8 | XHdcp22Rx_Dp_IsInProgress (XHdcp22_Rx_Dp *InstancePtr)
| This function checks if the HDCP22-RX state machine is enabled but not yet in the Authenticated state. More...
u8 | XHdcp22Rx_Dp_IsAuthenticated (XHdcp22_Rx_Dp *InstancePtr)
| This function checks if the HDCP22-RX state machine is in the Authenticated state. More...
u8 | XHdcp22Rx_Dp_IsError (XHdcp22_Rx_Dp *InstancePtr)
| This function checks if the HDCP22-RX state machine has detected an error condition. More...
u8 | XHdcp22Rx_Dp_IsRepeater (XHdcp22_Rx_Dp *InstancePtr)
| This function returns the current repeater mode status. More...
void | XHdcp22Rx_Dp_SetRepeater (XHdcp22_Rx_Dp *InstancePtr, u8 Set)
| This function sets the repeater mode status. More...
void | XHdcp22Rx_Dp_SetLinkError (XHdcp22_Rx_Dp *InstancePtr)
| This function is called when 50 consecutive data island ECC errors are detected indicating a link integrity problem. More...
void | XHdcp22Rx_Dp_SetDdcError (XHdcp22_Rx_Dp *InstancePtr)
| This function is called when a DDC read/write burst stops prior to completing the expected message size. More...
void | XHdcp22Rx_Dp_SetWriteMessageAvailable (XHdcp22_Rx_Dp *InstancePtr)
| This function is called when a complete message is available in the write message buffer. More...
void | XHdcp22Rx_Dp_SetReadMessageComplete (XHdcp22_Rx_Dp *InstancePtr)
| This function is called when a message has been read out of the read message buffer. More...
void | XHdcp22Rx_Dp_LoadLc128 (XHdcp22_Rx_Dp *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_Dp_LoadPublicCert (XHdcp22_Rx_Dp *InstancePtr, const u8 *PublicCertPtr)
| This function is used to load the public certificate. More...
int | XHdcp22Rx_Dp_LoadPrivateKey (XHdcp22_Rx_Dp *InstancePtr, const u8 *PrivateKeyPtr)
| This function is used to load the private key. More...
u32 | XHdcp22Rx_Dp_GetVersion (XHdcp22_Rx_Dp *InstancePtr)
| This function reads the version. More...
XTmrCtr * | XHdcp22Rx_Dp_GetTimer (XHdcp22_Rx_Dp *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_Dp_SetTopology (XHdcp22_Rx_Dp *InstancePtr, const XHdcp22_Rx_Dp_Topology *TopologyPtr)
| This function copies a complete repeater topology table into the instance repeater topology table. More...
void | XHdcp22Rx_Dp_SetTopologyReceiverIdList (XHdcp22_Rx_Dp *InstancePtr, const u8 *ListPtr, u32 ListSize)
| This function copies the RECEIVER_ID_LIST into the repeater topology table. More...
void | XHdcp22Rx_Dp_SetTopologyField (XHdcp22_Rx_Dp *InstancePtr, XHdcp22_Rx_Dp_TopologyField Field, u8 Value)
| This function is used to set various fields inside the topology structure. More...
void | XHdcp22Rx_Dp_SetTopologyUpdate (XHdcp22_Rx_Dp *InstancePtr)
| This function is used to indicate that the topology table has been updated and is ready for upstream propagation. More...
u8 | XHdcp22Rx_Dp_GetContentStreamType (XHdcp22_Rx_Dp *InstancePtr)
| This function is gets the type information received from the RepeaterAuth_Stream_Manage message for downstream propagation of management information. More...
void | XHdcp22Rx_Dp_TimerHandler (void *CallbackRef, u8 TmrCntNumber)
| This function handles timer interrupts. More...
void | XHdcp22Rx_Dp_LogReset (XHdcp22_Rx_Dp *InstancePtr, u8 Verbose)
| This function clears the log pointers. More...
u32 | XHdcp22Rx_Dp_LogGetTimeUSecs (XHdcp22_Rx_Dp *InstancePtr)
| This function returns the time expired since a log reset was called. More...
void | XHdcp22Rx_Dp_LogWr (XHdcp22_Rx_Dp *InstancePtr, u16 Evt, u16 Data)
| This function writes HDCP22-RX log event into buffer. More...
XHdcp22_Rx_Dp_LogItem * | XHdcp22Rx_Dp_LogRd (XHdcp22_Rx_Dp *InstancePtr)
| This function provides the log information from the log buffer. More...
void | XHdcp22Rx_Dp_LogDisplay (XHdcp22_Rx_Dp *InstancePtr)
| This function prints the contents of the log buffer. More...
void | XHdcp22Rx_Dp_Info (XHdcp22_Rx_Dp *InstancePtr)
| This function prints the state machine information. More...
void | XHdcp22Rx_Dp_SetDpcdMsgRdWrtAvailable (XHdcp22_Rx_Dp *InstancePtr, u32 type)
| This function is to set the DPCD flag if any DPCD read/write interrupts occurred. More...
void | XHdcp22Rx_Dp_SetHdcp22OverProtocol (XHdcp22_Rx_Dp *InstancePtr, XHdcp22_Rx_Dp_Protocol protocol)
| This function is to set the protocol (HDMI/DP) over which HDCP22 is happening. More...
void | XHdcp22_Dp_timer_attach (XHdcp22_Rx_Dp *InstancePtr, XTmrCtr *TmrCtrPtr)
| This function is to attache the HDCP22 timer instance to DP RX subsystem's timer. More...
void | XHdcp22_Dp_RxSetLaneCount (XHdcp22_Rx_Dp *InstancePtr, u8 LaneCount)
| This function set the lane count of an hdcp22 interface. More...
u32 | XHdcp22_Dp_RxSetRxCaps (XHdcp22_Rx_Dp *InstancePtr, u8 enable)
| This function sets the Rx_Caps in DPCD. More...
void | XHdcp22_Dp_RxSetStreamType (XHdcp22_Rx_Dp *InstancePtr)
| This function sets Stream Type. More...
void | XHdcp22_Dp_RxSetReauthReq (XHdcp22_Rx_Dp *InstancePtr)
| This function sets Reauth Request for upstream device. More...
XHdcp22_Rx_Dp_Config * | XHdcp22Rx_Dp_LookupConfig (u16 DeviceId)
| This function returns a reference to an XHdcp22_Rx_Dp_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_Dp *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_Dp *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...

## Macro Definition Documentation

#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_Dp_LogRd(), and XHdcp22Rx_Dp_LogWr().

#define XHDCP22_RX_MAX_MESSAGE_SIZE 534

Maximum message size.

#define XHDCP22_RX_REPEATERAUTH_ACK_INTERVAL 2000

2sec RepeaterAuth Ack interval

## Typedef Documentation

typedef u32(* XHdcp22_Rx_GetHandler)(void *HandlerRef)

Type for pointer to single input function with a return value.

typedef u32(* Xhdcp22_Rx_RdWrHandler)(void *HandlerRef, u32 offset, u8 *buf, u32 size)

Type for pointer to four 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.

## Enumeration Type Documentation

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.

Enumerator
XHDCP22_RX_DDC_FLAG_NONE | Clear DDC flag.
XHDCP22_RX_DDC_FLAG_WRITE_MESSAGE_READY | Write message buffer ready to read.
XHDCP22_RX_DDC_FLAG_READ_MESSAGE_READY | Read message buffer ready to write.

enum XHdcp22_Rx_Dp_AuthenticationType

These constants define the authentication status.

Enumerator
XHDCP22_RX_UNAUTHENTICATED | Unauthenticated.
XHDCP22_RX_AUTHENTICATION_BUSY | Authentication Busy.
XHDCP22_RX_AUTHENTICATED | Authenticated.
XHDCP22_RX_REAUTHENTICATE_REQUESTED | Reauthentication requested.

enum XHdcp22_Rx_Dp_HandlerType

These constants are used to identify callback functions.

Enumerator
XHDCP22_RX_HANDLER_UNDEFINED | Undefined.
XHDCP22_RX_HANDLER_DDC_SETREGADDR | Set the DDC register address.
XHDCP22_RX_HANDLER_DDC_SETREGDATA | Set the DDC register data.
XHDCP22_RX_HANDLER_DDC_GETREGDATA | Get the DDC register data.
XHDCP22_RX_HANDLER_DDC_GETWBUFSIZE | Get the DDC the write buffer size.
XHDCP22_RX_HANDLER_DDC_GETRBUFSIZE | Get the DDC the read buffer size.
XHDCP22_RX_HANDLER_DDC_ISWBUFEMPTY | Check if the DDC write buffer is empty.
XHDCP22_RX_HANDLER_DDC_ISRBUFEMPTY | Check if the DDC read buffer is empty.
XHDCP22_RX_HANDLER_DDC_CLEARRBUF | Clear the DDC read buffer.
XHDCP22_RX_HANDLER_DDC_CLEARWBUF | Clear the DDC write buffer.
XHDCP22_RX_HANDLER_AUTHENTICATED | Executed when state machine transitions to authenticated.
XHDCP22_RX_HANDLER_UNAUTHENTICATED | Executed when state machine transitions to unauthenticated.
XHDCP22_RX_HANDLER_AUTHENTICATION_REQUEST | Executed when authentication request is received.
XHDCP22_RX_HANDLER_TOPOLOGY_UPDATE | Executed when state machine is ready for the topology update.
XHDCP22_RX_HANDLER_STREAM_MANAGE_REQUEST | Executed when stream management request is received.
XHDCP22_RX_HANDLER_ENCRYPTION_UPDATE | Executed when encryption status update.
XHDCP22_RX_HANDLER_DP_AUX_READ | Get the DP AUX register data.
XHDCP22_RX_HANDLER_DP_AUX_WRITE | Set the DP AUX register data.
XHDCP22_RX_HANDLER_DP_CP_IRQ_SET | To raise CP_IRQ from DP Rx.
XHDCP22_RX_HANDLER_DP_AUX_DEFER_SET_CLR | To Set or clear AUX DEFFERS for HDCP22 msgs.
XHDCP22_RX_HANDLER_SKE_SEND_EKS | Executed when Ks message is received.
XHDCP22_RX_HANDLER_INVALID | Invalid.

enum XHdcp22_Rx_Dp_LogEvt

These constants are the general logging events.

Enumerator
XHDCP22_RX_LOG_EVT_INFO | Log Event None.
XHDCP22_RX_LOG_EVT_INFO_STATE | Log General Info Event.
XHDCP22_RX_LOG_EVT_INFO_MESSAGE | Log State Info Event.
XHDCP22_RX_LOG_EVT_DEBUG | Log Messsage Info Event.
XHDCP22_RX_LOG_EVT_ERROR | Log Debug Event.
XHDCP22_RX_LOG_EVT_USER | Log Error Event.
XHDCP22_RX_LOG_EVT_INVALID | User logging. Last value the list, only used for checking

enum XHdcp22_Rx_Dp_Mode

These constants are used to define the mode.

Enumerator
XHDCP22_RX_RECEIVER | HDCP22 receiver.
XHDCP22_RX_REPEATER | HDCP22 repeater upstream interface.
XHDCP22_RX_CONVERTER | HDCP22 converter upstream interface.

enum XHdcp22_Rx_Dp_Protocol

These constants are used to define the protocol.

Enumerator
XHDCP22_RX_DP | HDCP22 over DP.
XHDCP22_RX_HDMI | HDCP22 over HDMI.

enum XHdcp22_Rx_Dp_StateType

These constants are the authentication and key exchange states.

Enumerator
XHDCP22_RX_STATE_UNDEFINED | Undefined.
XHDCP22_RX_STATE_B0_WAIT_AKEINIT | Unauthenticated.
XHDCP22_RX_STATE_B1_SEND_AKESENDCERT | Compute Km: Send AKE_Send_Cert.
XHDCP22_RX_STATE_B1_WAIT_AKEKM | Compute Km: Wait for AKE_No_Stored_km or AKE_Stored_km.
XHDCP22_RX_STATE_B1_SEND_AKESENDHPRIME | Compute Km: Send AKE_Send_H_prime.
XHDCP22_RX_STATE_B1_SEND_AKESENDPAIRINGINFO | Compute Km: Send AKE_Send_Pairing_Info.
XHDCP22_RX_STATE_B1_WAIT_LCINIT | Compute Km: Wait for LCInit.
XHDCP22_RX_STATE_B2_SEND_LCSENDLPRIME | Compute L': Send LC_Send_L_prime.
XHDCP22_RX_STATE_B2_WAIT_SKESENDEKS | Compute L': Wait for SKE_Send_Eks.
XHDCP22_RX_STATE_B3_COMPUTE_KS | Compute Ks.
XHDCP22_RX_STATE_B4_AUTHENTICATED | Receiver Authenticated.
XHDCP22_RX_STATE_C4_WAIT_FOR_DOWNSTREAM | Wait for Downstream.
XHDCP22_RX_STATE_C5_SEND_RECEIVERIDLIST | Assemble Receiver ID List: Send RepeaterAuth_Send_ReceiverID_List.
XHDCP22_RX_STATE_C5_SEND_RECEIVERIDLIST_DONE | Assemble Receiver ID List: Send RepeaterAuth_Send_ReceiverID_List Done.
XHDCP22_RX_STATE_C6_VERIFY_RECEIVERIDLISTACK | Verify Receiver ID List Acknowledgement.
XHDCP22_RX_STATE_C7_WAIT_STREAM_MANAGEMENT | Content Stream Management: Wait for RepeaterAuth_Stream_Manage.
XHDCP22_RX_STATE_C7_SEND_STREAM_READY | Content Stream Management: Send RepeaterAuth_Stream_Ready.
XHDCP22_RX_STATE_C7_SEND_STREAM_READY_DONE | Content Stream Management: Send RepeaterAuth_Stream_Ready Done.
XHDCP22_RX_STATE_C8_AUTHENTICATED | Repeater Authenticated.
XHDCP22_RX_STATE_INVALID | Invalid.

enum XHdcp22_Rx_Dp_TopologyField

These constants are used to identify fields inside the topology structure.

enum Xhdcp22_Rx_DpcdFlag

These constants defines the DPCD flags used to determine when messages are available in the DPCD registers.

Enumerator
XHDCP22_RX_DPCD_FLAG_NONE | Clear DPCD flag.
XHDCP22_RX_DPCD_FLAG_AKE_INIT_RCVD | Ake_Init Msg Rcvd Flag.
XHDCP22_RX_DPCD_FLAG_AKE_NO_STORED_KM_RCVD | Ake_No_Stored_Km Msg Rcvd Flag.
XHDCP22_RX_DPCD_FLAG_AKE_STORED_KM_RCVD | Ake_Stored_Km Msg Rcvd Flag.
XHDCP22_RX_DPCD_FLAG_LC_INIT_RCVD | Lc_Init Msg Rcvd Flag.
XHDCP22_RX_DPCD_FLAG_SKE_SEND_EKS_RCVD | Ske_Send_Eks Msg Rcvd Flag.
XHDCP22_RX_DPCD_FLAG_HPRIME_READ_DONE | H' Msg Read done Flag.
XHDCP22_RX_DPCD_FLAG_PAIRING_INFO_READ_DONE | Pairing info Read done Flag.
XHDCP22_RX_DPCD_FLAG_RPTR_RCVID_LST_ACK_READ_DONE | Repeater Receiver ID List Ack Read done Flag.
XHDCP22_RX_DPCD_FLAG_RPTR_STREAM_MANAGE_READ_DONE | Repeater Stream manage Read done Flag.

enum XHdcp22_Rx_ErrorFlag

These constants define the error conditions encountered during authentication and key exchange.

Enumerator
XHDCP22_RX_ERROR_FLAG_NONE | No errors.
XHDCP22_RX_ERROR_FLAG_MESSAGE_SIZE | Message size error.
XHDCP22_RX_ERROR_FLAG_FORCE_RESET | Force reset after error.
XHDCP22_RX_ERROR_FLAG_PROCESSING_AKEINIT | AKE_Init message processing error.
XHDCP22_RX_ERROR_FLAG_PROCESSING_AKENOSTOREDKM | AKE_No_Stored_km message processing error.
XHDCP22_RX_ERROR_FLAG_PROCESSING_AKESTOREDKM | AKE_Stored_km message processing error.
XHDCP22_RX_ERROR_FLAG_PROCESSING_LCINIT | LC_Init message processing error.
XHDCP22_RX_ERROR_FLAG_PROCESSING_SKESENDEKS | SKE_Send_Eks message processing error.
XHDCP22_RX_ERROR_FLAG_PROCESSING_REPEATERAUTHSENDACK | RepeaterAuthSendAck message processing error.
XHDCP22_RX_ERROR_FLAG_PROCESSING_REPEATERAUTHSTREAMMANAGE | RepeaterAuthStreamManage message processing error.
XHDCP22_RX_ERROR_FLAG_LINK_INTEGRITY | Link integrity check error.
XHDCP22_RX_ERROR_FLAG_DDC_BURST | DDC message burst read/write error.
XHDCP22_RX_ERROR_FLAG_MAX_LCINIT_ATTEMPTS | Maximum LC_Init attempts error.
XHDCP22_RX_ERROR_FLAG_MAX_REPEATER_TOPOLOGY | Maximum LC_Init attempts error.
XHDCP22_RX_ERROR_FLAG_EMPTY_REPEATER_TOPOLOGY | Maximum LC_Init attempts error.

enum XHdcp22_Rx_LogData

These constants are the detailed logging events.

Enumerator
XHDCP22_RX_LOG_INFO_RESET | Reset event.
XHDCP22_RX_LOG_INFO_ENABLE | Enable event.
XHDCP22_RX_LOG_INFO_DISABLE | Disable event.
XHDCP22_RX_LOG_INFO_REQAUTH_REQ | Reauthentication request.
XHDCP22_RX_LOG_INFO_ENCRYPTION_ENABLE | Encryption enabled.
XHDCP22_RX_LOG_INFO_TOPOLOGY_UPDATE | Topology update triggered.
XHDCP22_RX_LOG_DEBUG_WRITE_MESSAGE_AVAILABLE | Write message available.
XHDCP22_RX_LOG_DEBUG_READ_MESSAGE_COMPLETE | Read message complete.
XHDCP22_RX_LOG_DEBUG_COMPUTE_RSA | RSA decryption of Km computation start.
XHDCP22_RX_LOG_DEBUG_COMPUTE_RSA_DONE | RSA decryption of Km computation done.
XHDCP22_RX_LOG_DEBUG_COMPUTE_KM | Authentication Km computation start.
XHDCP22_RX_LOG_DEBUG_COMPUTE_KM_DONE | Authentication Km computation done.
XHDCP22_RX_LOG_DEBUG_COMPUTE_HPRIME | Authentication HPrime computation start.
XHDCP22_RX_LOG_DEBUG_COMPUTE_HPRIME_DONE | Authentication HPrime computation done.
XHDCP22_RX_LOG_DEBUG_COMPUTE_EKH | Pairing EKh computation start.
XHDCP22_RX_LOG_DEBUG_COMPUTE_EKH_DONE | Pairing Ekh computation done.
XHDCP22_RX_LOG_DEBUG_COMPUTE_LPRIME | Locality check LPrime computation start.
XHDCP22_RX_LOG_DEBUG_COMPUTE_LPRIME_DONE | Locality check LPrime computation done.
XHDCP22_RX_LOG_DEBUG_COMPUTE_KS | Session key exchange Ks computation start.
XHDCP22_RX_LOG_DEBUG_COMPUTE_KS_DONE | Session key exchange Ks computation done.
XHDCP22_RX_LOG_DEBUG_COMPUTE_VPRIME | Locality check VPrime computation start.
XHDCP22_RX_LOG_DEBUG_COMPUTE_VPRIME_DONE | Locality check VPrime computation start.
XHDCP22_RX_LOG_DEBUG_COMPUTE_MPRIME | Locality check MPrime computation start.
XHDCP22_RX_LOG_DEBUG_COMPUTE_MPRIME_DONE | Locality check MPrime computation start.
XHDCP22_RX_LOG_DEBUG_TIMER_START | Start protocol timer.
XHDCP22_RX_LOG_DEBUG_TIMER_EXPIRED | Timer expired.

enum XHdcp22_Rx_MessageIds

These constants are the message identification codes.

Enumerator
XHDCP22_RX_MSG_ID_AKEINIT | AKE_Init message ID.
XHDCP22_RX_MSG_ID_AKESENDCERT | AKE_Send_Cert message ID.
XHDCP22_RX_MSG_ID_AKENOSTOREDKM | AKE_No_Stored_km message ID.
XHDCP22_RX_MSG_ID_AKESTOREDKM | AKE_Stored_km message ID.
XHDCP22_RX_MSG_ID_AKESENDHPRIME | AKE_Send_H_prime message ID.
XHDCP22_RX_MSG_ID_AKESENDPAIRINGINFO | AKE_Send_Pairing_Info message ID.
XHDCP22_RX_MSG_ID_LCINIT | LC_Init message ID.
XHDCP22_RX_MSG_ID_LCSENDLPRIME | LC_Send_L_prime message ID.
XHDCP22_RX_MSG_ID_SKESENDEKS | SKE_Send_Eks message ID.
XHDCP22_RX_MSG_ID_REPEATERAUTHSENDRXIDLIST | RepeaterAuth_Send_ReceiverID_List message ID.
XHDCP22_RX_MSG_ID_REPEATERAUTHSENDACK | RepeaterAuth_Send_Ack message ID.
XHDCP22_RX_MSG_ID_REPEATERAUTHSTREAMMANAGE | RepeaterAuth_Stream_Manage message ID.
XHDCP22_RX_MSG_ID_REPEATERAUTHSTREAMREADY | RepeaterAuth_Stream_Ready message ID.

enum XHdcp22_Rx_TestDdcAccess

These constants define the test ddc access types for standalone self testing.

Enumerator
XHDCP22_RX_TEST_DDC_ACCESS_WO | Write-Only.
XHDCP22_RX_TEST_DDC_ACCESS_RO | Read-Only.
XHDCP22_RX_TEST_DDC_ACCESS_RW | Read-Write.

enum XHdcp22_Rx_TestFlags

These constants are used for setting up the desired unit test for standalong testing.

Enumerator
XHDCP22_RX_TEST_FLAG_NONE | No directed test.
XHDCP22_RX_TEST_FLAG_NOSTOREDKM_WITH_RECEIVER | Directed test flag [No_Stored_km with Receiver].
XHDCP22_RX_TEST_FLAG_STOREDKM_WITH_RECEIVER | Directed test flag [Stored_km with Receiver].
XHDCP22_RX_TEST_FLAG_NOSTOREDKM_WITH_REPEATER | Directed test flag [No_Stored_km with Repeater], Sequence: [List, ListAck, StreamManage, StreamReady].
XHDCP22_RX_TEST_FLAG_STOREDKM_WITH_REPEATER | Directed test flag [Stored_km with Repeater], Sequence: [List, ListAck, StreamManage, StreamReady].
XHDCP22_RX_TEST_FLAG_REPEATER_MISORDERED_SEQUENCE_1 | Directed test flag [Repeater Misordered Sequence 1], Sequence: [StreamManage, StreamReady, List, ListAck].
XHDCP22_RX_TEST_FLAG_REPEATER_MISORDERED_SEQUENCE_2 | Directed test flag [Repeater Misordered Sequence 2], Sequence [List, StreamManage, StreamReady, ListAck].
XHDCP22_RX_TEST_FLAG_REPEATER_MISORDERED_SEQUENCE_3 | Directed test flag [Repeater Misordered Sequence 3], Sequence [List, StreamManage, ListAck, StreamReady].
XHDCP22_RX_TEST_FLAG_REPEATER_TOPOLOGY_CHANGE | Directed test flag [Repeater Topology Change].
XHDCP22_RX_TEST_FLAG_REPEATER_TOPOLOGY_TIMEOUT | Directed test flag [Repeater Topology Timeout].
XHDCP22_RX_TEST_FLAG_INVALID | Last value the list, only used for checking.

enum XHdcp22_Rx_TestMode

These constants are used to set the cores test mode.

Enumerator
XHDCP22_RX_TESTMODE_DISABLED | Test mode disabled.
XHDCP22_RX_TESTMODE_NO_TX | Test mode to emulate transmitter internally used for unit testing.
XHDCP22_RX_TESTMODE_SW_TX | Test mode to emulate transmitter externally used for loopback testing.
XHDCP22_RX_TESTMODE_INVALID | Last value the list, only used for checking.

enum XHdcp22_Rx_TestState

These constants are the discrete event states for standalone self testing.

## Function Documentation

void XHdcp22_Dp_RxSetLaneCount | ( | XHdcp22_Rx_Dp * | InstancePtr,
|  | u8 | LaneCount
| ) |  |

This function set the lane count of an hdcp22 interface.

Parameters

  InstancePtr | is the receiver instance.
  LaneCount | is the number of lanes of the interface.

Returns
  None

Note
  None.

References XHdcp22_Rx_Dp::CipherInst.

void XHdcp22_Dp_RxSetReauthReq | ( | XHdcp22_Rx_Dp * | InstancePtr | ) |

This function sets Reauth Request for upstream device.

Parameters

  InstancePtr | is the receiver instance.

Returns
  None.

Note
  None.

u32 XHdcp22_Dp_RxSetRxCaps | ( | XHdcp22_Rx_Dp * | InstancePtr,
|  | u8 | enable
| ) |  |

This function sets the Rx_Caps in DPCD.

Parameters

  InstancePtr | is the receiver instance.
  Enable | is to set or clear Rx_Caps.

Returns
  XST_SUCCESS or XST_FAILURE.

Note
  None.

References XHdcp22_Rx_Dp::Handles, XHdcp22_Rx_Dp::RxCaps, XHdcp22_Rx_Dp_Handles::RxDpAuxWriteCallback, and XHdcp22_Rx_Dp_Handles::RxDpAuxWriteCallbackRef.

void XHdcp22_Dp_RxSetStreamType | ( | XHdcp22_Rx_Dp * | InstancePtr | ) |

This function sets Stream Type.

Parameters

  InstancePtr | is the receiver instance.

Returns
  None.

Note
  None.

References XHdcp22_Rx_Dp::CipherInst, XHdcp22_Rx_Dp::Handles, XHdcp22_Rx_Dp::Params, XHdcp22_Rx_Dp_Handles::RxDpAuxReadCallback, and XHdcp22_Rx_Dp_Handles::RxDpAuxReadCallbackRef.

void XHdcp22_Dp_timer_attach | ( | XHdcp22_Rx_Dp * | InstancePtr,
|  | XTmrCtr * | TmrCtrPtr
| ) |  |

This function is to attache the HDCP22 timer instance to DP RX subsystem's timer.

For the DP design the timer is being used from the DP subsyetem. So the HDCP22 timer instance will be attached in DpSs initialization.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.
  TmrCtrPtr | is the DpRx susbsystem's timer instance.

References XHdcp22_Rx_Dp::TimerInst.

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

Parameters

  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.

Returns
  XST_SUCCESS or FAILURE.

Note
  None.

Referenced by XHdcp22Rx_Dp_LoadPrivateKey().

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

Parameters

  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.

Returns
  None.

Note
  None.

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

Parameters

  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.

Returns
  None.

Note
  None.

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

Parameters

  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.

Returns
  None.

Note
  None.

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

Parameters

  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.

Returns
  None.

Note
  None.

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

Parameters

  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.

Returns
  None.

Note
  None.

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

Parameters

  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.

Returns
  None.

Note
  None.

int XHdcp22Rx_Dp_CfgInitialize | ( | XHdcp22_Rx_Dp * | InstancePtr,
|  | XHdcp22_Rx_Dp_Config * | ConfigPtr,
|  | UINTPTR | EffectiveAddr
| ) |  |

Initialize the instance provided by the caller based on the given configuration data.

Parameters

  InstancePtr | is a pointer to an XHdcp22_Rx_Dp 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.

Returns
  XST_SUCCESS or XST_FAILURE.

Note
  None.

References XHdcp22_Rx_Dp_Handles::AuthenticatedCallback, XHdcp22_Rx_Dp_Handles::AuthenticationRequestCallback, XHdcp22_Rx_Dp_Info::AuthenticationStatus, XHdcp22_Rx_Dp_Info::AuthRequestCnt, XHdcp22_Rx_Dp_Config::BaseAddress, XHdcp22_Rx_Dp::Config, XHdcp22_Rx_Dp_Info::CurrentState, XHdcp22_Rx_Dp_Handles::DdcClearReadBufferCallback, XHdcp22_Rx_Dp_Handles::DdcClearWriteBufferCallback, XHdcp22_Rx_Dp_Info::DdcErrorCnt, XHdcp22_Rx_Dp_Handles::DdcGetDataCallback, XHdcp22_Rx_Dp_Handles::DdcGetReadBufferSizeCallback, XHdcp22_Rx_Dp_Handles::DdcGetWriteBufferSizeCallback, XHdcp22_Rx_Dp_Handles::DdcIsReadBufferEmptyCallback, XHdcp22_Rx_Dp_Handles::DdcIsWriteBufferEmptyCallback, XHdcp22_Rx_Dp_Handles::DdcSetAddressCallback, XHdcp22_Rx_Dp_Handles::DdcSetDataCallback, XHdcp22_Rx_Dp_Info::ErrorFlag, XHdcp22_Rx_Dp_Info::ErrorFlagSticky, XHdcp22_Rx_Dp::Handles, XHdcp22_Rx_Dp_Info::HasStreamManagementInfo, XHdcp22_Rx_Dp::Info, XHdcp22_Rx_Dp_Handles::IsAuthenticatedCallbackSet, XHdcp22_Rx_Dp_Handles::IsAuthenticationRequestCallbackSet, XHdcp22_Rx_Dp_Handles::IsDdcAllCallbacksSet, XHdcp22_Rx_Dp_Handles::IsDdcClearReadBufferCallbackSet, XHdcp22_Rx_Dp_Handles::IsDdcClearWriteBufferCallbackSet, XHdcp22_Rx_Dp_Handles::IsDdcGetDataCallbackSet, XHdcp22_Rx_Dp_Handles::IsDdcGetReadBufferSizeCallbackRefSet, XHdcp22_Rx_Dp_Handles::IsDdcGetWriteBufferSizeCallbackSet, XHdcp22_Rx_Dp_Handles::IsDdcIsReadBufferEmptyCallbackSet, XHdcp22_Rx_Dp_Handles::IsDdcIsWriteBufferEmptyCallbackSet, XHdcp22_Rx_Dp_Handles::IsDdcSetAddressCallbackSet, XHdcp22_Rx_Dp_Handles::IsDdcSetDataCallbackSet, XHdcp22_Rx_Dp_Info::IsEnabled, XHdcp22_Rx_Dp_Info::IsEncrypted, XHdcp22_Rx_Dp_Info::IsNoStoredKm, XHdcp22_Rx_Dp::IsReady, XHdcp22_Rx_Dp_Handles::IsRxDpAuxReadCallbackSet, XHdcp22_Rx_Dp_Handles::IsRxDpAuxWriteCallbackSet, XHdcp22_Rx_Dp_Handles::IsRxDpCpIrqSetCallbackSet, XHdcp22_Rx_Dp_Handles::IsRxDpSetClearAuxDeferCallbackSet, XHdcp22_Rx_Dp_Handles::IsSke_Send_EksCallbackSet, XHdcp22_Rx_Dp_Handles::IsStreamManageRequestCallbackSet, XHdcp22_Rx_Dp_Handles::IsTopologyUpdateCallbackSet, XHdcp22_Rx_Dp_Info::IsTopologyValid, XHdcp22_Rx_Dp_Info::LCInitAttempts, XHdcp22_Rx_Dp_Info::LinkErrorCnt, XHdcp22_Rx_Dp_Config::Mode, XHdcp22_Rx_Dp_Info::NextState, XHdcp22_Rx_Dp_Info::ReauthReq, XHdcp22_Rx_Dp_Info::ReauthRequestCnt, XHdcp22_Rx_Dp_Info::ReturnState, XHdcp22_Rx_Dp::RxCaps, XHdcp22_Rx_Dp_Handles::RxDpAuxReadCallback, XHdcp22_Rx_Dp_Handles::RxDpAuxWriteCallback, XHdcp22_Rx_Dp_Handles::RxDpCpIrqSetCallback, XHdcp22_Rx_Dp_Handles::RxDpSetClearAuxDeferCallback, XHdcp22_Rx_Dp_Info::SeqNumV, XHdcp22_Rx_Dp_Handles::Ske_Send_EksCallback, XHdcp22_Rx_Dp_Info::SkipRead, XHdcp22_Rx_Dp::StateFunc, XHdcp22_Rx_Dp_Handles::StreamManageRequestCallback, XHdcp22_Rx_Dp_Info::TopologyReady, XHdcp22_Rx_Dp_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_Dp_LogReset().

int XHdcp22Rx_Dp_Disable | ( | XHdcp22_Rx_Dp * | 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.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.

Returns
  XST_SUCCESS or XST_FAILURE.

Note
  The HDCP22-RX cipher is disabled.

References XHdcp22_Rx_Dp_Info::AuthenticationStatus, XHdcp22_Rx_Dp::CipherInst, XHdcp22_Rx_Dp::Info, XHdcp22_Rx_Dp_Info::IsEnabled, XHdcp22_Rx_Dp::RngInst, XHDCP22_RX_AUTHENTICATED, XHDCP22_RX_LOG_EVT_INFO, XHDCP22_RX_LOG_INFO_DISABLE, and XHdcp22Rx_Dp_LogWr().

int XHdcp22Rx_Dp_Enable | ( | XHdcp22_Rx_Dp * | InstancePtr | ) |

This function enables the HDCP22-RX state machine.

The HDCP2Version register is set to active.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.

Returns
  XST_SUCCESS or XST_FAILURE.

Note
  Before enabling the state machine ensure that the instance has been initialized, DDC message handles have been assigned, and keys have been loaded.

References XHdcp22_Rx_Dp::CipherInst, XHdcp22_Rx_Dp::Config, XHdcp22_Rx_Dp::Handles, XHdcp22_Rx_Dp::Info, XHdcp22_Rx_Dp_Handles::IsDdcAllCallbacksSet, XHdcp22_Rx_Dp_Info::IsEnabled, XHdcp22_Rx_Dp::IsReady, XHdcp22_Rx_Dp::MmultInst, XHdcp22_Rx_Dp::PrivateKeyPtr, XHdcp22_Rx_Dp_Config::Protocol, XHdcp22_Rx_Dp::PublicCertPtr, XHdcp22_Rx_Dp::RngInst, XHdcp22_Rx_Dp::TimerInst, XHDCP22_RX_DP, XHDCP22_RX_LOG_EVT_INFO, XHDCP22_RX_LOG_INFO_ENABLE, and XHdcp22Rx_Dp_LogWr().

u8 XHdcp22Rx_Dp_GetContentStreamType | ( | XHdcp22_Rx_Dp * | 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.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.

Returns
  - 0x00: Type 0 Content Stream. May be transmitted by the HDCP Repeater to all HDCP Devices.
  - 0x01: Type 1 Content Stream. Must not be transmitted by the HDCP Repeater to HDCP 1.x-compliant Devices and HDCP 2.1-compliant Devices.
  - 0x02-0xFF: Reserved for future use only. Content Streams with reserved Type values must be treated similar to Type 1 Content Streams.

Note
  None.

References XHdcp22_Rx_Dp::Params.

Referenced by XHdcp22Rx_Dp_Info().

XTmrCtr * XHdcp22Rx_Dp_GetTimer | ( | XHdcp22_Rx_Dp * | InstancePtr | ) |

This function returns the pointer to the internal timer control instance needed for connecting the timer interrupt to an interrupt controller.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.

Returns
  A pointer to the internal timer control instance.

Note
  None.

References XHdcp22_Rx_Dp::TimerInst.

u32 XHdcp22Rx_Dp_GetVersion | ( | XHdcp22_Rx_Dp * | InstancePtr | ) |

This function reads the version.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.

Returns
  Returns the version register of the cipher.

Note
  None.

References XHdcp22_Rx_Dp::CipherInst.

void XHdcp22Rx_Dp_Info | ( | XHdcp22_Rx_Dp * | InstancePtr | ) |

This function prints the state machine information.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.

Returns
  None.

Note
  None.

References XHdcp22_Rx_Dp_Info::AuthenticationStatus, XHdcp22_Rx_Dp_Info::AuthRequestCnt, XHdcp22_Rx_Dp_Info::DdcErrorCnt, XHdcp22_Rx_Dp_Topology::Depth, XHdcp22_Rx_Dp_Topology::DeviceCnt, XHdcp22_Rx_Dp_Topology::Hdcp1DeviceDownstream, XHdcp22_Rx_Dp_Topology::Hdcp2LegacyDeviceDownstream, XHdcp22_Rx_Dp::Info, XHdcp22_Rx_Dp_Info::LinkErrorCnt, XHdcp22_Rx_Dp_Topology::MaxCascadeExceeded, XHdcp22_Rx_Dp_Topology::MaxDevsExceeded, XHdcp22_Rx_Dp_Info::ReauthRequestCnt, XHdcp22_Rx_Dp::Topology, XHDCP22_RX_AUTHENTICATED, XHDCP22_RX_AUTHENTICATION_BUSY, XHDCP22_RX_REAUTHENTICATE_REQUESTED, XHDCP22_RX_UNAUTHENTICATED, XHdcp22Rx_Dp_GetContentStreamType(), XHdcp22Rx_Dp_IsEnabled(), XHdcp22Rx_Dp_IsEncryptionEnabled(), and XHdcp22Rx_Dp_IsRepeater().

u8 XHdcp22Rx_Dp_IsAuthenticated | ( | XHdcp22_Rx_Dp * | InstancePtr | ) |

This function checks if the HDCP22-RX state machine is in the Authenticated state.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.

Returns
  TRUE or FALSE.

Note
  None.

References XHdcp22_Rx_Dp_Info::AuthenticationStatus, XHdcp22_Rx_Dp::Info, and XHDCP22_RX_AUTHENTICATED.

u8 XHdcp22Rx_Dp_IsEnabled | ( | XHdcp22_Rx_Dp * | InstancePtr | ) |

This function checks if the HDCP22-RX state machine is enabled.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.

Returns
  TRUE or FALSE.

Note
  None.

References XHdcp22_Rx_Dp::Info, and XHdcp22_Rx_Dp_Info::IsEnabled.

Referenced by XHdcp22Rx_Dp_Info().

u8 XHdcp22Rx_Dp_IsEncryptionEnabled | ( | XHdcp22_Rx_Dp * | InstancePtr | ) |

This function checks if the HDCP22-RX cipher encryption is enabled.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.

Returns
  TRUE or FALSE.

Note
  None.

References XHdcp22_Rx_Dp::CipherInst.

Referenced by XHdcp22Rx_Dp_Info().

u8 XHdcp22Rx_Dp_IsError | ( | XHdcp22_Rx_Dp * | InstancePtr | ) |

This function checks if the HDCP22-RX state machine has detected an error condition.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.

Returns
  TRUE or FALSE.

Note
  None.

References XHdcp22_Rx_Dp_Info::ErrorFlagSticky, XHdcp22_Rx_Dp::Info, and XHDCP22_RX_ERROR_FLAG_NONE.

u8 XHdcp22Rx_Dp_IsInProgress | ( | XHdcp22_Rx_Dp * | InstancePtr | ) |

This function checks if the HDCP22-RX state machine is enabled but not yet in the Authenticated state.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.

Returns
  TRUE or FALSE.

Note
  None.

References XHdcp22_Rx_Dp_Info::AuthenticationStatus, XHdcp22_Rx_Dp::Info, and XHDCP22_RX_AUTHENTICATION_BUSY.

u8 XHdcp22Rx_Dp_IsRepeater | ( | XHdcp22_Rx_Dp * | InstancePtr | ) |

This function returns the current repeater mode status.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.

Returns
  - TRUE if the HDCP 2.2 instance is the upstream port of a repeater
  - FALSE if the HDCP 2.2 instance is a receiver

References XHdcp22_Rx_Dp::Config, XHdcp22_Rx_Dp_Config::Mode, and XHDCP22_RX_RECEIVER.

Referenced by XHdcp22Rx_Dp_Info().

void XHdcp22Rx_Dp_LoadLc128 | ( | XHdcp22_Rx_Dp * | 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.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.
  Lc128Ptr | is a pointer to an array.

Returns
  None.

Note
  None.

References XHdcp22_Rx_Dp::CipherInst.

int XHdcp22Rx_Dp_LoadPrivateKey | ( | XHdcp22_Rx_Dp * | InstancePtr,
|  | const u8 * | PrivateKeyPtr
| ) |  |

This function is used to load the private key.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.
  PrivateKeyPtr | is a pointer to an array.

Returns
  - XST_SUCCESS if MMULT keys are calcualted correctly.
  - XST_FAILURE if MMULT keys are not calculated correctly.

Note
  None.

References XHdcp22_Rx_Dp::NPrimeP, XHdcp22_Rx_Dp::NPrimeQ, XHdcp22_Rx_Dp::PrivateKeyPtr, and XHdcp22Rx_CalcMontNPrime().

void XHdcp22Rx_Dp_LoadPublicCert | ( | XHdcp22_Rx_Dp * | InstancePtr,
|  | const u8 * | PublicCertPtr
| ) |  |

This function is used to load the public certificate.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.
  PublicCertPtr | is a pointer to an array.

Returns
  None.

Note
  None.

References XHdcp22_Rx_Dp::PublicCertPtr.

void XHdcp22Rx_Dp_LogDisplay | ( | XHdcp22_Rx_Dp * | InstancePtr | ) |

This function prints the contents of the log buffer.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.

Returns
  None.

Note
  None.

References XHdcp22_Rx_Dp_LogItem::Data, XHdcp22_Rx_Dp_LogItem::LogEvent, XHdcp22_Rx_Dp_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_Dp_LogRd().

u32 XHdcp22Rx_Dp_LogGetTimeUSecs | ( | XHdcp22_Rx_Dp * | InstancePtr | ) |

This function returns the time expired since a log reset was called.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.

Returns
  The expired logging time in useconds.

Note
  None.

References XHdcp22_Rx_Dp::TimerInst.

Referenced by XHdcp22Rx_Dp_LogWr().

XHdcp22_Rx_Dp_LogItem * XHdcp22Rx_Dp_LogRd | ( | XHdcp22_Rx_Dp * | InstancePtr | ) |

This function provides the log information from the log buffer.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.

Returns
  - Content of log buffer if log pointers are not equal.
  - Otherwise Zero.

Note
  None.

References XHdcp22_Rx_Dp_LogItem::Data, XHdcp22_Rx_Dp_Log::Head, XHdcp22_Rx_Dp::Log, XHdcp22_Rx_Dp_LogItem::LogEvent, XHdcp22_Rx_Dp_Log::LogItems, XHdcp22_Rx_Dp_Log::Tail, XHdcp22_Rx_Dp_LogItem::TimeStamp, and XHDCP22_RX_LOG_BUFFER_SIZE.

Referenced by XHdcp22Rx_Dp_LogDisplay().

void XHdcp22Rx_Dp_LogReset | ( | XHdcp22_Rx_Dp * | InstancePtr,
|  | u8 | Verbose
| ) |  |

This function clears the log pointers.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.
  Verbose | allows to add debug logging.

Returns
  None.

Note
  None.

References XHdcp22_Rx_Dp_Log::Head, XHdcp22_Rx_Dp::Log, XHdcp22_Rx_Dp_Log::Tail, XHdcp22_Rx_Dp::TimerInst, and XHdcp22_Rx_Dp_Log::Verbose.

Referenced by XHdcp22Rx_Dp_CfgInitialize().

void XHdcp22Rx_Dp_LogWr | ( | XHdcp22_Rx_Dp * | 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.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.
  Evt | specifies an action to be carried out.
  Data | specifies the information that gets written into log buffer.

Returns
  None.

Note
  None.

References XHdcp22_Rx_Dp_LogItem::Data, XHdcp22_Rx_Dp_Info::ErrorFlagSticky, XHdcp22_Rx_Dp_Log::Head, XHdcp22_Rx_Dp::Info, XHdcp22_Rx_Dp::Log, XHdcp22_Rx_Dp_LogItem::LogEvent, XHdcp22_Rx_Dp_Log::LogItems, XHdcp22_Rx_Dp_Log::Tail, XHdcp22_Rx_Dp_LogItem::TimeStamp, XHdcp22_Rx_Dp_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_Dp_LogGetTimeUSecs().

Referenced by XHdcp22Rx_Dp_Disable(), XHdcp22Rx_Dp_Enable(), XHdcp22Rx_Dp_Poll(), XHdcp22Rx_Dp_Reset(), XHdcp22Rx_Dp_SetDdcError(), XHdcp22Rx_Dp_SetDpcdMsgRdWrtAvailable(), XHdcp22Rx_Dp_SetLinkError(), XHdcp22Rx_Dp_SetReadMessageComplete(), XHdcp22Rx_Dp_SetTopologyUpdate(), XHdcp22Rx_Dp_SetWriteMessageAvailable(), XHdcp22Rx_Dp_TimerHandler(), and XHdcp22Rx_RsaesOaepDecrypt().

XHdcp22_Rx_Dp_Config * XHdcp22Rx_Dp_LookupConfig | ( | u16 | DeviceId | ) |

This function returns a reference to an XHdcp22_Rx_Dp_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.

Parameters

  DeviceId | is the unique core ID of the HDCP RX core for the lookup operation.

Returns
  XHdcp22Rx_Dp_LookupConfig returns a reference to a config record in the configuration table (in xhdmi_tx_g.c) corresponding to DeviceId, or NULL if no match is found.

Note
  None.

int XHdcp22Rx_Dp_Poll | ( | XHdcp22_Rx_Dp * | InstancePtr | ) |

This function executes the HDCP22-RX state machine.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.

Returns
  None.

Note
  State transitions are logged.

References XHdcp22_Rx_Dp_Info::AuthenticationStatus, XHdcp22_Rx_Dp_Info::CurrentState, XHdcp22_Rx_Dp::Info, XHdcp22_Rx_Dp_Info::IsEnabled, XHdcp22_Rx_Dp_Info::NextState, XHdcp22_Rx_Dp::StateFunc, XHDCP22_RX_LOG_EVT_INFO_STATE, and XHdcp22Rx_Dp_LogWr().

int XHdcp22Rx_Dp_Reset | ( | XHdcp22_Rx_Dp * | 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.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.

Returns
  XST_SUCCESS or XST_FAILURE.

Note
  The DDC message handles must be assigned by the XHdcp22Rx_SetDdcHandles function prior to calling this reset function.

References XHdcp22_Rx_Dp_Info::AuthenticationStatus, XHdcp22_Rx_Dp_Info::AuthRequestCnt, XHdcp22_Rx_Dp::CipherInst, XHdcp22_Rx_Dp::Config, XHdcp22_Rx_Dp_Info::CurrentState, XHdcp22_Rx_Dp_Info::DdcErrorCnt, XHdcp22_Rx_Dp_Info::ErrorFlag, XHdcp22_Rx_Dp_Info::ErrorFlagSticky, XHdcp22_Rx_Dp::Handles, XHdcp22_Rx_Dp_Info::HasStreamManagementInfo, XHdcp22_Rx_Dp::Info, XHdcp22_Rx_Dp_Handles::IsDdcAllCallbacksSet, XHdcp22_Rx_Dp_Info::IsEncrypted, XHdcp22_Rx_Dp_Info::IsNoStoredKm, XHdcp22_Rx_Dp_Info::IsTopologyValid, XHdcp22_Rx_Dp_Handles::IsUnauthenticatedCallbackSet, XHdcp22_Rx_Dp_Info::LCInitAttempts, XHdcp22_Rx_Dp_Info::LinkErrorCnt, XHdcp22_Rx_Dp::MessageBuffer, XHdcp22_Rx_Dp::MessageSize, XHdcp22_Rx_Dp_Info::NextState, XHdcp22_Rx_Dp_Config::Protocol, XHdcp22_Rx_Dp_Info::ReauthReq, XHdcp22_Rx_Dp_Info::ReauthRequestCnt, XHdcp22_Rx_Dp_Info::ReturnState, XHdcp22_Rx_Dp_Info::SeqNumV, XHdcp22_Rx_Dp_Info::SkipRead, XHdcp22_Rx_Dp::StateFunc, XHdcp22_Rx_Dp::Topology, XHdcp22_Rx_Dp_Info::TopologyReady, XHdcp22_Rx_Dp_Handles::UnauthenticatedCallback, XHdcp22_Rx_Dp_Handles::UnauthenticatedCallbackRef, XHDCP22_RX_AUTHENTICATED, XHDCP22_RX_DP, 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_Dp_LogWr().

int XHdcp22Rx_Dp_SetCallback | ( | XHdcp22_Rx_Dp * | InstancePtr,
|  | XHdcp22_Rx_Dp_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

Parameters

  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.

Returns
  - XST_SUCCESS if callback function installed successfully.
  - XST_INVALID_PARAM when HandlerType is invalid.

Note
  Invoking this function for a handler that already has been installed replaces it with the new handler.

References XHdcp22_Rx_Dp_Handles::AuthenticatedCallback, XHdcp22_Rx_Dp_Handles::AuthenticatedCallbackRef, XHdcp22_Rx_Dp_Handles::AuthenticationRequestCallback, XHdcp22_Rx_Dp_Handles::AuthenticationRequestCallbackRef, XHdcp22_Rx_Dp_Handles::DdcClearReadBufferCallback, XHdcp22_Rx_Dp_Handles::DdcClearReadBufferCallbackRef, XHdcp22_Rx_Dp_Handles::DdcClearWriteBufferCallback, XHdcp22_Rx_Dp_Handles::DdcClearWriteBufferCallbackRef, XHdcp22_Rx_Dp_Handles::DdcGetDataCallback, XHdcp22_Rx_Dp_Handles::DdcGetDataCallbackRef, XHdcp22_Rx_Dp_Handles::DdcGetReadBufferSizeCallback, XHdcp22_Rx_Dp_Handles::DdcGetReadBufferSizeCallbackRef, XHdcp22_Rx_Dp_Handles::DdcGetWriteBufferSizeCallback, XHdcp22_Rx_Dp_Handles::DdcGetWriteBufferSizeCallbackRef, XHdcp22_Rx_Dp_Handles::DdcIsReadBufferEmptyCallback, XHdcp22_Rx_Dp_Handles::DdcIsReadBufferEmptyCallbackRef, XHdcp22_Rx_Dp_Handles::DdcIsWriteBufferEmptyCallback, XHdcp22_Rx_Dp_Handles::DdcIsWriteBufferEmptyCallbackRef, XHdcp22_Rx_Dp_Handles::DdcSetAddressCallback, XHdcp22_Rx_Dp_Handles::DdcSetAddressCallbackRef, XHdcp22_Rx_Dp_Handles::DdcSetDataCallback, XHdcp22_Rx_Dp_Handles::DdcSetDataCallbackRef, XHdcp22_Rx_Dp_Handles::EncryptionStatusCallback, XHdcp22_Rx_Dp_Handles::EncryptionStatusCallbackRef, XHdcp22_Rx_Dp::Handles, XHdcp22_Rx_Dp_Handles::IsAuthenticatedCallbackSet, XHdcp22_Rx_Dp_Handles::IsAuthenticationRequestCallbackSet, XHdcp22_Rx_Dp_Handles::IsDdcAllCallbacksSet, XHdcp22_Rx_Dp_Handles::IsDdcClearReadBufferCallbackSet, XHdcp22_Rx_Dp_Handles::IsDdcClearWriteBufferCallbackSet, XHdcp22_Rx_Dp_Handles::IsDdcGetDataCallbackSet, XHdcp22_Rx_Dp_Handles::IsDdcGetReadBufferSizeCallbackRefSet, XHdcp22_Rx_Dp_Handles::IsDdcGetWriteBufferSizeCallbackSet, XHdcp22_Rx_Dp_Handles::IsDdcIsReadBufferEmptyCallbackSet, XHdcp22_Rx_Dp_Handles::IsDdcIsWriteBufferEmptyCallbackSet, XHdcp22_Rx_Dp_Handles::IsDdcSetAddressCallbackSet, XHdcp22_Rx_Dp_Handles::IsDdcSetDataCallbackSet, XHdcp22_Rx_Dp_Handles::IsEncryptionStatusCallbackSet, XHdcp22_Rx_Dp_Handles::IsRxDpAuxReadCallbackSet, XHdcp22_Rx_Dp_Handles::IsRxDpAuxWriteCallbackSet, XHdcp22_Rx_Dp_Handles::IsRxDpCpIrqSetCallbackSet, XHdcp22_Rx_Dp_Handles::IsSke_Send_EksCallbackSet, XHdcp22_Rx_Dp_Handles::IsStreamManageRequestCallbackSet, XHdcp22_Rx_Dp_Handles::IsTopologyUpdateCallbackSet, XHdcp22_Rx_Dp_Handles::IsUnauthenticatedCallbackSet, XHdcp22_Rx_Dp_Handles::RxDpAuxReadCallback, XHdcp22_Rx_Dp_Handles::RxDpAuxReadCallbackRef, XHdcp22_Rx_Dp_Handles::RxDpAuxWriteCallback, XHdcp22_Rx_Dp_Handles::RxDpAuxWriteCallbackRef, XHdcp22_Rx_Dp_Handles::RxDpCpIrqSetCallback, XHdcp22_Rx_Dp_Handles::RxDpCpIrqSetCallbackRef, XHdcp22_Rx_Dp_Handles::RxDpSetClearAuxDeferCallback, XHdcp22_Rx_Dp_Handles::RxDpSetClearAuxDeferCallbackRef, XHdcp22_Rx_Dp_Handles::Ske_Send_EksCallback, XHdcp22_Rx_Dp_Handles::Ske_Send_EksCallbackRef, XHdcp22_Rx_Dp_Handles::StreamManageRequestCallback, XHdcp22_Rx_Dp_Handles::StreamManageRequestCallbackRef, XHdcp22_Rx_Dp_Handles::TopologyUpdateCallback, XHdcp22_Rx_Dp_Handles::TopologyUpdateCallbackRef, XHdcp22_Rx_Dp_Handles::UnauthenticatedCallback, XHdcp22_Rx_Dp_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_DP_AUX_DEFER_SET_CLR, XHDCP22_RX_HANDLER_DP_AUX_READ, XHDCP22_RX_HANDLER_DP_AUX_WRITE, XHDCP22_RX_HANDLER_DP_CP_IRQ_SET, XHDCP22_RX_HANDLER_ENCRYPTION_UPDATE, XHDCP22_RX_HANDLER_INVALID, XHDCP22_RX_HANDLER_SKE_SEND_EKS, XHDCP22_RX_HANDLER_STREAM_MANAGE_REQUEST, XHDCP22_RX_HANDLER_TOPOLOGY_UPDATE, XHDCP22_RX_HANDLER_UNAUTHENTICATED, and XHDCP22_RX_HANDLER_UNDEFINED.

void XHdcp22Rx_Dp_SetDdcError | ( | XHdcp22_Rx_Dp * | 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.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.

Returns
  None.

Note
  This function can be registered as an asynchronous callback.

References XHdcp22_Rx_Dp_Info::DdcErrorCnt, XHdcp22_Rx_Dp_Info::ErrorFlag, XHdcp22_Rx_Dp::Info, XHDCP22_RX_ERROR_FLAG_DDC_BURST, XHDCP22_RX_LOG_EVT_ERROR, and XHdcp22Rx_Dp_LogWr().

void XHdcp22Rx_Dp_SetDpcdMsgRdWrtAvailable | ( | XHdcp22_Rx_Dp * | InstancePtr,
|  | u32 | type
| ) |  |

This function is to set the DPCD flag if any DPCD read/write interrupts occurred.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.
  type | is the type of interrupt

References XHdcp22_Rx_Dp_Info::DpcdFlag, XHdcp22_Rx_Dp::Info, XHDCP22_RX_DPCD_FLAG_AKE_INIT_RCVD, XHDCP22_RX_LOG_DEBUG_WRITE_MESSAGE_AVAILABLE, XHDCP22_RX_LOG_EVT_DEBUG, and XHdcp22Rx_Dp_LogWr().

void XHdcp22Rx_Dp_SetHdcp22OverProtocol | ( | XHdcp22_Rx_Dp * | InstancePtr,
|  | XHdcp22_Rx_Dp_Protocol | protocol
| ) |  |

This function is to set the protocol (HDMI/DP) over which HDCP22 is happening.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.
  protocol | is the protocol HDMI/DP.

References XHdcp22_Rx_Dp::Config, and XHdcp22_Rx_Dp_Config::Protocol.

void XHdcp22Rx_Dp_SetLinkError | ( | XHdcp22_Rx_Dp * | 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.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.

Returns
  None.

Note
  This function can be registered as an asynchronous callback.

References XHdcp22_Rx_Dp_Info::ErrorFlag, XHdcp22_Rx_Dp::Info, XHdcp22_Rx_Dp_Info::LinkErrorCnt, XHDCP22_RX_ERROR_FLAG_LINK_INTEGRITY, XHDCP22_RX_LOG_EVT_ERROR, and XHdcp22Rx_Dp_LogWr().

void XHdcp22Rx_Dp_SetReadMessageComplete | ( | XHdcp22_Rx_Dp * | InstancePtr | ) |

This function is called when a message has been read out of the read message buffer.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.

Returns
  None.

Note
  This function can be registered as an asynchronous callback.

References XHdcp22_Rx_Dp_Info::DdcFlag, XHdcp22_Rx_Dp::Info, XHDCP22_RX_DDC_FLAG_READ_MESSAGE_READY, XHDCP22_RX_LOG_DEBUG_READ_MESSAGE_COMPLETE, XHDCP22_RX_LOG_EVT_DEBUG, and XHdcp22Rx_Dp_LogWr().

void XHdcp22Rx_Dp_SetRepeater | ( | XHdcp22_Rx_Dp * | InstancePtr,
|  | u8 | Set
| ) |  |

This function sets the repeater mode status.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.
  Set | is TRUE to enable repeater mode and FALSE to disable.

Returns
  None.

References XHdcp22_Rx_Dp::Config, XHdcp22_Rx_Dp_Config::Mode, XHdcp22_Rx_Dp::RxCaps, XHDCP22_RX_RECEIVER, and XHDCP22_RX_REPEATER.

void XHdcp22Rx_Dp_SetTopology | ( | XHdcp22_Rx_Dp * | InstancePtr,
|  | const XHdcp22_Rx_Dp_Topology * | TopologyPtr
| ) |  |

This function copies a complete repeater topology table into the instance repeater topology table.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.
  TopologyPtr | is a pointer to the repeater topology table.

Returns
  None.

Note
  None.

References XHdcp22_Rx_Dp::Topology.

void XHdcp22Rx_Dp_SetTopologyField | ( | XHdcp22_Rx_Dp * | InstancePtr,
|  | XHdcp22_Rx_Dp_TopologyField | Field,
|  | u8 | Value
| ) |  |

This function is used to set various fields inside the topology structure.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.
  Field | indicates what field of the topology structure to update.
  Value | is the value assigned to the field of the topology structure.

Returns
  None.

Note
  None.

void XHdcp22Rx_Dp_SetTopologyReceiverIdList | ( | XHdcp22_Rx_Dp * | 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.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp 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.

Returns
  None.

Note
  None.

References XHdcp22_Rx_Dp_Topology::ReceiverIdList, and XHdcp22_Rx_Dp::Topology.

void XHdcp22Rx_Dp_SetTopologyUpdate | ( | XHdcp22_Rx_Dp * | 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.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.

Returns
  None.

Note
  None.

References XHdcp22_Rx_Dp::Info, XHdcp22_Rx_Dp_Info::IsTopologyValid, XHDCP22_RX_LOG_EVT_INFO, XHDCP22_RX_LOG_INFO_TOPOLOGY_UPDATE, and XHdcp22Rx_Dp_LogWr().

void XHdcp22Rx_Dp_SetWriteMessageAvailable | ( | XHdcp22_Rx_Dp * | InstancePtr | ) |

This function is called when a complete message is available in the write message buffer.

Parameters

  InstancePtr | is a pointer to the XHdcp22_Rx_Dp core instance.

Returns
  None.

Note
  This function can be registered as an asynchronous callback.

References XHdcp22_Rx_Dp_Info::DdcFlag, XHdcp22_Rx_Dp::Info, XHDCP22_RX_DDC_FLAG_WRITE_MESSAGE_READY, XHDCP22_RX_LOG_DEBUG_WRITE_MESSAGE_AVAILABLE, XHDCP22_RX_LOG_EVT_DEBUG, and XHdcp22Rx_Dp_LogWr().

void XHdcp22Rx_Dp_TimerHandler | ( | void * | CallbackRef,
|  | u8 | TmrCntNumber
| ) |  |

This function handles timer interrupts.

Parameters

  CallbackRef | refers to a XHdcp22_Rx_Dp structure
  TmrCntNumber | the number of used timer.

Returns
  None.

Note
  For DP design this handler will be called from DpRxSs timer interrupt handler so it should be a public function.

References XHdcp22_Rx_Dp::Info, XHdcp22_Rx_Dp::IsReady, XHdcp22_Rx_Dp_Info::TimerExpired, XHDCP22_RX_LOG_DEBUG_TIMER_EXPIRED, XHDCP22_RX_LOG_EVT_DEBUG, and XHdcp22Rx_Dp_LogWr().

void XHdcp22Rx_GenerateRandom | ( | XHdcp22_Rx_Dp * | InstancePtr,
|  | int | NumOctets,
|  | u8 * | RandomNumberPtr
| ) |  |

This function generates random octets.

Parameters

  NumOctets | is the number of octets in the random number.
  RandomNumberPtr | is a pointer to the random number.

Returns
  None.

Note
  None.

References XHdcp22_Rx_Dp::RngInst.

int XHdcp22Rx_RsaesOaepDecrypt | ( | XHdcp22_Rx_Dp * | 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

Parameters

  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.

Returns
  XST_SUCCESS or XST_FAILURE.

Note
  None.

References XHDCP22_RX_LOG_DEBUG_COMPUTE_RSA, XHDCP22_RX_LOG_DEBUG_COMPUTE_RSA_DONE, XHDCP22_RX_LOG_EVT_DEBUG, and XHdcp22Rx_Dp_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

Parameters

  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.

Returns
  XST_SUCCESS or XST_FAILURE.

Note
  None.