XilinxProcessorIPLib/drivers/hdcp1x/src/xhdcp1x_cipher.c
u64 XHdcp1x_CipherGetEncryption(const XHdcp1x *InstancePtr)
{
	u64 StreamMap = 0;

	/* Verify arguments. */
	Xil_AssertNonvoid(InstancePtr != NULL);

	/* Check that it is not disabled */
	if (!XHdcp1x_CipherIsEnabled(InstancePtr)) {
		return (StreamMap);
	}

	/* Determine StreamMap */
	StreamMap  = XHdcp1x_ReadReg(InstancePtr->Config.BaseAddress,
		XHDCP1X_CIPHER_REG_ENCRYPT_ENABLE_H);
	StreamMap <<= 32;
	StreamMap |= XHdcp1x_ReadReg(InstancePtr->Config.BaseAddress,
		XHDCP1X_CIPHER_REG_ENCRYPT_ENABLE_L);

	/* Check for special case of just XOR in progress */
	if ((StreamMap == 0) &&
			(XHdcp1x_CipherXorInProgress(InstancePtr))) {
		StreamMap = 0x01ul;
	}

	return (StreamMap);
}
/*****************************************************************************/
/**
* This function retrieves the current encryption stream map.
*
* @param	InstancePtr is the device to query.
*
* @return	The current encryption stream map.
*
* @note		In the case of the receiver version of this core, the XOR in
*		progress bit needs to be checked as well as the encryption map
*		to fully determine if encryption is enabled for the SST case.
*		This is the reason for the additional check in this code.
*
******************************************************************************/
This function retrieves the current encryption stream map.
This function retrieves the current encryption stream map .
u64 XHdcp1x_CipherGetEncryption(const XHdcp1x *InstancePtr)
{
	u64 StreamMap = 0;
	Xil_AssertNonvoid(InstancePtr != NULL);
	if (!XHdcp1x_CipherIsEnabled(InstancePtr)) {
		return (StreamMap);
	}
	StreamMap  = XHdcp1x_ReadReg(InstancePtr->Config.BaseAddress,
		XHDCP1X_CIPHER_REG_ENCRYPT_ENABLE_H);
	StreamMap <<= 32;
	StreamMap |= XHdcp1x_ReadReg(InstancePtr->Config.BaseAddress,
		XHDCP1X_CIPHER_REG_ENCRYPT_ENABLE_L);
	if ((StreamMap == 0) &&
			(XHdcp1x_CipherXorInProgress(InstancePtr))) {
		StreamMap = 0x01ul;
	}
	return (StreamMap);
}
u64 XHdcp1x_CipherGetEncryption ( const XHdcp1x * InstancePtr ) { u64 StreamMap = 0 ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; if ( ! XHdcp1x_CipherIsEnabled ( InstancePtr ) ) { return ( StreamMap ) ; } StreamMap = XHdcp1x_ReadReg ( InstancePtr -> Config . BaseAddress , XHDCP1X_CIPHER_REG_ENCRYPT_ENABLE_H ) ; StreamMap <<= 32 ; StreamMap |= XHdcp1x_ReadReg ( InstancePtr -> Config . BaseAddress , XHDCP1X_CIPHER_REG_ENCRYPT_ENABLE_L ) ; if ( ( StreamMap == 0 ) && ( XHdcp1x_CipherXorInProgress ( InstancePtr ) ) ) { StreamMap = 0x01ul ; } return ( StreamMap ) ; }
This function retrieves the current encryption stream map.
This function retrieves the current encryption stream map .
/* Verify arguments. */ /* Check that it is not disabled */ /* Determine StreamMap */ /* Check for special case of just XOR in progress */