hdcp22_tx
Vitis Drivers API Documentation
Overview

Data Structures

struct  XHdcp22_Tx_Config
 This typedef contains configuration information for the device. More...
 
struct  XHdcp22_Tx_Timer
 The current state and data for internal used timer. More...
 
struct  XHdcp22_Tx_PairingInfo
 This typedef contains the the used keys used for authentication with stored Km. More...
 
struct  XHdcp22_Tx_Info
 This typedef contains information about the HDCP22 transmitter. More...
 
struct  XHdcp22_Tx_LogItem
 This typedef is used to store logging events. More...
 
struct  XHdcp22_Tx_Log
 This typedef contains the HDCP22 log list. More...
 
struct  XHdcp22_Tx_Test
 This typedef contains the HDCP22 test parameters and settings. More...
 
struct  XHdcp22_Tx_RevocationList
 This structure contains the HDCP2 Revocation information. More...
 
struct  XHdcp22_Tx_Topology
 This structure contains the HDCP topology information. More...
 
struct  XHdcp22_Tx
 The XHdcpTx driver instance data. More...
 
struct  XHdcp22_Tx_CertRx
 This typedef contains the public key certificate of Receiver that is received with AKE_Send_Cert. More...
 
struct  XHdcp22_Tx_AKESendCert
 This typedef contains the received AKE_Send_Cert message definition. More...
 
struct  XHdcp22_Tx_AKESendHPrime
 This typedef contains the received AKE_Send_H_prime message definition. More...
 
struct  XHdcp22_Tx_AKESendPairingInfo
 This typedef contains the received AKE_Send_Pairing_Info message definition. More...
 
struct  XHdcp22_Tx_LCSendLPrime
 This typedef contains the received AKE_Send_L_prime message definition. More...
 
struct  XHdcp22_Tx_AKEInit
 This typedef contains the transmitted AKE_Init message definition. More...
 
struct  XHdcp22_Tx_AKENoStoredKm
 This typedef contains the transmitted AKE_No_Stored_km message definition. More...
 
struct  XHdcp22_Tx_AKEStoredKm
 This typedef contains the transmitted AKE_Stored_km message definition. More...
 
struct  XHdcp22_Tx_LCInit
 This typedef contains the transmitted LC_Init message definition. More...
 
struct  XHdcp22_Tx_SKESendEks
 This typedef contains the transmitted SKE_Send_Eks message definition. More...
 
struct  XHdcp22_Tx_RepeatAuthSendRecvIDList
 This typedef contains the RepeaterAuth_Send_ReceiverID_List message definition. More...
 
struct  XHdcp22_Tx_RepeatAuthSendAck
 This typedef contains the RepeaterAuth_Send_Ack message definition. More...
 
struct  XHdcp22_Tx_RepeatAuthStreamManage
 This typedef contains the RepeaterAuth_Stream_Manage message definition. More...
 
struct  XHdcp22_Tx_RepeatAuthStreamReady
 This typedef contains the RepeaterAuth_Stream_Ready message definition. More...
 
union  XHdcp22_Tx_Message
 Message buffer structure. More...
 
struct  XHdcp22_Tx_DDCMessage
 Message including the DDC Address. More...
 

Macros

#define XHDCP22_TX_INVALID_RXSTATUS   0xFFFF
 RxStatus value used to force re-authentication. More...
 
#define XHDCP22_TX_CASE_TO_STR_PRE(pre, arg)   case pre ## arg : strcpy(str, #arg); break;
 Case replacement to copy a case Id to a string with a pre-lead. More...
 
#define XHDCP22_TX_H
 prevent circular inclusions by using protection macros More...
 
#define XHDCP22_TX_DEFAULT_RX_STATUS_POLLVALUE   10
 This value is the default polling interval defined in millseconds. More...
 
#define XHDCP22_TX_MAX_MESSAGE_SIZE   1+534
 Needed storage to transmit/receive messages to the HDCP2.2 receiver This includes 1 extra byte for the DDC address used. More...
 
#define XHDCP22_TX_REVOCATION_LIST_MAX_DEVICES   944
 Needed storage for the Device IDs in the revocation list. More...
 
#define XHDCP22_TX_MAX_STORED_PAIRINGINFO   2
 The list of maximum pairing info items to store. More...
 
#define XHDCP22_TX_LOG_BUFFER_SIZE   256
 The size of the log buffer. More...
 
#define BD_MAX_MOD_SIZE   (384/sizeof(u32))
 Size RSA encryption parameters to support 384 byte maximum modulus size. More...
 
#define XHDCP22_TX_I_H
 prevent circular inclusions by using protection macros. More...
 
#define XHDCP22_TX_MAX_ALLOWED_LOCALITY_CHECKS   8
 Maximum allowed re-checking locality, prescribed by LLC. More...
 
#define XHDCP22_TX_MAX_ALLOWED_STREAM_MANAGE_CHECKS   128
 Maximum allowed re-checking content stream management. More...
 
#define XHDCP22_TX_LC128_SIZE   16
 Lc128 global constant size. More...
 
#define XHDCP22_TX_RCVID_SIZE   5
 Unique receiver Id size in bytes. More...
 
#define XHDCP22_TX_REPEATER_MAX_DEVICE_COUNT   31
 Max number of downstream devices allowed. More...
 
#define XHDCP22_TX_REPEATER_MAX_CASCADE_DEPTH   4
 Max cascade depth. More...
 
#define XHDCP22_TX_MSG_UNDEFINED   0
 Undefined. More...
 
#define XHDCP22_TX_AKE_INIT   2
 AKE Init message. More...
 
#define XHDCP22_TX_AKE_INIT_SIZE   12
 AKE Init message size. More...
 
#define XHDCP22_TX_AKE_SEND_CERT   3
 AKE Send Certificate message. More...
 
#define XHDCP22_TX_AKE_SEND_CERT_SIZE   534
 AKE Send Certificate message size. More...
 
#define XHDCP22_TX_AKE_NO_STORED_KM   4
 AKE No Stored Km message. More...
 
#define XHDCP22_TX_AKE_NO_STORED_KM_SIZE   129
 AKE No Stored Km message size. More...
 
#define XHDCP22_TX_AKE_STORED_KM   5
 AKE Stored Km message size. More...
 
#define XHDCP22_TX_AKE_STORED_KM_SIZE   33
 AKE Stored Km message size. More...
 
#define XHDCP22_TX_AKE_SEND_H_PRIME   7
 AKE H' message. More...
 
#define XHDCP22_TX_AKE_SEND_H_PRIME_SIZE   33
 AKE H' message size. More...
 
#define XHDCP22_TX_AKE_SEND_PAIRING_INFO   8
 AKE Pairing info message. More...
 
#define XHDCP22_TX_AKE_SEND_PAIRING_INFO_SIZE   17
 AKE Pairing info message size. More...
 
#define XHDCP22_TX_LC_INIT   9
 LC Init message. More...
 
#define XHDCP22_TX_LC_INIT_SIZE   9
 LC Init message size. More...
 
#define XHDCP22_TX_LC_SEND_L_PRIME   10
 Send L' message. More...
 
#define XHDCP22_TX_LC_SEND_L_PRIME_SIZE   33
 Send L' message size. More...
 
#define XHDCP22_TX_SKE_SEND_EKS   11
 Send Eks message. More...
 
#define XHDCP22_TX_SKE_SEND_EKS_SIZE   25
 Send Eks message size. More...
 
#define XHDCP22_TX_REPEATAUTH_SEND_RECVID_LIST   12
 Repeater Auth send receiver ID list message. More...
 
#define XHDCP22_TX_REPEATAUTH_SEND_RECVID_LIST_SIZE   177
 Repeater Auth send receiver ID list maximum message size. More...
 
#define XHDCP22_TX_REPEATAUTH_SEND_ACK   15
 RepeaterAuth send ack message. More...
 
#define XHDCP22_TX_REPEATAUTH_SEND_ACK_SIZE   17
 RepeaterAuth send ack message size in bytes. More...
 
#define XHDCP22_TX_REPEATAUTH_STREAM_MANAGE   16
 RepeaterAuth stream manage message. More...
 
#define XHDCP22_TX_REPEATAUTH_STREAM_MANAGE_SIZE   8
 RepeaterAuth stream manage message size in bytes. More...
 
#define XHDCP22_TX_REPEATAUTH_STREAM_READY   17
 RepeaterAuth stream ready message. More...
 
#define XHDCP22_TX_REPEATAUTH_STREAM_READY_SIZE   33
 RepeaterAuth stream ready message size in bytes. More...
 
#define XHDCP22_TX_TS_UNDEFINED   XHDCP22_TX_MSG_UNDEFINED
 Reason why the timer was started: Undefined. More...
 
#define XHDCP22_TX_TS_WAIT_FOR_STREAM_TYPE   0xFD
 Reason why the timer was started: Waiting for Content Stream Type to be set when in repeater mode. More...
 
#define XHDCP22_TX_TS_WAIT_FOR_CIPHER   0xFE
 Reason why the timer was started: Mandatory wait of 200 ms before the cipher may be activated. More...
 
#define XHDCP22_TX_TS_RX_REAUTH_CHECK   0xFF
 Reason why the timer was started: Status checking. More...
 
#define XHDCP22_TX_TIMER_CNTR_0   0
 Internal used timer counter for timeout checking. More...
 
#define XHDCP22_TX_TIMER_CNTR_1   1
 Internal used timer counter for logging. More...
 
#define XHDCP22_TX_HDCPPORT_VERSION_OFFSET   0x50
 DDC version offset. More...
 
#define XHDCP22_TX_HDCPPORT_WRITE_MSG_OFFSET   0x60
 DDC write message buffer offset. More...
 
#define XHDCP22_TX_HDCPPORT_RXSTATUS_OFFSET   0x70
 DDC RX status offset. More...
 
#define XHDCP22_TX_HDCPPORT_READ_MSG_OFFSET   0x80
 DDC read message buffer offset. More...
 
#define XHDCP22_TX_RXSTATUS_REAUTH_REQ_MASK   (1<<11)
 HDCP Port DDC Rx status register masks. More...
 
#define XHDCP22_TX_RXSTATUS_READY_MASK   (1<<10)
 RX status READY bit. More...
 
#define XHDCP22_TX_RXSTATUS_AVAIL_BYTES_MASK   (0x3FF)
 RX status available bytes in read message buffer. More...
 
