Lines Matching refs:KLCfg

2546 MS_BOOL _MDrv_DSCMB2_KLadder_AtomicExec(DSCMB_KLCfg_All* KLCfg , MS_U8 *ACPU_Out, DSCMB_KL_Status* …  in _MDrv_DSCMB2_KLadder_AtomicExec()  argument
2549 DSCMB_ASSERT(KLCfg != NULL, "KLCfg input error", FALSE); in _MDrv_DSCMB2_KLadder_AtomicExec()
2557 MS_U32 u32CAVid = KLCfg->u32CAVid; in _MDrv_DSCMB2_KLadder_AtomicExec()
2559 DSCMB_KL_SelEng eKLEng = KLCfg->eKLSel; in _MDrv_DSCMB2_KLadder_AtomicExec()
2560 DSCMB_KLDst eKLDst = KLCfg->eDst & (~E_DSCMB_KL_DST_KT_PIDSLOTMAP_ENABLE); in _MDrv_DSCMB2_KLadder_AtomicExec()
2561 DSCMB_KLSrc eKLSrc = KLCfg->eSrc & (~E_DSCMB_KL_SRC_KDF_ENABLE); in _MDrv_DSCMB2_KLadder_AtomicExec()
2562 MS_BOOL bEnableKDF = ((KLCfg->eSrc & E_DSCMB_KL_SRC_KDF_ENABLE) == E_DSCMB_KL_SRC_KDF_ENABLE); in _MDrv_DSCMB2_KLadder_AtomicExec()
2563 …MS_BOOL bEnablePidslotmap = ((KLCfg->eDst & E_DSCMB_KL_DST_KT_PIDSLOTMAP_ENABLE) == E_DSCMB_KL_DST… in _MDrv_DSCMB2_KLadder_AtomicExec()
2564 DSCMB_Key_Type eKeyType = KLCfg->eKeyType & (~E_DSCMB_KEY_FSCB_ENABLE); in _MDrv_DSCMB2_KLadder_AtomicExec()
2566 … MS_BOOL bEnableKeyFscb = ((KLCfg->eKeyType & E_DSCMB_KEY_FSCB_ENABLE) == E_DSCMB_KEY_FSCB_ENABLE); in _MDrv_DSCMB2_KLadder_AtomicExec()
2568 …MS_BOOL bKLDstSecure = ((KLCfg->eKeyType & E_DSCMB_KEY_SECURE_KEYS_ENABLE) == E_DSCMB_KEY_SECURE_K… in _MDrv_DSCMB2_KLadder_AtomicExec()
2591 if ((E_DSCMB_KL_SRC_ACPU == eKLSrc) && (NULL == KLCfg->u8KeyACPU)) in _MDrv_DSCMB2_KLadder_AtomicExec()
2598 if((KLCfg->u32Level >5) && (KLCfg->u32Level != 9) && (KLCfg->u32Level != 0xD)) in _MDrv_DSCMB2_KLadder_AtomicExec()
2604 else if(( 0 == KLCfg->u32Level ) && (0==(DSCMB_KL_DST_CLASS_DMA & eKLDst))) in _MDrv_DSCMB2_KLadder_AtomicExec()
2667 u32FltId = KLCfg->u32DscID; in _MDrv_DSCMB2_KLadder_AtomicExec()
2671 if ( FALSE == DscmbTspMap[KLCfg->u32EngID][KLCfg->u32DscID].bUsed ) in _MDrv_DSCMB2_KLadder_AtomicExec()
2677 if( 0 == DscmbTspMap[KLCfg->u32EngID][KLCfg->u32DscID].u32PidFltIdNum ) in _MDrv_DSCMB2_KLadder_AtomicExec()
2685 if(FALSE == _DSCMB_Dscmb2Flt(KLCfg->u32DscID, &u32FltId)) in _MDrv_DSCMB2_KLadder_AtomicExec()
2709 u32FltId = KLCfg->u32DscID; //TSIO service id in _MDrv_DSCMB2_KLadder_AtomicExec()
2724 if ((KLCfg->u32Level != 0) && (NULL == KLCfg->pu8KeyKLIn)) in _MDrv_DSCMB2_KLadder_AtomicExec()
2732 …LPreLevel) || ((E_DSCMB_KL_TYPE_INF == _u8KLPreLevel) && (E_DSCMB_KL_TYPE_LV1 == KLCfg->u32Level))) in _MDrv_DSCMB2_KLadder_AtomicExec()
2734 _u8KLPreLevel = KLCfg->u32Level; in _MDrv_DSCMB2_KLadder_AtomicExec()
2739 _u8KLPreLevel = KLCfg->u32Level; in _MDrv_DSCMB2_KLadder_AtomicExec()
2746 HAL_DSCMB_KL_ACPURootKey(eKLEng, KLCfg->u8KeyACPU); in _MDrv_DSCMB2_KLadder_AtomicExec()
2763 …HAL_DSCMB_KL_KDF_Enable( eKLEng, KLCfg->stKDF.eKDFType, KLCfg->stKDF.u16AppId, KLCfg->stKDF.eHWKey… in _MDrv_DSCMB2_KLadder_AtomicExec()
2767 if(E_DSCMB_KL_TYPE_INF == KLCfg->u32Level) //Keep round, 1 stage in _MDrv_DSCMB2_KLadder_AtomicExec()
2769 HAL_DSCMB_KL_Input(eKLEng, 0, KLCfg->pu8KeyKLIn); in _MDrv_DSCMB2_KLadder_AtomicExec()
2771 else if(E_DSCMB_KL_TYPE_S5 == KLCfg->u32Level) //SMI Keyladder in _MDrv_DSCMB2_KLadder_AtomicExec()
2775 HAL_DSCMB_KL_Input(eKLEng, (4 - i), KLCfg->pu8KeyKLIn+(16*i)); in _MDrv_DSCMB2_KLadder_AtomicExec()
2778 else if(KLCfg->u32Level <= 5) //0~5 level keyladder in _MDrv_DSCMB2_KLadder_AtomicExec()
2780 for( i = 0 ; i < KLCfg->u32Level ; i ++ ) in _MDrv_DSCMB2_KLadder_AtomicExec()
2782 HAL_DSCMB_KL_Input(eKLEng, (KLCfg->u32Level-i-1), KLCfg->pu8KeyKLIn+(16*i)); in _MDrv_DSCMB2_KLadder_AtomicExec()
2793 if(FALSE == HAL_DSCMB_KL_Ctrl(eKLEng, KLCfg->eAlgo, KLCfg->u32Level, eKLSrc, eKLDst)) in _MDrv_DSCMB2_KLadder_AtomicExec()
2831 KLCfg->eFSCB); /*For Dst KT*/ in _MDrv_DSCMB2_KLadder_AtomicExec()
2860 KLCfg->eKeyType, /*For Dst TSIO*/ in _MDrv_DSCMB2_KLadder_AtomicExec()
2924 if(KLCfg->eOutsize == E_DSCMB_KL_64_BITS) in _MDrv_DSCMB2_KLadder_AtomicExec()
2928 else if(KLCfg->eOutsize == E_DSCMB_KL_128_BITS) in _MDrv_DSCMB2_KLadder_AtomicExec()
2960 MS_BOOL _MDrv_DSCMB2_KLadder_TCSA3(DSCMB_KLCfg_All* KLCfg , MS_U8 *pu8ActCode, MS_U32 u32CHSel,DSCM…
2969 MS_U32 u32Step2Level = KLCfg->u32Level-1; /*level - 1*/
2971 DSCMB_Key_Type eKeyType = KLCfg->eKeyType & (~E_DSCMB_KEY_FSCB_ENABLE);
3002 for( i = 0 ; i < KLCfg->u32Level ; i ++ )
3004 HAL_DSCMB_KL_Input(eKLEng, (KLCfg->u32Level-i-1), KLCfg->pu8KeyKLIn+(16*i));
3007 HAL_DSCMB_KL_Ctrl(eKLEng, KLCfg->eAlgo,
3008 KLCfg->u32Level,
3009 KLCfg->eSrc,
3013 if(FALSE == _DSCMB_Dscmb2Flt(KLCfg->u32DscID, &u32FltId))
3030 KLCfg->u32CAVid,
3051 HAL_DSCMB_KL_Input(eKLEng, (u32Step2Level-i-1), KLCfg->pu8KeyKLIn+(16*i));
3061 HAL_DSCMB_KL_Ctrl(eKLEng, KLCfg->eAlgo,
3063 KLCfg->eSrc,
3126 MS_BOOL _MDrv_DSCMB2_KLadder_ETSI(DSCMB_KLCfg_All* KLCfg , MS_U8 *ACPU_Out, MS_U8 *pu8Nonce, MS_U8 … in _MDrv_DSCMB2_KLadder_ETSI() argument
3129 DSCMB_ASSERT(KLCfg != NULL, "KLCfg input error", FALSE); in _MDrv_DSCMB2_KLadder_ETSI()
3137 MS_U32 u32CAVid = KLCfg->u32CAVid; in _MDrv_DSCMB2_KLadder_ETSI()
3139 DSCMB_KL_SelEng eKLEng = KLCfg->eKLSel; in _MDrv_DSCMB2_KLadder_ETSI()
3140 DSCMB_KLDst eKLDst = KLCfg->eDst & (~E_DSCMB_KL_DST_KT_PIDSLOTMAP_ENABLE); in _MDrv_DSCMB2_KLadder_ETSI()
3141 DSCMB_KLSrc eKLSrc = KLCfg->eSrc & (~E_DSCMB_KL_SRC_KDF_ENABLE); in _MDrv_DSCMB2_KLadder_ETSI()
3142 MS_BOOL bEnableKDF = ((KLCfg->eSrc & E_DSCMB_KL_SRC_KDF_ENABLE) == E_DSCMB_KL_SRC_KDF_ENABLE); in _MDrv_DSCMB2_KLadder_ETSI()
3143 …MS_BOOL bEnablePidslotmap = ((KLCfg->eDst & E_DSCMB_KL_DST_KT_PIDSLOTMAP_ENABLE) == E_DSCMB_KL_DST… in _MDrv_DSCMB2_KLadder_ETSI()
3144 DSCMB_Key_Type eKeyType = KLCfg->eKeyType & (~E_DSCMB_KEY_FSCB_ENABLE); in _MDrv_DSCMB2_KLadder_ETSI()
3146 … MS_BOOL bEnableKeyFscb = ((KLCfg->eKeyType & E_DSCMB_KEY_FSCB_ENABLE) == E_DSCMB_KEY_FSCB_ENABLE); in _MDrv_DSCMB2_KLadder_ETSI()
3148 …MS_BOOL bKLDstSecure = ((KLCfg->eKeyType & E_DSCMB_KEY_SECURE_KEYS_ENABLE) == E_DSCMB_KEY_SECURE_K… in _MDrv_DSCMB2_KLadder_ETSI()
3172 if ((E_DSCMB_KL_SRC_ACPU == eKLSrc) && (NULL == KLCfg->u8KeyACPU)) in _MDrv_DSCMB2_KLadder_ETSI()
3179 if(KLCfg->u32Level != 3) //ETSI keyladder, must be 3 level! in _MDrv_DSCMB2_KLadder_ETSI()
3242 u32FltId = KLCfg->u32DscID; in _MDrv_DSCMB2_KLadder_ETSI()
3246 if ( FALSE == DscmbTspMap[KLCfg->u32EngID][KLCfg->u32DscID].bUsed ) in _MDrv_DSCMB2_KLadder_ETSI()
3252 if( 0 == DscmbTspMap[KLCfg->u32EngID][KLCfg->u32DscID].u32PidFltIdNum ) in _MDrv_DSCMB2_KLadder_ETSI()
3260 if(FALSE == _DSCMB_Dscmb2Flt(KLCfg->u32DscID, &u32FltId)) in _MDrv_DSCMB2_KLadder_ETSI()
3284 u32FltId = KLCfg->u32DscID; //TSIO service id in _MDrv_DSCMB2_KLadder_ETSI()
3299 if ((KLCfg->u32Level != 0) && (NULL == KLCfg->pu8KeyKLIn)) in _MDrv_DSCMB2_KLadder_ETSI()
3313 HAL_DSCMB_KL_ACPURootKey(eKLEng, KLCfg->u8KeyACPU); in _MDrv_DSCMB2_KLadder_ETSI()
3330 …HAL_DSCMB_KL_KDF_Enable( eKLEng, KLCfg->stKDF.eKDFType, KLCfg->stKDF.u16AppId, KLCfg->stKDF.eHWKey… in _MDrv_DSCMB2_KLadder_ETSI()
3334 for( i = 0 ; i < KLCfg->u32Level ; i ++ ) in _MDrv_DSCMB2_KLadder_ETSI()
3336 HAL_DSCMB_KL_Input(eKLEng, (KLCfg->u32Level-i-1), KLCfg->pu8KeyKLIn+(16*i)); in _MDrv_DSCMB2_KLadder_ETSI()
3344 if(FALSE == HAL_DSCMB_KL_Ctrl(eKLEng, KLCfg->eAlgo, KLCfg->u32Level, eKLSrc, eKLDst)) in _MDrv_DSCMB2_KLadder_ETSI()
3383 KLCfg->eFSCB); /*For Dst KT*/ in _MDrv_DSCMB2_KLadder_ETSI()
3412 KLCfg->eKeyType, /*For Dst TSIO*/ in _MDrv_DSCMB2_KLadder_ETSI()
3476 if(KLCfg->eOutsize == E_DSCMB_KL_64_BITS) in _MDrv_DSCMB2_KLadder_ETSI()
3480 else if(KLCfg->eOutsize == E_DSCMB_KL_128_BITS) in _MDrv_DSCMB2_KLadder_ETSI()
3505 DLL_PUBLIC MS_BOOL MDrv_DSCMB_KLadder_TCSA3_TA(DSCMB_KLCfg_All* KLCfg , MS_U8 *pu8ActCode, MS_U32 u…
3513 MS_U32 u32Step2Level = KLCfg->u32Level-1; /*level - 1*/
3543 for( i = 0 ; i < KLCfg->u32Level ; i ++ )
3545 HAL_DSCMB_KL_Input(eKLEng, (KLCfg->u32Level-i-1), KLCfg->pu8KeyKLIn+(16*i));
3565 HAL_DSCMB_KL_Ctrl(eKLEng, KLCfg->eAlgo,
3566 KLCfg->u32Level,
3567 KLCfg->eSrc,
3571 if(FALSE == _DSCMB_Dscmb2Flt(KLCfg->u32DscID, &u32FltId))
3582 KLCfg->eKeyType, /*For Dst KT*/
3587 KLCfg->eKeyType,
3609 HAL_DSCMB_KL_Input(eKLEng, (u32Step2Level-i-1), KLCfg->pu8KeyKLIn+(16*i));
3619 HAL_DSCMB_KL_Ctrl(eKLEng, KLCfg->eAlgo,
3621 KLCfg->eSrc,
4721 MS_BOOL MDrv_DSCMB2_KLadder_AtomicExec(DSCMB_KLCfg_All* KLCfg , MS_U8 *ACPU_Out, DSCMB_KL_Status* u… in MDrv_DSCMB2_KLadder_AtomicExec() argument
4732 pArgs.KLCfg = KLCfg; in MDrv_DSCMB2_KLadder_AtomicExec()
4746 return _MDrv_DSCMB2_KLadder_AtomicExec(KLCfg, ACPU_Out, u32Status); in MDrv_DSCMB2_KLadder_AtomicExec()
4761 MS_BOOL MDrv_DSCMB2_KLadder_TCSA3(DSCMB_KLCfg_All* KLCfg , MS_U8 *pu8ActCode, MS_U32 u32CHSel, DSCM…
4763 return _MDrv_DSCMB2_KLadder_TCSA3(KLCfg, pu8ActCode, u32CHSel, u32Status);
4767 MS_BOOL MDrv_DSCMB2_KLadder_ETSI(DSCMB_KLCfg_All* KLCfg , MS_U8 *ACPU_Out, MS_U8 *pu8Nonce, MS_U8 *… in MDrv_DSCMB2_KLadder_ETSI() argument
4777 pArgs.KLCfg = KLCfg; in MDrv_DSCMB2_KLadder_ETSI()
4793 return _MDrv_DSCMB2_KLadder_ETSI(KLCfg, ACPU_Out, pu8Nonce, pu8Response, u32Status); in MDrv_DSCMB2_KLadder_ETSI()
4798 MS_BOOL MDrv_DSCMB2_KLadder_TA(DSCMB_KLCfg_All* KLCfg , MS_U8* ACPU_Out, DSCMB_KL_Status* u32Status)
4805 DSCMB_KL_SelEng eKLEng = KLCfg->eKLSel;
4808 DSCMB_KLDst eKLDst = KLCfg->eDst;
4809 MS_U32 u32CAVid = KLCfg->u32CAVid;
4819 if ((E_DSCMB_KL_SRC_ACPU == KLCfg->eSrc) && (NULL == KLCfg->u8KeyACPU))
4826 if((KLCfg->u32Level >3) && (KLCfg->u32Level != 9) && (KLCfg->u32Level != 0xD))
4832 else if(( 0 == KLCfg->u32Level ) && (0==(DSCMB_KL_DST_CLASS_DMA & eKLDst)))
4840 if( ((KLCfg->eDst & 0xF0) == 0) && ( (KLCfg->eDst & 0x0F) > 0 )) //OLD Destination
4842 switch(KLCfg->eDst)
4882 if ( FALSE == DscmbTspMap[KLCfg->u32EngID][KLCfg->u32DscID].bUsed )
4888 if( 0 == DscmbTspMap[KLCfg->u32EngID][KLCfg->u32DscID].u32PidFltIdNum )
4896 if(FALSE == _DSCMB_Dscmb2Flt(KLCfg->u32DscID, &u32FltId))
4922 if ((KLCfg->u32Level != 0) && (NULL == KLCfg->pu8KeyKLIn))
4928 if((_u8KLPreLevel == 9) || ((_u8KLPreLevel == 9) && (KLCfg->u32Level == 1)))
4930 _u8KLPreLevel = KLCfg->u32Level;
4935 _u8KLPreLevel = KLCfg->u32Level;
4939 if(E_DSCMB_KL_SRC_ACPU == KLCfg->eSrc)
4941 HAL_DSCMB_KL_ACPURootKey(eKLEng, KLCfg->u8KeyACPU);
4950 if(KLCfg->u32Level == 9) //Keep round, 1 stage
4952 HAL_DSCMB_KL_Input(eKLEng, 0, KLCfg->pu8KeyKLIn);
4954 else if(KLCfg->u32Level == 0xD) //SMI Keyladder
4958 HAL_DSCMB_KL_Input(eKLEng, (4 - i), KLCfg->pu8KeyKLIn+(16*i));
4961 else if(KLCfg->u32Level <= 3) //0~3 level keyladder
4963 for( i = 0 ; i < KLCfg->u32Level ; i ++ )
4965 HAL_DSCMB_KL_Input(eKLEng, (KLCfg->u32Level-i-1), KLCfg->pu8KeyKLIn+(16*i));
4976 if(FALSE == HAL_DSCMB_KL_TA_EncCW(eKLEng, KLCfg->pu8KeyKLIn+(16*(KLCfg->u32Level-1)) ))
4988 HAL_DSCMB_KL_Ctrl(eKLEng, KLCfg->eAlgo,
4989 KLCfg->u32Level,
4990 KLCfg->eSrc,
5018 KLCfg->eKeyType, /*For Dst KT*/
5056 KLCfg->eKeyType,
5058 KLCfg->u32CAVid,
5071 if(KLCfg->eOutsize == E_DSCMB_KL_64_BITS)
5075 else if(KLCfg->eOutsize == E_DSCMB_KL_128_BITS)
5590 void MDrv_DSCMB_KLadder_SetConfig(DSCMB_KLCfg *KLCfg) in MDrv_DSCMB_KLadder_SetConfig() argument
5635 MS_BOOL MDrv_DSCMB_KLadder_AtomicExec(DSCMB_KLCfg_All* KLCfg , MS_U8 *ACPU_Out, DSCMB_KL_Status* u3… in MDrv_DSCMB_KLadder_AtomicExec() argument
5637 return MDrv_DSCMB2_KLadder_AtomicExec(KLCfg, ACPU_Out, u32Status); in MDrv_DSCMB_KLadder_AtomicExec()