hdcp22_rx
Vitis Drivers API Documentation
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_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...
 

Enumerations

enum  XHdcp22_Rx_Protocol { XHDCP22_RX_HDMI, XHDCP22_RX_DP }
 These constants are used to define the protocol. More...
 
enum  XHdcp22_Rx_Mode { XHDCP22_RX_RECEIVER, XHDCP22_RX_REPEATER, XHDCP22_RX_CONVERTER }
 These constants are used to define the mode. More...
 
enum  XHdcp22_Rx_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_INVALID
}
 These constants are used to identify callback functions. More...
 
enum  XHdcp22_Rx_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_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_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_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_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_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_LogItemXHdcp22Rx_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_ConfigXHdcp22Rx_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...
 

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_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 Documentation

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.

Enumeration Type Documentation

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.

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.

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.

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_INVALID 

Invalid.

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.

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

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.

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.

These constants are used to define the protocol.

Enumerator
XHDCP22_RX_HDMI 

HDCP22 over HDMI.

XHDCP22_RX_DP 

HDCP22 over DP, Not yet supported.

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.

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.

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.

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.

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

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

Function Documentation

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
NPrimeis the calculated value and 2*NDigits in Size.
Nis modulus
NDigitsis 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_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.

Parameters
InstancePtris 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.
Configis 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.
EffectiveAddris 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_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

Parameters
KprivRxis the RSA private key structure containing the quintuple.
Kmis the master key generated by tx.
Mis constructed by concatenating Rtx || Rrx.
Ekhis 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
Rrxis the Rx random generated value.
RxCapsare the capabilities of the receiver.
Rtxis the Tx random generated value.
TxCapsare the capabilities of the receiver.
Kmis the master key generated by tx.
HPrimeis 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
Rrxis the Rx random generated value.
Rtxis the Tx random generated value.
Kmis the master key generated by the transmitter.
Rnis the 64-bit psuedo-random nonce generated by the transmitter.
Eksis the encrypted session generated by the transmitter.
Ksis 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
Rnis the 64-bit psuedo-random nonce generated by the transmitter.
Kmis the 128-bit master key generated by tx.
Rrxis the 64-bit pseudo-random number generated by the receiver.
Rtxis the 64-bit pseudo-random number generated by the transmitter.
LPrimeis 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
StreamIdTypeis the 16-bit field in the RepeaterAuth_Send_ReceiverID_List message.
SeqNumMis the 24-bit field in the RepeaterAuth_Stream_Manage message.
Kmis the 128-bit master key generated by tx.
Rrxis the 64-bit pseudo-random number generated by the receiver.
Rtxis the 64-bit pseudo-random number generated by the transmitter.
MPrimeis 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
ReceiverIdListis a list of downstream receivers IDs in big-endian order. Each receiver ID is 5 Bytes.
ReceiverIdListSizeis the number of receiver Ids in ReceiverIdList. There can be between 1 and 31 devices in the list.
RxInfois the 16-bit field in the RepeaterAuth_Send_ReceiverID_List message.
Kmis the 128-bit master key generated by tx.
Rrxis the 64-bit pseudo-random number generated by the receiver.
Rtxis the 64-bit pseudo-random number generated by the transmitter.
VPrimeis the 256-bit value generated for repeater authentication.
Returns
None.
Note
None.
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.

Parameters
InstancePtris a pointer to the XHdcp22_Rx core instance.
Returns
XST_SUCCESS or XST_FAILURE.
Note
The HDCP22-RX cipher is disabled.

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.

Parameters
InstancePtris a pointer to the XHdcp22_Rx 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::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.

Parameters
NumOctetsis the number of octets in the random number.
RandomNumberPtris a pointer to the random number.
Returns
None.
Note
None.

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.

Parameters
InstancePtris a pointer to the XHdcp22_Rx 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::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.

Parameters
InstancePtris a pointer to the XHdcp22_Rx core instance.
Returns
A pointer to the internal timer control instance.
Note
None.

References XHdcp22_Rx::TimerInst.

u32 XHdcp22Rx_GetVersion ( XHdcp22_Rx InstancePtr)

This function reads the version.

Parameters
InstancePtris a pointer to the XHdcp22_Rx core instance.
Returns
Returns the version register of the cipher.
Note
None.

References XHdcp22_Rx::CipherInst.

u8 XHdcp22Rx_IsAuthenticated ( XHdcp22_Rx InstancePtr)

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

Parameters
InstancePtris a pointer to the XHdcp22_Rx core instance.
Returns
TRUE or FALSE.
Note
None.

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.

Parameters
InstancePtris a pointer to the XHdcp22_Rx core instance.
Returns
TRUE or FALSE.
Note
None.

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.

Parameters
InstancePtris a pointer to the XHdcp22_Rx core instance.
Returns
TRUE or FALSE.
Note
None.

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.