#define XHDCP22_TX_CERT_RCVID_SIZE   5
 RX certificate and Tx public key sizes in bytes. More...
 
#define XHDCP22_TX_CERT_PUB_KEY_N_SIZE   128
 Public key-N size in the RX certificate. More...
 
#define XHDCP22_TX_CERT_PUB_KEY_E_SIZE   3
 Public key-E size in the RX certificate. More...
 
#define XHDCP22_TX_CERT_RSVD_SIZE   2
 Reserved size in the RX certificate. More...
 
#define XHDCP22_TX_CERT_SIGNATURE_SIZE   384
 Signature size in the RX certificate. More...
 
#define XHDCP22_TX_CERT_SIZE
 Total size of the RX certificate. More...
 
#define XHDCP22_TX_RXCAPS_SIZE   3
 RX capabilities size. More...
 
#define XHDCP22_TX_TXCAPS_SIZE   3
 TX capabilities size. More...
 
#define XHDCP22_TX_KPUB_DCP_LLC_N_SIZE   384
 LLC public key-N size. More...
 
#define XHDCP22_TX_KPUB_DCP_LLC_E_SIZE   1
 LLC public key-E size. More...
 
#define XHDCP22_TX_SHA256_HASH_SIZE   32
 SHA256 hash size in bytes. More...
 
#define XHDCP22_TX_AES128_SIZE   16
 AES128 keys in bytes. More...
 
#define XHDCP22_TX_RTX_SIZE   8
 64 bits. More...
 
#define XHDCP22_TX_RRX_SIZE   8
 64 bits. More...
 
#define XHDCP22_TX_E_KPUB_KM_SIZE   128
 1024 bits. More...
 
#define XHDCP22_TX_H_PRIME_SIZE   32
 256 bits. More...
 
#define XHDCP22_TX_EKH_KM_SIZE   16
 128 bits. More...
 
#define XHDCP22_TX_RN_SIZE   8
 64-bits. More...
 
#define XHDCP22_TX_RIV_SIZE   8
 64-bits. More...
 
#define XHDCP22_TX_L_PRIME_SIZE   32
 256 bits. More...
 
#define XHDCP22_TX_KS_SIZE   16
 128 bits. More...
 
#define XHDCP22_TX_EDKEY_KS_SIZE   16
 128 bits. More...
 
#define XHDCP22_TX_SRM_RCVID_SIZE   XHDCP22_TX_RCVID_SIZE
 Receiver Id size in the SRM block. More...
 
#define XHDCP22_TX_SRM_SIGNATURE_SIZE   384
 Signature size in the SRM block. More...
 
#define XHDCP22_TX_RXINFO_SIZE   2
 RxInfo size in bytes. More...
 
#define XHDCP22_TX_SEQ_NUM_V_SIZE   3
 Seq_num_v size in bytes. More...
 
#define XHDCP22_TX_V_SIZE   32
 V size in bytes. More...
 
#define XHDCP22_TX_V_PRIME_SIZE   16
 VPrime size in bytes. More...
 
#define XHDCP22_TX_SEQ_NUM_M_SIZE   3
 Seq_num_m size in bytes. More...
 
#define XHDCP22_TX_K_SIZE   2
 K size in bytes. More...
 
#define XHDCP22_TX_STREAMID_TYPE_SIZE   2
 Stream ID and Type size in bytes. More...
 
#define XHDCP22_TX_M_PRIME_SIZE   32
 MPrime size in bytes. More...
 
#define XHDCP22_TX_TEST_CERT_RX   0x00000001
 Use a certificate test vector. More...
 
#define XHDCP22_TX_TEST_H1   0x00000002
 Use a H_Prime test vector. More...
 
#define XHDCP22_TX_TEST_L1   0x00000004
 Use a L_Prime test vector. More...
 
#define XHDCP22_TX_TEST_EKH_KM   0x00000008
 Use a pairing info Ekh(Km) test vector, use i.c.w XHDCP22_TX_TEST_RCV_TIMEOUT. More...
 
#define XHDCP22_TX_TEST_INVALID_VALUE   0x00000010
 Invalidate a value. More...
 
#define XHDCP22_TX_TEST_RCV_TIMEOUT   0x00000020
 Timeout on a received message. More...
 
#define XHDCP22_TX_TEST_V1   0x00000040
 Use a V_Prime test vector. More...
 
#define XHDCP22_TX_TEST_M1   0x00000080
 Use a M_Prime test vector. More...
 
#define XHDCP22_TX_TEST_STORED_KM   0x00000100
 AKE is forced using a stored Km scenarion. More...
 
#define XHDCP22_TX_TEST_NO_TIMEOUT   0x00000200
 Disable timeout checking. More...
 
#define XHDCP22_TX_TEST_CLR_PAIRINGINFO   0x00000400
 Pairing info is cleared, to force a non-stored Km scenario. More...
 
#define XHDCP22_TX_TEST_USE_TEST_VECTOR_R1   0x80000000
 Use testvectors for receiver R1. More...
 
#define XHDCP22_TX_DDC_BASE_ADDRESS   0x3A
 DDC base address (0x74 >> 1) More...
 

Typedefs

typedef XHdcp22_Tx_StateType XHdcp22Tx_StateFuncType (XHdcp22_Tx *InstancePtr)
 Pointer to the state handling functions. More...
 
typedef void XHdcp22_Tx_TransitionFuncType (XHdcp22_Tx *InstancePtr)
 Pointer to the transition functions going from one state to the next. More...
 
typedef void(* XHdcp22_Tx_Callback )(void *CallbackRef)
 Callback type for status. More...
 
typedef int(* XHdcp22_Tx_DdcHandler )(u8 DeviceAddress, u16 ByteCount, u8 *BufferPtr, u8 Stop, void *RefPtr)
 Callback type used for calling DDC read and write functions. More...
 

Enumerations

enum  XHdcp22_Tx_HandlerType
 These constants are used to identify callback functions. More...
 
enum  XHdcp22_Tx_StateType {
  XHDCP22_TX_STATE_H0, XHDCP22_TX_STATE_H1, XHDCP22_TX_STATE_A0, XHDCP22_TX_STATE_A1,
  XHDCP22_TX_STATE_A1_1, XHDCP22_TX_STATE_A1_NSK0, XHDCP22_TX_STATE_A1_NSK1, XHDCP22_TX_STATE_A1_SK0,
  XHDCP22_TX_STATE_A2, XHDCP22_TX_STATE_A2_1, XHDCP22_TX_STATE_A3, XHDCP22_TX_STATE_A4,
  XHDCP22_TX_STATE_A5, XHDCP22_TX_STATE_A6_A7_A8, XHDCP22_TX_STATE_A6, XHDCP22_TX_STATE_A7,
  XHDCP22_TX_STATE_A8, XHDCP22_TX_STATE_A9, XHDCP22_TX_STATE_A9_1, XHDCP22_TX_NUM_STATES
}
 These constants specify the different states in the internal state machine. More...
 
enum  XHdcp22_Tx_AuthenticationType {
  XHDCP22_TX_INCOMPATIBLE_RX, XHDCP22_TX_AUTHENTICATION_BUSY, XHDCP22_TX_AUTHENTICATED, XHDCP22_TX_UNAUTHENTICATED,
  XHDCP22_TX_REAUTHENTICATE_REQUESTED, XHDCP22_TX_DEVICE_IS_REVOKED, XHDCP22_TX_NO_SRM_LOADED
}
 These constants specify return values on polling with XHdcp22Tx_Poll. More...
 
enum  XHdcp22_Tx_ContentStreamType { XHDCP22_STREAMTYPE_0, XHDCP22_STREAMTYPE_1 }
 These constants are used to define the content stream type. More...
 
enum  XHdcp22_Tx_LogEvt {
  XHDCP22_TX_LOG_EVT_NONE, XHDCP22_TX_LOG_EVT_STATE, XHDCP22_TX_LOG_EVT_POLL_RESULT, XHDCP22_TX_LOG_EVT_ENABLED,
  XHDCP22_TX_LOG_EVT_RESET, XHDCP22_TX_LOG_EVT_ENCR_ENABLED, XHDCP22_TX_LOG_EVT_TEST_ERROR, XHDCP22_TX_LOG_EVT_DBG,
  XHDCP22_TX_LOG_EVT_LCCHK_COUNT, XHDCP22_TX_LOG_EVT_STRMMNGCHK_COUNT, XHDCP22_TX_LOG_EVT_USER, XHDCP22_TX_LOG_INVALID
}
 These constants are events as stored in the logging list. More...
 
enum  XHdcp22_Tx_Protocol { XHDCP22_TX_HDMI, XHDCP22_TX_DP }
 These constants are used to define the used protocol. More...
 
enum  XHdcp22_Tx_Mode { XHDCP22_TX_TRANSMITTER, XHDCP22_TX_REPEATER, XHDCP22_TX_CONVERTER }
 These constants are used to define the used mode. More...
 
enum  XHdcp22_Tx_TopologyField
 These constants are used to identify fields inside the topology structure. More...
 
enum  XHdcp22_Tx_TestMode {
  XHDCP22_TX_TESTMODE_DISABLED, XHDCP22_TX_TESTMODE_SW_RX, XHDCP22_TX_TESTMODE_NO_RX, XHDCP22_TX_TESTMODE_UNIT,
  XHDCP22_TX_TESTMODE_USE_TESTKEYS, XHDCP22_TX_TESTMODE_INVALID
}
 These constants are used to set the core into testing mode with #XHdcp22Tx_TestSetMode. More...
 
enum  XHdcp22_Tx_LogDebugValue
 Value definitions for debugging. More...
 

Functions

int XHdcp22Tx_CfgInitialize (XHdcp22_Tx *InstancePtr, XHdcp22_Tx_Config *CfgPtr, UINTPTR EffectiveAddr)
 This function initializes the HDCP22 TX core. More...
 
void XHdcp22Tx_LoadLc128 (XHdcp22_Tx *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...
 
int XHdcp22Tx_LoadRevocationTable (XHdcp22_Tx *InstancePtr, const u8 *SrmPtr)
 This function is used to load the system renewability messages (SRMs) which carries the Receiver ID revocation list. More...
 
u8 XHdcp22Tx_IsDeviceRevoked (XHdcp22_Tx *InstancePtr, u8 *RecvIdPtr)
 This function searches for the specified ReceiverID in the revocation list. More...
 
XHdcp22_Tx_RevocationListXHdcp22Tx_GetRevocationReceiverIdList (XHdcp22_Tx *InstancePtr)
 This function returns a pointer to the Revocation Receiver ID list. More...
 
XHdcp22_Tx_TopologyXHdcp22Tx_GetTopology (XHdcp22_Tx *InstancePtr)
 This function returns a pointer to the downstream topology structure. More...
 
u8 * XHdcp22Tx_GetTopologyReceiverIdList (XHdcp22_Tx *InstancePtr)
 This function returns a pointer to the ReceiverID list in the repeater topology structure. More...
 
u32 XHdcp22Tx_GetTopologyField (XHdcp22_Tx *InstancePtr, XHdcp22_Tx_TopologyField Field)
 This function is used to get various fields inside the topology structure. More...
 
void XHdcp22Tx_SetContentStreamType (XHdcp22_Tx *InstancePtr, XHdcp22_Tx_ContentStreamType StreamType)
 This function sets the Content Stream Type. More...
 
u32 XHdcp22Tx_GetVersion (XHdcp22_Tx *InstancePtr)
 This function reads the version. More...
 
int XHdcp22Tx_Authenticate (XHdcp22_Tx *InstancePtr)
 This function is a called to start authentication. More...
 
int XHdcp22Tx_Poll (XHdcp22_Tx *InstancePtr)
 This function is a executed every time to trigger the state machine. More...
 
int XHdcp22Tx_Reset (XHdcp22_Tx *InstancePtr)
 This function resets the state machine. More...
 
int XHdcp22Tx_Enable (XHdcp22_Tx *InstancePtr)
 This function enables the state machine and acts as a resume. More...
 
int XHdcp22Tx_Disable (XHdcp22_Tx *InstancePtr)
 This function disables the state machine and acts as a pause. More...
 
int XHdcp22Tx_EnableEncryption (XHdcp22_Tx *InstancePtr)
 This function enables HDMI stream encryption by enabling the cipher. More...
 
int XHdcp22Tx_DisableEncryption (XHdcp22_Tx *InstancePtr)
 This function disables HDMI stream encryption by disabling the cipher. More...
 
void XHdcp22Tx_EnableBlank (XHdcp22_Tx *InstancePtr)
 This function enables the blank output for the cipher. More...
 
void XHdcp22Tx_DisableBlank (XHdcp22_Tx *InstancePtr)
 This function disables the blank output for the cipher. More...
 
u8 XHdcp22Tx_IsRepeater (XHdcp22_Tx *InstancePtr)
 This function returns the current repeater mode status. More...
 
void XHdcp22Tx_SetRepeater (XHdcp22_Tx *InstancePtr, u8 Set)
 This function sets the repeater mode status. More...
 
u8 XHdcp22Tx_IsEnabled (XHdcp22_Tx *InstancePtr)
 This function returns the current enabled state. More...
 
u8 XHdcp22Tx_IsEncryptionEnabled (XHdcp22_Tx *InstancePtr)
 This function returns the current encryption enabled state. More...
 
u8 XHdcp22Tx_IsInProgress (XHdcp22_Tx *InstancePtr)
 This function returns the current progress state. More...
 
u8 XHdcp22Tx_IsAuthenticated (XHdcp22_Tx *InstancePtr)
 This function returns the current authenticated state. More...
 
u8 XHdcp22Tx_IsDwnstrmCapable (XHdcp22_Tx *InstancePtr)
 This function checks if the downstream device HDCP2Version register is set. More...
 
int XHdcp22Tx_SetCallback (XHdcp22_Tx *InstancePtr, XHdcp22_Tx_HandlerType HandlerType, void *CallbackFunc, void *CallbackRef)
 This function installs callback functions for the given HandlerType: More...
 
XTmrCtr * XHdcp22Tx_GetTimer (XHdcp22_Tx *InstancePtr)
 This function returns the pointer to the internal timer control instance needed for connecting the timer interrupt to an interrupt controller. More...
 
void XHdcp22Tx_SetMessagePollingValue (XHdcp22_Tx *InstancePtr, u32 PollingValue)
 This function can be used to change the polling value. More...
 
int XHdcp22Tx_ClearPairingInfo (XHdcp22_Tx *InstancePtr)
 This function clear the global pairing info structure, so every HDCP2.2 receiver will have to go through the 'no stored km' sequence to authenticate. More...
 
void XHdcp22Tx_RevokeReceiverId (XHdcp22_Tx *InstancePtr, u8 *ReceiverIdPtr)
 This function adds a ReceiverID to RevocationList. More...
 
void XHdcp22Tx_LogReset (XHdcp22_Tx *InstancePtr, u8 Verbose)
 This function clears the log pointers. More...
 
u32 XHdcp22Tx_LogGetTimeUSecs (XHdcp22_Tx *InstancePtr)
 This function returns the time expired since a log reset was called. More...
 
void XHdcp22Tx_LogWr (XHdcp22_Tx *InstancePtr, XHdcp22_Tx_LogEvt Evt, u16 Data)
 This function writes HDCP TX logs into buffer. More...
 
XHdcp22_Tx_LogItemXHdcp22Tx_LogRd (XHdcp22_Tx *InstancePtr)
 This function provides the log information from the log buffer. More...
 
void XHdcp22Tx_LogDisplay (XHdcp22_Tx *InstancePtr)
 This function prints the content of log buffer. More...
 
void XHdcp22Tx_Info (XHdcp22_Tx *InstancePtr)
 This function prints the state machine information. More...
 
XHdcp22_Tx_ConfigXHdcp22Tx_LookupConfig (u16 DeviceId)
 This function returns a reference to an XHdcp22_Tx_Config structure based on the core id, DeviceId. More...
 
void XHdcp22Tx_GenerateRandom (XHdcp22_Tx *InstancePtr, int NumOctets, u8 *RandomNumberPtr)
 This function generates random octets. More...
 
int XHdcp22Tx_VerifyCertificate (const XHdcp22_Tx_CertRx *CertificatePtr, const u8 *KpubDcpNPtr, int KpubDcpNSize, const u8 *KpubDcpEPtr, int KpubDcpESize)
 This function verifies the HDCP receivers certificate. More...
 
int XHdcp22Tx_VerifySRM (const u8 *SrmPtr, int SrmSize, const u8 *KpubDcpNPtr, int KpubDcpNSize, const u8 *KpubDcpEPtr, int KpubDcpESize)
 This function verifies a HDCP2 system renewability message (SRM) block. More...
 
void XHdcp22Tx_ComputeHPrime (const u8 *Rrx, const u8 *RxCaps, const u8 *Rtx, const u8 *TxCaps, const u8 *Km, u8 *HPrime)
 This function computes HPrime. More...
 
void XHdcp22Tx_ComputeEdkeyKs (const u8 *Rn, const u8 *Km, const u8 *Ks, const u8 *Rrx, const u8 *Rtx, u8 *EdkeyKs)
 This function computes EdkeyKs. More...
 
void XHdcp22Tx_ComputeLPrime (const u8 *Rn, const u8 *Km, const u8 *Rrx, const u8 *Rtx, u8 *LPrime)
 This function computes LPrime. More...
 
void XHdcp22Tx_ComputeV (const u8 *Rn, const u8 *Rrx, const u8 *RxInfo, const u8 *Rtx, const u8 *RecvIDList, const u8 RecvIDCount, const u8 *SeqNum_V, const u8 *Km, u8 *V)
 This function computes V. More...
 
void XHdcp22Tx_ComputeM (const u8 *Rn, const u8 *Rrx, const u8 *Rtx, const u8 *StreamIDType, const u8 *k, const u8 *SeqNum_M, const u8 *Km, u8 *M)
 This function computes M. More...
 
int XHdcp22Tx_EncryptKm (const XHdcp22_Tx_CertRx *CertificatePtr, const u8 *KmPtr, u8 *MaskingSeedPtr, u8 *EncryptedKmPtr)
 This function encrypts the Km value with the receivers public key into Ekh(Km) More...
 
void XHdcp22Tx_MemXor (u8 *Output, const u8 *InputA, const u8 *InputB, unsigned int Size)
 This function calculates a XOR on a array. More...
 

Variables

XHdcp22Tx_StateFuncType *const XHdcp22_Tx_StateTable [XHDCP22_TX_NUM_STATES]
 This table contains the function pointers for all possible states. More...
 

Macro Definition Documentation

#define BD_MAX_MOD_SIZE   (384/sizeof(u32))

Size RSA encryption parameters to support 384 byte maximum modulus size.

#define XHDCP22_TX_AES128_SIZE   16
#define XHDCP22_TX_AKE_INIT   2

AKE Init message.

#define XHDCP22_TX_AKE_INIT_SIZE   12

AKE Init message size.

#define XHDCP22_TX_AKE_NO_STORED_KM   4

AKE No Stored Km message.

Referenced by XHdcp22Tx_LogDisplay().

#define XHDCP22_TX_AKE_NO_STORED_KM_SIZE   129

AKE No Stored Km message size.

#define XHDCP22_TX_AKE_SEND_CERT   3

AKE Send Certificate message.

#define XHDCP22_TX_AKE_SEND_CERT_SIZE   534

AKE Send Certificate message size.

#define XHDCP22_TX_AKE_SEND_H_PRIME   7

AKE H' message.

#define XHDCP22_TX_AKE_SEND_H_PRIME_SIZE   33

AKE H' message size.

#define XHDCP22_TX_AKE_SEND_PAIRING_INFO   8

AKE Pairing info message.

#define XHDCP22_TX_AKE_SEND_PAIRING_INFO_SIZE   17

AKE Pairing info message size.

#define XHDCP22_TX_AKE_STORED_KM   5

AKE Stored Km message size.

#define XHDCP22_TX_AKE_STORED_KM_SIZE   33

AKE Stored Km message size.

#define XHDCP22_TX_CASE_TO_STR_PRE (   pre,
  arg 
)    case pre ## arg : strcpy(str, #arg); break;

Case replacement to copy a case Id to a string with a pre-lead.

Referenced by XHdcp22Tx_LogDisplay().

#define XHDCP22_TX_CERT_PUB_KEY_E_SIZE   3