Parameters
InstancePtris a pointer to the XHdcp22_Rx core instance.
Returns
TRUE or FALSE.
Note
None.

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.

Parameters
InstancePtris a pointer to the XHdcp22_Rx core instance.
Returns
TRUE or FALSE.
Note
None.

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.

Parameters
InstancePtris a pointer to the XHdcp22_Rx 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::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.

Parameters
InstancePtris a pointer to the XHdcp22_Rx core instance.
Lc128Ptris a pointer to an array.
Returns
None.
Note
None.

References XHdcp22_Rx::CipherInst.

int XHdcp22Rx_LoadPrivateKey ( XHdcp22_Rx InstancePtr,
const u8 *  PrivateKeyPtr 
)

This function is used to load the private key.

Parameters
InstancePtris a pointer to the XHdcp22_Rx core instance.
PrivateKeyPtris 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::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.

Parameters
InstancePtris a pointer to the XHdcp22_Rx core instance.
PublicCertPtris a pointer to an array.
Returns
None.
Note
None.

References XHdcp22_Rx::PublicCertPtr.

void XHdcp22Rx_LogDisplay ( XHdcp22_Rx InstancePtr)

This function prints the contents of the log buffer.

Parameters
InstancePtris a pointer to the XHdcp22_Rx core instance.
Returns
None.
Note
None.

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.

Parameters
InstancePtris a pointer to the XHdcp22_Rx core instance.
Returns
The expired logging time in useconds.
Note
None.

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.

Parameters
InstancePtris a pointer to the XHdcp22_Rx core instance.
Returns
  • Content of log buffer if log pointers are not equal.
  • Otherwise Zero.
Note
None.

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.

Parameters
InstancePtris a pointer to the XHdcp22_Rx core instance.
Verboseallows to add debug logging.
Returns
None.
Note
None.

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.

Parameters
InstancePtris a pointer to the XHdcp22_Rx core instance.
Evtspecifies an action to be carried out.
Dataspecifies the information that gets written into log buffer.
Returns
None.
Note
None.

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.

Parameters
DeviceIdis the unique core ID of the HDCP RX core for the lookup operation.
Returns
XHdcp22Rx_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_Poll ( XHdcp22_Rx InstancePtr)

This function executes the HDCP22-RX state machine.

Parameters
InstancePtris a pointer to the XHdcp22_Rx core instance.
Returns
None.
Note
State transitions are logged.

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.

Parameters
InstancePtris a pointer to the XHdcp22_Rx 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_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

Parameters
InstancePtris a pointer to the MMULT instance.
KprivRxis the RSA private key structure containing the quintuple.
EncryptedMessageis the 128 byte octet string to be decrypted.
Messageis the octet string after decryption.
MessageLenis 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_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
KpubRxis the RSA public key structure containing the 1024 bit modulus and 24 bit public exponent.
Messageis the octet string to be encrypted.
MessageLenis the length of octet string to be encrypted and must be less than or equal to (nLen - 2*hLen - 2)
MaskingSeedis the random octet string seed of length hLen used by EME-OAEP encoding function.
Returns
XST_SUCCESS or XST_FAILURE.
Note
None.
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
Parameters
InstancePtris a pointer to the HDMI RX core instance.
HandlerTypespecifies the type of handler.
CallbackFuncis the address of the callback function.
CallbackRefis 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_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.

Parameters
InstancePtris a pointer to the XHdcp22_Rx core instance.
Returns
None.
Note
This function can be registered as an asynchronous callback.

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.

Parameters
InstancePtris a pointer to the XHdcp22_Rx core instance.
Returns
None.
Note
This function can be registered as an asynchronous callback.

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.

Parameters
InstancePtris a pointer to the XHdcp22_Rx core instance.
Returns
None.
Note
This function can be registered as an asynchronous callback.

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.

Parameters
InstancePtris a pointer to the XHdcp22_Rx core instance.
Setis TRUE to enable repeater mode and FALSE to disable.
Returns
None.

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.

Parameters
InstancePtris a pointer to the XHdcp22_Rx core instance.
TopologyPtris a pointer to the repeater topology table.
Returns
None.
Note
None.

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.

Parameters
InstancePtris a pointer to the XHdcp22_Rx core instance.
Fieldindicates what field of the topology structure to update.
Valueis the value assigned to the field of the topology structure.
Returns
None.
Note
None.
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.

Parameters
InstancePtris a pointer to the XHdcp22_Rx core instance.
ListPtris 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.
ListSizeis the number of Receiver IDs in the list. The list size cannot exceed 31 devices.
Returns
None.
Note
None.

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.

Parameters
InstancePtris a pointer to the XHdcp22_Rx core instance.
Returns
None.
Note
None.

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.

Parameters
InstancePtris a pointer to the XHdcp22_Rx core instance.
Returns
None.
Note
This function can be registered as an asynchronous callback.

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