Public key-E size in the RX certificate.

Referenced by XHdcp22Tx_EncryptKm().

#define XHDCP22_TX_CERT_PUB_KEY_N_SIZE   128

Public key-N size in the RX certificate.

Referenced by XHdcp22Tx_EncryptKm().

#define XHDCP22_TX_CERT_RCVID_SIZE   5

RX certificate and Tx public key sizes in bytes.

Unique receiver Id size in the RX certificate.

#define XHDCP22_TX_CERT_RSVD_SIZE   2

Reserved size in the RX certificate.

#define XHDCP22_TX_CERT_SIGNATURE_SIZE   384

Signature size in the RX certificate.

#define XHDCP22_TX_CERT_SIZE
Value:
#define XHDCP22_TX_CERT_RSVD_SIZE
Reserved size in the RX certificate.
Definition: xhdcp22_tx_i.h:124
#define XHDCP22_TX_CERT_PUB_KEY_E_SIZE
Public key-E size in the RX certificate.
Definition: xhdcp22_tx_i.h:123
#define XHDCP22_TX_CERT_SIGNATURE_SIZE
Signature size in the RX certificate.
Definition: xhdcp22_tx_i.h:125
#define XHDCP22_TX_CERT_RCVID_SIZE
RX certificate and Tx public key sizes in bytes.
Definition: xhdcp22_tx_i.h:121
#define XHDCP22_TX_CERT_PUB_KEY_N_SIZE
Public key-N size in the RX certificate.
Definition: xhdcp22_tx_i.h:122

Total size of the RX certificate.

#define XHDCP22_TX_DDC_BASE_ADDRESS   0x3A

DDC base address (0x74 >> 1)

Referenced by XHdcp22Tx_IsDwnstrmCapable().

#define XHDCP22_TX_DEFAULT_RX_STATUS_POLLVALUE   10

This value is the default polling interval defined in millseconds.

The polling interval defines the amount of time to wait between successive reads of the RxStatus register.

Referenced by XHdcp22Tx_CfgInitialize().

#define XHDCP22_TX_E_KPUB_KM_SIZE   128

1024 bits.

#define XHDCP22_TX_EDKEY_KS_SIZE   16

128 bits.

Referenced by XHdcp22Tx_ComputeEdkeyKs().

#define XHDCP22_TX_EKH_KM_SIZE   16

128 bits.

#define XHDCP22_TX_H

prevent circular inclusions by using protection macros

#define XHDCP22_TX_H_PRIME_SIZE   32

256 bits.

#define XHDCP22_TX_HDCPPORT_READ_MSG_OFFSET   0x80

DDC read message buffer offset.

#define XHDCP22_TX_HDCPPORT_RXSTATUS_OFFSET   0x70

DDC RX status offset.

#define XHDCP22_TX_HDCPPORT_VERSION_OFFSET   0x50

DDC version offset.

Referenced by XHdcp22Tx_IsDwnstrmCapable().

#define XHDCP22_TX_HDCPPORT_WRITE_MSG_OFFSET   0x60

DDC write message buffer offset.

#define XHDCP22_TX_I_H

prevent circular inclusions by using protection macros.

#define XHDCP22_TX_INVALID_RXSTATUS   0xFFFF

RxStatus value used to force re-authentication.

#define XHDCP22_TX_K_SIZE   2

K size in bytes.

#define XHDCP22_TX_KPUB_DCP_LLC_E_SIZE   1

LLC public key-E size.

Referenced by XHdcp22Tx_LoadRevocationTable().

#define XHDCP22_TX_KPUB_DCP_LLC_N_SIZE   384

LLC public key-N size.

Referenced by XHdcp22Tx_LoadRevocationTable().

#define XHDCP22_TX_KS_SIZE   16

128 bits.

Referenced by XHdcp22Tx_ComputeEdkeyKs().

#define XHDCP22_TX_L_PRIME_SIZE   32

256 bits.

#define XHDCP22_TX_LC128_SIZE   16

Lc128 global constant size.

Referenced by XHdcp22Tx_LoadLc128().

#define XHDCP22_TX_LC_INIT   9

LC Init message.

#define XHDCP22_TX_LC_INIT_SIZE   9

LC Init message size.

#define XHDCP22_TX_LC_SEND_L_PRIME   10

Send L' message.

#define XHDCP22_TX_LC_SEND_L_PRIME_SIZE   33

Send L' message size.

#define XHDCP22_TX_LOG_BUFFER_SIZE   256

The size of the log buffer.

Referenced by XHdcp22Tx_LogRd(), and XHdcp22Tx_LogWr().

#define XHDCP22_TX_M_PRIME_SIZE   32

MPrime size in bytes.

#define XHDCP22_TX_MAX_ALLOWED_LOCALITY_CHECKS   8

Maximum allowed re-checking locality, prescribed by LLC.

#define XHDCP22_TX_MAX_ALLOWED_STREAM_MANAGE_CHECKS   128

Maximum allowed re-checking content stream management.

#define XHDCP22_TX_MAX_MESSAGE_SIZE   1+534

Needed storage to transmit/receive messages to the HDCP2.2 receiver This includes 1 extra byte for the DDC address used.

#define XHDCP22_TX_MAX_STORED_PAIRINGINFO   2

The list of maximum pairing info items to store.

#define XHDCP22_TX_MSG_UNDEFINED   0

Undefined.

Referenced by XHdcp22Tx_LogDisplay().

#define XHDCP22_TX_RCVID_SIZE   5

Unique receiver Id size in bytes.

Referenced by XHdcp22Tx_ComputeM(), and XHdcp22Tx_ComputeV().

#define XHDCP22_TX_REPEATAUTH_SEND_ACK   15

RepeaterAuth send ack message.

#define XHDCP22_TX_REPEATAUTH_SEND_ACK_SIZE   17

RepeaterAuth send ack message size in bytes.

#define XHDCP22_TX_REPEATAUTH_SEND_RECVID_LIST   12

Repeater Auth send receiver ID list message.

#define XHDCP22_TX_REPEATAUTH_SEND_RECVID_LIST_SIZE   177

Repeater Auth send receiver ID list maximum message size.

#define XHDCP22_TX_REPEATAUTH_STREAM_MANAGE   16

RepeaterAuth stream manage message.

#define XHDCP22_TX_REPEATAUTH_STREAM_MANAGE_SIZE   8

RepeaterAuth stream manage message size in bytes.

#define XHDCP22_TX_REPEATAUTH_STREAM_READY   17

RepeaterAuth stream ready message.

#define XHDCP22_TX_REPEATAUTH_STREAM_READY_SIZE   33

RepeaterAuth stream ready message size in bytes.

#define XHDCP22_TX_REPEATER_MAX_CASCADE_DEPTH   4

Max cascade depth.

#define XHDCP22_TX_REPEATER_MAX_DEVICE_COUNT   31

Max number of downstream devices allowed.

Referenced by XHdcp22Tx_ComputeM(), and XHdcp22Tx_ComputeV().

#define XHDCP22_TX_REVOCATION_LIST_MAX_DEVICES   944

Needed storage for the Device IDs in the revocation list.

Referenced by XHdcp22Tx_LoadRevocationTable().

#define XHDCP22_TX_RIV_SIZE   8

64-bits.

#define XHDCP22_TX_RN_SIZE   8
#define XHDCP22_TX_RXCAPS_SIZE   3

RX capabilities size.

Referenced by XHdcp22Tx_ComputeHPrime().

#define XHDCP22_TX_RXINFO_SIZE   2

RxInfo size in bytes.

Referenced by XHdcp22Tx_ComputeM(), and XHdcp22Tx_ComputeV().

#define XHDCP22_TX_RXSTATUS_AVAIL_BYTES_MASK   (0x3FF)

RX status available bytes in read message buffer.

#define XHDCP22_TX_RXSTATUS_READY_MASK   (1<<10)

RX status READY bit.

#define XHDCP22_TX_RXSTATUS_REAUTH_REQ_MASK   (1<<11)

HDCP Port DDC Rx status register masks.

RX status REAUTHENTICATION bit.

#define XHDCP22_TX_SEQ_NUM_M_SIZE   3

Seq_num_m size in bytes.

Referenced by XHdcp22Tx_ComputeM().

#define XHDCP22_TX_SEQ_NUM_V_SIZE   3

Seq_num_v size in bytes.

Referenced by XHdcp22Tx_ComputeV().

#define XHDCP22_TX_SHA256_HASH_SIZE   32

SHA256 hash size in bytes.

Referenced by XHdcp22Tx_ComputeLPrime(), and XHdcp22Tx_ComputeM().

#define XHDCP22_TX_SKE_SEND_EKS   11

Send Eks message.

Referenced by XHdcp22Tx_LogDisplay().

#define XHDCP22_TX_SKE_SEND_EKS_SIZE   25

Send Eks message size.

#define XHDCP22_TX_SRM_RCVID_SIZE   XHDCP22_TX_RCVID_SIZE

Receiver Id size in the SRM block.

Referenced by XHdcp22Tx_IsDeviceRevoked(), XHdcp22Tx_LoadRevocationTable(), and XHdcp22Tx_RevokeReceiverId().

#define XHDCP22_TX_SRM_SIGNATURE_SIZE   384

Signature size in the SRM block.

Referenced by XHdcp22Tx_VerifySRM().

#define XHDCP22_TX_STREAMID_TYPE_SIZE   2

Stream ID and Type size in bytes.

Referenced by XHdcp22Tx_ComputeM().

#define XHDCP22_TX_TEST_CERT_RX   0x00000001

Use a certificate test vector.

#define XHDCP22_TX_TEST_CLR_PAIRINGINFO   0x00000400

Pairing info is cleared, to force a non-stored Km scenario.

#define XHDCP22_TX_TEST_EKH_KM   0x00000008

Use a pairing info Ekh(Km) test vector, use i.c.w XHDCP22_TX_TEST_RCV_TIMEOUT.

#define XHDCP22_TX_TEST_H1   0x00000002

Use a H_Prime test vector.

#define XHDCP22_TX_TEST_INVALID_VALUE   0x00000010

Invalidate a value.

#define XHDCP22_TX_TEST_L1   0x00000004

Use a L_Prime test vector.

#define XHDCP22_TX_TEST_M1   0x00000080

Use a M_Prime test vector.

#define XHDCP22_TX_TEST_NO_TIMEOUT   0x00000200

Disable timeout checking.

this is mainly used to check the HDCP RX core in loopback mode in case it cannot meet timing requirements (no offloading to hardware) and reponsetimes need to be logged.

#define XHDCP22_TX_TEST_RCV_TIMEOUT   0x00000020

Timeout on a received message.

#define XHDCP22_TX_TEST_STORED_KM   0x00000100

AKE is forced using a stored Km scenarion.

Pairing info is pre-loaded with test vectors that forces Stored Km scenario.

#define XHDCP22_TX_TEST_USE_TEST_VECTOR_R1   0x80000000

Use testvectors for receiver R1.

#define XHDCP22_TX_TEST_V1   0x00000040

Use a V_Prime test vector.

#define XHDCP22_TX_TIMER_CNTR_0   0

Internal used timer counter for timeout checking.

Referenced by XHdcp22Tx_Enable(), and XHdcp22Tx_Reset().

#define XHDCP22_TX_TIMER_CNTR_1   1

Internal used timer counter for logging.

Referenced by XHdcp22Tx_LogGetTimeUSecs(), and XHdcp22Tx_LogReset().

#define XHDCP22_TX_TS_RX_REAUTH_CHECK   0xFF

Reason why the timer was started: Status checking.

Note
: The message ids also double as a reason identifier. Thus, the value of this define should NOT overlap a message Id.
#define XHDCP22_TX_TS_UNDEFINED   XHDCP22_TX_MSG_UNDEFINED

Reason why the timer was started: Undefined.

Referenced by XHdcp22Tx_CfgInitialize().

#define XHDCP22_TX_TS_WAIT_FOR_CIPHER   0xFE

Reason why the timer was started: Mandatory wait of 200 ms before the cipher may be activated.

Authenticated flag is only set after this period has expired.

Note
: The message ids also double as a reason identifier. Thus, the value of this define should NOT overlap a message Id.
#define XHDCP22_TX_TS_WAIT_FOR_STREAM_TYPE   0xFD

Reason why the timer was started: Waiting for Content Stream Type to be set when in repeater mode.

Note
: The message ids also double as a reason identifier. Thus, the value of this define should NOT overlap a message Id.
#define XHDCP22_TX_TXCAPS_SIZE   3

TX capabilities size.

Referenced by XHdcp22Tx_ComputeHPrime().

#define XHDCP22_TX_V_PRIME_SIZE   16

VPrime size in bytes.

#define XHDCP22_TX_V_SIZE   32

V size in bytes.

Typedef Documentation

typedef void(* XHdcp22_Tx_Callback)(void *HandlerRef)

Callback type for status.

Callback type used for pointer to single input function.

Parameters
CallbackRefis a callback reference passed in by the upper layer when setting the callback functions, and passed back to the upper layer when the callback is invoked.
Returns
None.
Note
None.
typedef int(* XHdcp22_Tx_DdcHandler)(u8 DeviceAddress, u16 ByteCount, u8 *BufferPtr, u8 Stop, void *RefPtr)

Callback type used for calling DDC read and write functions.

Parameters
DeviceAddressis the (i2c) device address of the HDCP port.
ByteCountis the amount of data bytes in the buffer to read or write.
BufferPtris a pointer to a buffer that is used for reading or writing.
Stopis a flag to control if a stop token is set or not.
RefPtris a callback reference passed in by the upper layer when setting the DDC reading and writing functions, and passed back to the upper layer when the callback is invoked.
Returns
  • XST_SUCCESS The read action was successful.
  • XST_FAILURE The read action failed.
Note
None.
typedef void XHdcp22_Tx_TransitionFuncType(XHdcp22_Tx *InstancePtr)

Pointer to the transition functions going from one state to the next.

Parameters
InstancePtris a pointer to the XHdcp22_Tx core instance.
Returns
None.
Note
None.
typedef XHdcp22_Tx_StateType XHdcp22Tx_StateFuncType(XHdcp22_Tx *InstancePtr)

Pointer to the state handling functions.

Parameters
InstancePtris a pointer to the XHdcp22_Tx core instance.
Returns
The next state that should be executed.
Note
None.

Enumeration Type Documentation

These constants specify return values on polling with XHdcp22Tx_Poll.

Depending on this return value, encryption of the HDMI signal should be set to encrypted or un-encrypted. See also XHdcp22Tx_EnableEncryption and XHdcp22Tx_DisableEncryption

Enumerator
XHDCP22_TX_INCOMPATIBLE_RX 

A HDCP2 compatible receiver is not found.

XHDCP22_TX_AUTHENTICATION_BUSY 

Authentication is busy.

XHDCP22_TX_AUTHENTICATED 

Authentication is completed successfully.

XHDCP22_TX_UNAUTHENTICATED 

Authentication failed.

XHDCP22_TX_REAUTHENTICATE_REQUESTED 

ReAuthentication requested.

XHDCP22_TX_DEVICE_IS_REVOKED 

A device in the HDCP chain is revoked.

XHDCP22_TX_NO_SRM_LOADED 

No valid SRM is loaded.

These constants are used to define the content stream type.

Enumerator
XHDCP22_STREAMTYPE_0 

Type 0 Content Stream.

Stream may be transmitted to all HDCP devices.

XHDCP22_STREAMTYPE_1 

Type 1 Content Stream.

Stream must not be transmitted to HDCP1.x devices and HDCP2.0 Repeaters.

These constants are used to identify callback functions.

Value definitions for debugging.

These values are used as parameter for the XHDCP22_TX_LOG_EVT_DBG logging event.

These constants are events as stored in the logging list.

Enumerator
XHDCP22_TX_LOG_EVT_NONE 

Log Event None.

XHDCP22_TX_LOG_EVT_STATE 

State of the state machine.

XHDCP22_TX_LOG_EVT_POLL_RESULT 

Authentication result of polling.

XHDCP22_TX_LOG_EVT_ENABLED 

HDCP2.2 core is enabled or disabled.

XHDCP22_TX_LOG_EVT_RESET 

HDCP2.2 core is reset.

XHDCP22_TX_LOG_EVT_ENCR_ENABLED 

HDCP2.2 stream is encrypted or not.

XHDCP22_TX_LOG_EVT_TEST_ERROR 

An error was detected in one of the test modes.

XHDCP22_TX_LOG_EVT_DBG 

Log event for debugging.

XHDCP22_TX_LOG_EVT_LCCHK_COUNT 

Number of times Locality check has been done.

XHDCP22_TX_LOG_EVT_STRMMNGCHK_COUNT 

Number of times Content Stream Management check has been done.

XHDCP22_TX_LOG_EVT_USER 

User logging.

XHDCP22_TX_LOG_INVALID 

Last value the list, only used for checking.

These constants are used to define the used mode.

Enumerator
XHDCP22_TX_TRANSMITTER 

Module acts as a HDCP 2.2 transmitter.

XHDCP22_TX_REPEATER 

Module acts as a HDCP 2.2 repeater.

XHDCP22_TX_CONVERTER 

Module acts as a HDCP 2.2 converter.

These constants are used to define the used protocol.

Enumerator
XHDCP22_TX_HDMI 

HDMI protocol.

XHDCP22_TX_DP 

Display Port protocol.

These constants specify the different states in the internal state machine.

Enumerator
XHDCP22_TX_STATE_H0 

No Rx Attached.

XHDCP22_TX_STATE_H1 

Transmit Low value content.

XHDCP22_TX_STATE_A0 

Known HDCP2 Capable Rx.

XHDCP22_TX_STATE_A1 

Exchange Km.

XHDCP22_TX_STATE_A1_1 

substate of A1: wait for AKE_SEND_CERT.

XHDCP22_TX_STATE_A1_NSK0 

No stored Km substate of A1: wait for AKE_SEND_H_PRIME.

XHDCP22_TX_STATE_A1_NSK1 

No stored Km substate of A1, wait for AKE_SEND_PAIRING_INFO.

XHDCP22_TX_STATE_A1_SK0 

Stored substate of A1, wait for AKE_SEND_PAIRING_INFO.

XHDCP22_TX_STATE_A2 

Locality Check.

XHDCP22_TX_STATE_A2_1 

Locality Check.

Receive and verify L_Prime.

XHDCP22_TX_STATE_A3 

Exchange Ks.

XHDCP22_TX_STATE_A4 

Test for repeater.

XHDCP22_TX_STATE_A5 

Authenticated.

XHDCP22_TX_STATE_A6_A7_A8 

Wait for receiver ID list, verify and send acknowledgment.

XHDCP22_TX_STATE_A6 

Wait for receiver ID list.

XHDCP22_TX_STATE_A7 

Verify Receiver ID List.

XHDCP22_TX_STATE_A8 

Send Receiver ID List acknowledgment.

XHDCP22_TX_STATE_A9 

Content Stream Management.

XHDCP22_TX_STATE_A9_1 

Content Stream Management.

Receive and verify M_Prime.

XHDCP22_TX_NUM_STATES 

Number of states in the state machine.

These constants are used to set the core into testing mode with #XHdcp22Tx_TestSetMode.

Enumerator
XHDCP22_TX_TESTMODE_DISABLED 

Testmode is disabled.

XHDCP22_TX_TESTMODE_SW_RX 

Actual HDCP2.2 RX component is connected.

XHDCP22_TX_TESTMODE_NO_RX 

HDCP2.2 RX software component is not available and will be emulated.

XHDCP22_TX_TESTMODE_UNIT 

HDCP2.2 RX is emulated, XHdcp22Tx_LogDisplay shows source code.

XHDCP22_TX_TESTMODE_USE_TESTKEYS 

Use test keys as defined in Errata to HDCP on HDMI Specification Revision 2.2, February 09, 2015.

XHDCP22_TX_TESTMODE_INVALID 

Last value the list, only used for checking.

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

Function Documentation

int XHdcp22Tx_Authenticate ( XHdcp22_Tx InstancePtr)

This function is a called to start authentication.

Parameters
InstancePtris a pointer to the XHdcp22Tx core instance.
Returns
  • XST_SUCCESS if authenticated is started successfully.
  • XST_FAIL if the state machine is disabled.
Note
None.

References XHdcp22_Tx_Info::AuthenticationStatus, XHdcp22_Tx_Info::CurrentState, XHdcp22_Tx::Info, XHdcp22_Tx_Info::IsContentStreamTypeSet, XHdcp22_Tx_Info::IsEnabled, XHdcp22_Tx_Info::IsReceiverHDCP2Capable, XHdcp22_Tx_Info::IsTopologyAvailable, XHdcp22_Tx_Info::PrvState, XHDCP22_TX_AUTHENTICATION_BUSY, XHDCP22_TX_STATE_H0, and XHdcp22Tx_IsRepeater().

int XHdcp22Tx_CfgInitialize ( XHdcp22_Tx InstancePtr,
XHdcp22_Tx_Config CfgPtr,
UINTPTR  EffectiveAddr 
)

This function initializes the HDCP22 TX core.

This function must be called prior to using the HDCP TX core. Initialization of the HDCP TX includes setting up the instance data and ensuring the hardware is in a quiescent state.

Parameters
InstancePtris a pointer to the XHdcp22_Tx core instance.
CfgPtrpoints to the configuration structure associated with the HDCP TX core.
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 Initialization was successful.
  • XST_FAILURE Initialization of the internal timer failed or there was a HDCP TX PIO ID mismatch.
Note
None.

References XHdcp22_Tx::AuthenticatedCallback, XHdcp22_Tx_Info::AuthenticationStatus, XHdcp22_Tx_Config::BaseAddress, XHdcp22_Tx::Config, XHdcp22_Tx_Info::ContentStreamType, XHdcp22_Tx_Info::CurrentState, XHdcp22_Tx::DdcRead, XHdcp22_Tx::DdcWrite, XHdcp22_Tx::DownstreamTopologyAvailableCallback, XHdcp22_Tx::Info, XHdcp22_Tx_Timer::InitialTicks, XHdcp22_Tx::IsAuthenticatedCallbackSet, XHdcp22_Tx_Info::IsContentStreamTypeSet, XHdcp22_Tx::IsDdcReadSet, XHdcp22_Tx::IsDdcWriteSet, XHdcp22_Tx::IsDownstreamTopologyAvailableCallbackSet, XHdcp22_Tx_Info::IsEnabled, XHdcp22_Tx::IsReady, XHdcp22_Tx_Info::IsReceiverHDCP2Capable, XHdcp22_Tx_Info::IsRevocationListValid, XHdcp22_Tx_Info::IsTopologyAvailable, XHdcp22_Tx::IsUnauthenticatedCallbackSet, XHdcp22_Tx_Info::MsgAvailable, XHdcp22_Tx_Info::PollingValue, XHdcp22_Tx_Info::Protocol, XHdcp22_Tx_Info::PrvState, XHdcp22_Tx_Timer::ReasonId, XHdcp22_Tx_Info::ReceivedFirstSeqNum_V, XHdcp22_Tx::RevocationList, XHdcp22_Tx_Info::StateContext, XHdcp22_Tx::Timer, XHdcp22_Tx_Timer::TimerExpired, XHdcp22_Tx::UnauthenticatedCallback, XHDCP22_STREAMTYPE_0, XHDCP22_TX_DEFAULT_RX_STATUS_POLLVALUE, XHDCP22_TX_HDMI, XHDCP22_TX_STATE_A0, XHDCP22_TX_STATE_A1, XHDCP22_TX_STATE_A1_1, XHDCP22_TX_STATE_A1_NSK0, XHDCP22_TX_STATE_A1_NSK1, XHDCP22_TX_STATE_A1_SK0, XHDCP22_TX_STATE_A2, XHDCP22_TX_STATE_A2_1, XHDCP22_TX_STATE_A3, XHDCP22_TX_STATE_A4, XHDCP22_TX_STATE_A5, XHDCP22_TX_STATE_A6_A7_A8, XHDCP22_TX_STATE_A9, XHDCP22_TX_STATE_H0, XHDCP22_TX_TS_UNDEFINED, XHDCP22_TX_UNAUTHENTICATED, XHdcp22Tx_ClearPairingInfo(), and XHdcp22Tx_LogReset().

int XHdcp22Tx_ClearPairingInfo ( XHdcp22_Tx InstancePtr)

This function clear the global pairing info structure, so every HDCP2.2 receiver will have to go through the 'no stored km' sequence to authenticate.

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

References XHdcp22_Tx::Info.

Referenced by XHdcp22Tx_CfgInitialize().

void XHdcp22Tx_ComputeEdkeyKs ( const u8 *  Rn,
const u8 *  Km,
const u8 *  Ks,
const u8 *  Rrx,
const u8 *  Rtx,
u8 *  EdkeyKs 
)

This function computes EdkeyKs.

Kd is calculated as in XHdcp22Tx_ComputeHPrime, but could also be stored the first time. This could save some computing time. According protocol however, only Rrx and Rtx are supposed to be stored.

Parameters
Rnis a pseudo-random nonce.
Kmis the master key generated by tx.. See also XHdcp22Tx_ComputeHPrime
Ksis the session key.
Rrxis the random value generated by rx.
Rtxis the random value generated by tx.
EdkeyKsis the encrypted Ks output.
Returns
None.
Note
None.

References XHDCP22_TX_AES128_SIZE, XHDCP22_TX_EDKEY_KS_SIZE, XHDCP22_TX_KS_SIZE, XHDCP22_TX_RN_SIZE, XHDCP22_TX_RRX_SIZE, XHDCP22_TX_RTX_SIZE, and XHdcp22Tx_MemXor().

void XHdcp22Tx_ComputeHPrime ( const u8 *  Rrx,
const u8 *  RxCaps,
const u8 *  Rtx,
const u8 *  TxCaps,
const u8 *  Km,
u8 *  HPrime 
)

This function computes HPrime.

Parameters
Rrxis the Rx random generated value on start of authentication.
RxCapsare the capabilities of the receiver.
Rtxis the Tx random generated value start of authentication.
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.

References XHDCP22_TX_AES128_SIZE, XHDCP22_TX_RRX_SIZE, XHDCP22_TX_RTX_SIZE, XHDCP22_TX_RXCAPS_SIZE, and XHDCP22_TX_TXCAPS_SIZE.

void XHdcp22Tx_ComputeLPrime ( const u8 *  Rn,
const u8 *  Km,
const u8 *  Rrx,
const u8 *  Rtx,
u8 *  LPrime 
)

This function computes LPrime.

Kd is calculated as in XHdcp22Tx_ComputeHPrime, but could also be stored the first time. This could save some computing time. According protocol however, only Rrx and Rtx are supposed to be stored.

Parameters
Rnis a pseudo-random nonce.
Kmis the master key generated by tx and previouslyd stored.
Rrxis the random value generated by rx.
Rtxis the random value generated by tx.
LPrimeis a pointer to the computed LPrime hash.
Returns
None.
Note
None.

References XHDCP22_TX_AES128_SIZE, XHDCP22_TX_RN_SIZE, XHDCP22_TX_RRX_SIZE, XHDCP22_TX_RTX_SIZE, XHDCP22_TX_SHA256_HASH_SIZE, and XHdcp22Tx_MemXor().

void XHdcp22Tx_ComputeM ( const u8 *  Rn,
const u8 *  Rrx,
const u8 *  Rtx,
const u8 *  StreamIDType,
const u8 *  k,
const u8 *  SeqNum_M,
const u8 *  Km,
u8 *  M 
)
void XHdcp22Tx_ComputeV ( const u8 *  Rn,
const u8 *  Rrx,
const u8 *  RxInfo,
const u8 *  Rtx,
const u8 *  RecvIDList,
const u8  RecvIDCount,
const u8 *  SeqNum_V,
const u8 *  Km,
u8 *  V 
)

This function computes V.

Parameters
@paramV is a pointer to the computed V hash.
Returns
None.
Note
None.

References XHDCP22_TX_AES128_SIZE, XHDCP22_TX_RCVID_SIZE, XHDCP22_TX_REPEATER_MAX_DEVICE_COUNT, XHDCP22_TX_RRX_SIZE, XHDCP22_TX_RTX_SIZE, XHDCP22_TX_RXINFO_SIZE, and XHDCP22_TX_SEQ_NUM_V_SIZE.

int XHdcp22Tx_Disable ( XHdcp22_Tx InstancePtr)

This function disables the state machine and acts as a pause.

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

References XHdcp22_Tx::Cipher, XHdcp22_Tx::Info, XHdcp22_Tx_Info::IsEnabled, XHDCP22_TX_LOG_EVT_ENABLED, and XHdcp22Tx_LogWr().

void XHdcp22Tx_DisableBlank ( XHdcp22_Tx InstancePtr)

This function disables the blank output for the cipher.

Parameters
InstancePtris a pointer to the XHdcp22Tx core instance.
Returns
- XST_SUCCESS if authenticated is started successfully.
  • XST_FAIL if the state machine is disabled.
Note
None.

References XHdcp22_Tx::Cipher.

int XHdcp22Tx_DisableEncryption ( XHdcp22_Tx InstancePtr)

This function disables HDMI stream encryption by disabling the cipher.

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

References XHdcp22_Tx::Cipher, XHDCP22_TX_LOG_EVT_ENCR_ENABLED, and XHdcp22Tx_LogWr().

Referenced by XHdcp22Tx_Reset().

int XHdcp22Tx_Enable ( XHdcp22_Tx InstancePtr)

This function enables the state machine and acts as a resume.

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

References XHdcp22_Tx::Cipher, XHdcp22_Tx::Info, XHdcp22_Tx_Info::IsEnabled, XHdcp22_Tx::Timer, XHdcp22_Tx_Timer::TmrCtr, XHDCP22_TX_LOG_EVT_ENABLED, XHDCP22_TX_TIMER_CNTR_0, and XHdcp22Tx_LogWr().

void XHdcp22Tx_EnableBlank ( XHdcp22_Tx InstancePtr)

This function enables the blank output for the cipher.

Parameters
InstancePtris a pointer to the XHdcp22Tx core instance.
Returns
- XST_SUCCESS if authenticated is started successfully.
  • XST_FAIL if the state machine is disabled.
Note
None.

References XHdcp22_Tx::Cipher.

int XHdcp22Tx_EnableEncryption ( XHdcp22_Tx InstancePtr)

This function enables HDMI stream encryption by enabling the cipher.

Parameters
InstancePtris a pointer to the XHdcp22Tx core instance.
Returns
- XST_SUCCESS if authenticated is started successfully.
  • XST_FAIL if the state machine is disabled.
Note
None.

References XHdcp22_Tx::Cipher, XHDCP22_TX_LOG_EVT_ENCR_ENABLED, XHdcp22Tx_IsAuthenticated(), and XHdcp22Tx_LogWr().

int XHdcp22Tx_EncryptKm ( const XHdcp22_Tx_CertRx CertificatePtr,
const u8 *  KmPtr,
u8 *  MaskingSeedPtr,
u8 *  EncryptedKmPtr 
)

This function encrypts the Km value with the receivers public key into Ekh(Km)

Parameters
CertificatePtris a pointer to the certificate from the HDCP2.2 receiver.
KmPtris the random master key.
MaskingSeedPtris a pointer to a 32 byte seed for masking in the MGF1 function used in RSA-OEAP encryption.
EncryptedKmPtroutput of the encryption with a 128 byte (1024 bit) size.
Returns
  • XST_SUCCESS if encryption succeeded.
  • XST_FAILURE if encryption failed.
Note
None.

References XHDCP22_TX_CERT_PUB_KEY_E_SIZE, and XHDCP22_TX_CERT_PUB_KEY_N_SIZE.

void XHdcp22Tx_GenerateRandom ( XHdcp22_Tx InstancePtr,
int  NumOctets,
u8 *  RandomNumberPtr 
)

This function generates random octets.

Otherwise it uses offloading from hardware.

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

References XHdcp22_Tx::Rng.

XHdcp22_Tx_RevocationList * XHdcp22Tx_GetRevocationReceiverIdList ( XHdcp22_Tx InstancePtr)

This function returns a pointer to the Revocation Receiver ID list.

Parameters
InstancePtris a pointer to the XHdcp22_Tx instance.
Returns
Pointer to the XHdcp22_Tx_RevocationList instance.

References XHdcp22_Tx::RevocationList.

Referenced by XHdcp22Tx_IsDeviceRevoked(), XHdcp22Tx_LoadRevocationTable(), and XHdcp22Tx_RevokeReceiverId().

XTmrCtr * XHdcp22Tx_GetTimer ( XHdcp22_Tx 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 XHdcp22Tx core instance.
Returns
A pointer to the internal timer control instance.
Note
None.

References XHdcp22_Tx::Timer, and XHdcp22_Tx_Timer::TmrCtr.

XHdcp22_Tx_Topology * XHdcp22Tx_GetTopology ( XHdcp22_Tx InstancePtr)

This function returns a pointer to the downstream topology structure.

Parameters
InstancePtris a pointer to the XHdcp22_Tx core instance.
Returns
A pointer to the XHdcp22_Tx_Topology structure or NULL when the topology info is invalid.
Note
None.

References XHdcp22_Tx::Info, XHdcp22_Tx_Info::IsTopologyAvailable, and XHdcp22_Tx::Topology.

u32 XHdcp22Tx_GetTopologyField ( XHdcp22_Tx InstancePtr,
XHdcp22_Tx_TopologyField  Field 
)

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

Parameters
InstancePtris a pointer to the XHdcp22_Tx core instance.
Fieldindicates what field of the topology structure to get.
Returns
Value associated to field inside the topology structure.
Note
None.
u8 * XHdcp22Tx_GetTopologyReceiverIdList ( XHdcp22_Tx InstancePtr)

This function returns a pointer to the ReceiverID list in the repeater topology structure.

Parameters
InstancePtris a pointer to the XHdcp22_Tx core instance.
Returns
A pointer to the ReceiverID list in the topology structure.
Note
None.

References XHdcp22_Tx_Topology::ReceiverId, and XHdcp22_Tx::Topology.

u32 XHdcp22Tx_GetVersion ( XHdcp22_Tx InstancePtr)

This function reads the version.

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

References XHdcp22_Tx::Cipher.

u8 XHdcp22Tx_IsAuthenticated ( XHdcp22_Tx InstancePtr)

This function returns the current authenticated state.

Parameters
InstancePtris a pointer to the XHdcp22Tx core instance.
Returns
TRUE if authenticated otherwise FALSE.
Note
None.

References XHdcp22_Tx_Info::AuthenticationStatus, XHdcp22_Tx::Info, and XHDCP22_TX_AUTHENTICATED.

Referenced by XHdcp22Tx_EnableEncryption().

u8 XHdcp22Tx_IsDeviceRevoked ( XHdcp22_Tx InstancePtr,
u8 *  RecvIdPtr 
)

This function searches for the specified ReceiverID in the revocation list.

Parameters
InstancePtris a pointer to the XHdcp22_Tx core instance.
RecvIdPtris a pointer to the ReceiverID to lookup
Returns
  • TRUE if Receiver ID was found in the revocation list
  • FALSE if Receiver ID was not found in the revocation list
Note
None.

References XHDCP22_TX_SRM_RCVID_SIZE, and XHdcp22Tx_GetRevocationReceiverIdList().

Referenced by XHdcp22Tx_RevokeReceiverId().

u8 XHdcp22Tx_IsDwnstrmCapable ( XHdcp22_Tx InstancePtr)

This function checks if the downstream device HDCP2Version register is set.

Parameters
InstancePtris a pointer to the XHdcp22Tx core instance.
Returns
- TRUE if downstream device is HDCP 2.2 capable.
  • FALSE if downstream device is not HDCP 2.2 capable.
Note
None.

References XHdcp22_Tx::DdcHandlerRef, XHdcp22_Tx::DdcRead, XHdcp22_Tx::DdcWrite, XHdcp22_Tx::IsReceiverHDCP2Capable, XHDCP22_TX_DDC_BASE_ADDRESS, and XHDCP22_TX_HDCPPORT_VERSION_OFFSET.

u8 XHdcp22Tx_IsEnabled ( XHdcp22_Tx InstancePtr)

This function returns the current enabled state.

Parameters
InstancePtris a pointer to the XHdcp22Tx core instance.
Returns
TRUE if enabled otherwise FALSE.
Note
None.

References XHdcp22_Tx::Info, and XHdcp22_Tx_Info::IsEnabled.

Referenced by XHdcp22Tx_Info().

u8 XHdcp22Tx_IsEncryptionEnabled ( XHdcp22_Tx InstancePtr)

This function returns the current encryption enabled state.

Parameters
InstancePtris a pointer to the XHdcp22Tx core instance.
Returns
TRUE if encryption is enabled otherwise FALSE.
Note
None.

References XHdcp22_Tx::Cipher.

Referenced by XHdcp22Tx_Info().

u8 XHdcp22Tx_IsInProgress ( XHdcp22_Tx InstancePtr)

This function returns the current progress state.

Parameters
InstancePtris a pointer to the XHdcp22Tx core instance.
Returns
TRUE if authentication is in progress otherwise FALSE.
Note
None.

References XHdcp22_Tx_Info::AuthenticationStatus, XHdcp22_Tx::Info, and XHDCP22_TX_UNAUTHENTICATED.

u8 XHdcp22Tx_IsRepeater ( XHdcp22_Tx InstancePtr)

This function returns the current repeater mode status.

Parameters
InstancePtris a pointer to the XHdcp22_Tx instance.
Returns
  • TRUE if the HDCP 2.2 instance is part of the downstream port of a repeater
  • FALSE if the HDCP 2.2 instance is a transmitter

References XHdcp22_Tx::Config, XHdcp22_Tx_Config::Mode, and XHDCP22_TX_TRANSMITTER.

Referenced by XHdcp22Tx_Authenticate(), and XHdcp22Tx_Info().

void XHdcp22Tx_LoadLc128 ( XHdcp22_Tx 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_Tx core instance.
Lc128Ptris a pointer to an array.
Returns
None.
Note
None.

References XHdcp22_Tx::Cipher, and XHDCP22_TX_LC128_SIZE.

int XHdcp22Tx_LoadRevocationTable ( XHdcp22_Tx InstancePtr,
const u8 *  SrmPtr 
)

This function is used to load the system renewability messages (SRMs) which carries the Receiver ID revocation list.

Parameters
InstancePtris a pointer to the XHdcp22_Tx core instance.
SrmPtris a pointer to an array.
Returns
  • XST_SUCCESS if loaded SRM successfully.
  • XST_FAILURE if SRM signature verification failed.
Note
None.

References XHdcp22_Tx::Info, XHdcp22_Tx_Info::IsRevocationListValid, XHDCP22_TX_KPUB_DCP_LLC_E_SIZE, XHDCP22_TX_KPUB_DCP_LLC_N_SIZE, XHDCP22_TX_REVOCATION_LIST_MAX_DEVICES, XHDCP22_TX_SRM_RCVID_SIZE, XHdcp22Tx_GetRevocationReceiverIdList(), and XHdcp22Tx_VerifySRM().

u32 XHdcp22Tx_LogGetTimeUSecs ( XHdcp22_Tx InstancePtr)

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

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

References XHdcp22_Tx::Timer, XHdcp22_Tx_Timer::TmrCtr, and XHDCP22_TX_TIMER_CNTR_1.

Referenced by XHdcp22Tx_LogWr().

XHdcp22_Tx_LogItem * XHdcp22Tx_LogRd ( XHdcp22_Tx InstancePtr)

This function provides the log information from the log buffer.

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

References XHdcp22_Tx_LogItem::Data, XHdcp22_Tx_Log::Head, XHdcp22_Tx::Log, XHdcp22_Tx_LogItem::LogEvent, XHdcp22_Tx_Log::LogItems, XHdcp22_Tx_Log::Tail, XHdcp22_Tx_LogItem::TimeStamp, XHDCP22_TX_LOG_BUFFER_SIZE, and XHDCP22_TX_LOG_EVT_NONE.

Referenced by XHdcp22Tx_LogDisplay().

void XHdcp22Tx_LogReset ( XHdcp22_Tx InstancePtr,
u8  Verbose 
)

This function clears the log pointers.

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

References XHdcp22_Tx_Log::Head, XHdcp22_Tx::Log, XHdcp22_Tx_Log::Tail, XHdcp22_Tx::Timer, XHdcp22_Tx_Timer::TmrCtr, XHdcp22_Tx_Log::Verbose, and XHDCP22_TX_TIMER_CNTR_1.

Referenced by XHdcp22Tx_CfgInitialize().

void XHdcp22Tx_LogWr ( XHdcp22_Tx InstancePtr,
XHdcp22_Tx_LogEvt  Evt,
u16  Data 
)

This function writes HDCP TX logs into buffer.

Parameters
InstancePtris a pointer to the XHdcp22_Tx core instance.
Evtspecifies an action to be carried out. Please refer XHdcp22_Tx_LogEvt enum in xhdcp22_tx.h.
Dataspecifies the information that gets written into log buffer.
Returns
None.
Note
None.

References XHdcp22_Tx_LogItem::Data, XHdcp22_Tx_Log::Head, XHdcp22_Tx::Log, XHdcp22_Tx_LogItem::LogEvent, XHdcp22_Tx_Log::LogItems, XHdcp22_Tx_Log::Tail, XHdcp22_Tx_LogItem::TimeStamp, XHdcp22_Tx_Log::Verbose, XHDCP22_TX_LOG_BUFFER_SIZE, XHDCP22_TX_LOG_EVT_DBG, XHDCP22_TX_LOG_INVALID, and XHdcp22Tx_LogGetTimeUSecs().

Referenced by XHdcp22Tx_Disable(), XHdcp22Tx_DisableEncryption(), XHdcp22Tx_Enable(), XHdcp22Tx_EnableEncryption(), XHdcp22Tx_Poll(), and XHdcp22Tx_Reset().

XHdcp22_Tx_Config * XHdcp22Tx_LookupConfig ( u16  DeviceId)

This function returns a reference to an XHdcp22_Tx_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_tx_g.c file.

Parameters
DeviceIdis the unique core ID of the HDCP2.2 TX core for the lookup operation.
Returns
XHdcp22Tx_LookupConfig returns a reference to a config record in the configuration table (in xhdcp22_tx_g.c) corresponding to DeviceId, or NULL if no match is found.
Note
None.
void XHdcp22Tx_MemXor ( u8 *  Output,
const u8 *  InputA,
const u8 *  InputB,
unsigned int  Size 
)

This function calculates a XOR on a array.

Parameters
Outputis the XOR of the input arrays.
InputAis a input array.
InputBis a input array.
Sizeis the size of the buffers to XOR.
Returns
None.
Note
None.

Referenced by XHdcp22Tx_ComputeEdkeyKs(), and XHdcp22Tx_ComputeLPrime().

int XHdcp22Tx_Poll ( XHdcp22_Tx InstancePtr)

This function is a executed every time to trigger the state machine.

The user of HDCP22 TX is responsible to call this function on a regular base.

Parameters
InstancePtris a pointer to the XHdcp22Tx core instance.
Returns
Enumerated authentication status defined in XHdcp22_Tx_AuthenticationType.
Note
None.

References XHdcp22_Tx_Info::AuthenticationStatus, XHdcp22_Tx_Info::CurrentState, XHdcp22_Tx::Info, XHdcp22_Tx_Info::IsEnabled, XHdcp22_Tx_Info::PrvState, XHdcp22_Tx::Timer, XHdcp22_Tx_Timer::TimerExpired, XHDCP22_TX_AUTHENTICATION_BUSY, XHDCP22_TX_LOG_EVT_POLL_RESULT, XHdcp22_Tx_StateTable, and XHdcp22Tx_LogWr().

void XHdcp22Tx_RevokeReceiverId ( XHdcp22_Tx InstancePtr,
u8 *  ReceiverIdPtr 
)

This function adds a ReceiverID to RevocationList.

Parameters
InstancePtris a pointer to the XHdcp22Tx core instance.
ReceiverIdis a pointer to a 5-byte receiver Id.
Returns
None.
Note
Supposed to be called by Upstream Content Control Function

References XHdcp22_Tx_Info::AuthenticationStatus, XHdcp22_Tx::Config, XHdcp22_Tx_Info::CurrentState, XHdcp22_Tx::Info, XHdcp22_Tx_Info::IsDeviceRevoked, XHdcp22_Tx_Info::IsRevocationListValid, XHdcp22_Tx_Config::Mode, XHDCP22_TX_DEVICE_IS_REVOKED, XHDCP22_TX_SRM_RCVID_SIZE, XHDCP22_TX_STATE_A0, XHDCP22_TX_TRANSMITTER, XHdcp22Tx_GetRevocationReceiverIdList(), and XHdcp22Tx_IsDeviceRevoked().

int XHdcp22Tx_SetCallback ( XHdcp22_Tx InstancePtr,
XHdcp22_Tx_HandlerType  HandlerType,
void *  CallbackFunc,
void *  CallbackRef 
)

This function installs callback functions for the given HandlerType:

HandlerType                                        Callback Function Type
-------------------------                          ---------------------------
(XHDCP22_TX_HANDLER_DDC_WRITE)                     DdcWrite
(XHDCP22_TX_HANDLER_DDC_READ)                      DdcRead
(XHDCP22_TX_HANDLER_AUTHENTICATED)                 AuthenticatedCallback
(XHDCP22_TX_HANDLER_UNAUTHENTICATED)               UnauthenticatedCallback
(XHDCP22_TX_HANDLER_DOWNSTREAM_TOPOLOGY_AVAILABLE) DownstreamTopologyAvailableCallback
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_Tx::AuthenticatedCallback, XHdcp22_Tx::DdcHandlerRef, XHdcp22_Tx::DdcRead, XHdcp22_Tx::DdcWrite, XHdcp22_Tx::DownstreamTopologyAvailableCallback, XHdcp22_Tx::IsAuthenticatedCallbackSet, XHdcp22_Tx::IsDdcReadSet, XHdcp22_Tx::IsDdcWriteSet, XHdcp22_Tx::IsDownstreamTopologyAvailableCallbackSet, XHdcp22_Tx::IsUnauthenticatedCallbackSet, and XHdcp22_Tx::UnauthenticatedCallback.

void XHdcp22Tx_SetContentStreamType ( XHdcp22_Tx InstancePtr,
XHdcp22_Tx_ContentStreamType  StreamType 
)

This function sets the Content Stream Type.

Parameters
InstancePtris a pointer to the XHdcp22_Tx instance.
StreamTypespecifies the content stream type.
Returns
None

References XHdcp22_Tx_Info::ContentStreamType, XHdcp22_Tx::Info, and XHdcp22_Tx_Info::IsContentStreamTypeSet.

void XHdcp22Tx_SetMessagePollingValue ( XHdcp22_Tx InstancePtr,
u32  PollingValue 
)

This function can be used to change the polling value.

The polling value is the amount of time in milliseconds to wait between successive reads of the RxStatus register. The RxStatus register is polled to determine when a message is available for reading during authentication or during the link integrity check phase to determine when to issue re-authentication. The polling value needs to be at most 20ms to account for the locality check.

Parameters
InstancePtris a pointer to the XHdcp22Tx core instance.
PollingValueis the polling interval defined in milliseconds
  • 0 : Always Poll
  • 1 : Poll after 1ms
  • 2 : Poll after 2ms
  • 3 : Poll after 3ms etc...
Returns
None.
Note
None.

References XHdcp22_Tx::Info, and XHdcp22_Tx_Info::PollingValue.

void XHdcp22Tx_SetRepeater ( XHdcp22_Tx InstancePtr,
u8  Set 
)

This function sets the repeater mode status.

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

References XHdcp22_Tx::Config, XHdcp22_Tx_Config::Mode, XHDCP22_TX_REPEATER, and XHDCP22_TX_TRANSMITTER.

int XHdcp22Tx_VerifyCertificate ( const XHdcp22_Tx_CertRx CertificatePtr,
const u8 *  KpubDcpNPtr,
int  KpubDcpNSize,
const u8 *  KpubDcpEPtr,
int  KpubDcpESize 
)

This function verifies the HDCP receivers certificate.

Parameters
CertificatePtris a pointer to the certificate from the HDCP2.2 receiver.
KpubDcpNPtris a pointer to the N-value of the certificate signature.
KpubDcpNSizeis the size of the N-value of the certificates signature.
KpubDcpEPtriis a pointer to the E-value of the certificate signature.
KpubDcpESizeis the size of the E-value of the certificates signature.
Returns
  • XST_SUCCESS if the certificate is valid.
  • XST_FAILURE if the certificate is invalid.
Note
None.
int XHdcp22Tx_VerifySRM ( const u8 *  SrmPtr,
int  SrmSize,
const u8 *  KpubDcpNPtr,
int  KpubDcpNSize,
const u8 *  KpubDcpEPtr,
int  KpubDcpESize 
)

This function verifies a HDCP2 system renewability message (SRM) block.

Parameters
SrmPtris a pointer to the SRM.
SrmSizeis the size of the SRM in bytes.
KpubDcpNPtris a pointer to the N-value of the DCP LLC key.
KpubDcpNSizeis the size of the N-value of the DCP LLC key.
KpubDcpEPtriis a pointer to the E-value of the DCP LLC key.
KpubDcpESizeis the size of the E-value of the DCP LLC key.
Returns
  • XST_SUCCESS if the SRM block is valid.
  • XST_FAILURE if the SRM block is invalid.
Note
None.

References XHDCP22_TX_SRM_SIGNATURE_SIZE.

Referenced by XHdcp22Tx_LoadRevocationTable().

Variable Documentation

XHdcp22Tx_StateFuncType* const XHdcp22_Tx_StateTable[XHDCP22_TX_NUM_STATES]
Initial value:
=
{
XHdcp22Tx_StateH0, XHdcp22Tx_StateH1, XHdcp22Tx_StateA0,
XHdcp22Tx_StateA1, Xhdcp22Tx_StateA1_1,
Xhdcp22Tx_StateA1_Nsk0, Xhdcp22Tx_StateA1_Nsk1, Xhdcp22Tx_StateA1_Sk0,
XHdcp22Tx_StateA2, XHdcp22Tx_StateA2_1,
XHdcp22Tx_StateA3, XHdcp22Tx_StateA4, XHdcp22Tx_StateA5,
XHdcp22Tx_StateA6_A7_A8,
XHdcp22Tx_StateA6, XHdcp22Tx_StateA7, XHdcp22Tx_StateA8, XHdcp22Tx_StateA9, XHdcp22Tx_StateA9_1
}

This table contains the function pointers for all possible states.

The order of elements must match the XHdcp22_Tx_StateType enumerator definitions.

Referenced by XHdcp22Tx_Poll().