1 //<MStar Software> 2 //****************************************************************************** 3 // MStar Software 4 // Copyright (c) 2010 - 2012 MStar Semiconductor, Inc. All rights reserved. 5 // All software, firmware and related documentation herein ("MStar Software") are 6 // intellectual property of MStar Semiconductor, Inc. ("MStar") and protected by 7 // law, including, but not limited to, copyright law and international treaties. 8 // Any use, modification, reproduction, retransmission, or republication of all 9 // or part of MStar Software is expressly prohibited, unless prior written 10 // permission has been granted by MStar. 11 // 12 // By accessing, browsing and/or using MStar Software, you acknowledge that you 13 // have read, understood, and agree, to be bound by below terms ("Terms") and to 14 // comply with all applicable laws and regulations: 15 // 16 // 1. MStar shall retain any and all right, ownership and interest to MStar 17 // Software and any modification/derivatives thereof. 18 // No right, ownership, or interest to MStar Software and any 19 // modification/derivatives thereof is transferred to you under Terms. 20 // 21 // 2. You understand that MStar Software might include, incorporate or be 22 // supplied together with third party`s software and the use of MStar 23 // Software may require additional licenses from third parties. 24 // Therefore, you hereby agree it is your sole responsibility to separately 25 // obtain any and all third party right and license necessary for your use of 26 // such third party`s software. 27 // 28 // 3. MStar Software and any modification/derivatives thereof shall be deemed as 29 // MStar`s confidential information and you agree to keep MStar`s 30 // confidential information in strictest confidence and not disclose to any 31 // third party. 32 // 33 // 4. MStar Software is provided on an "AS IS" basis without warranties of any 34 // kind. Any warranties are hereby expressly disclaimed by MStar, including 35 // without limitation, any warranties of merchantability, non-infringement of 36 // intellectual property rights, fitness for a particular purpose, error free 37 // and in conformity with any international standard. You agree to waive any 38 // claim against MStar for any loss, damage, cost or expense that you may 39 // incur related to your use of MStar Software. 40 // In no event shall MStar be liable for any direct, indirect, incidental or 41 // consequential damages, including without limitation, lost of profit or 42 // revenues, lost or damage of data, and unauthorized system use. 43 // You agree that this Section 4 shall still apply without being affected 44 // even if MStar Software has been modified by MStar in accordance with your 45 // request or instruction for your use, except otherwise agreed by both 46 // parties in writing. 47 // 48 // 5. If requested, MStar may from time to time provide technical supports or 49 // services in relation with MStar Software to you for your use of 50 // MStar Software in conjunction with your or your customer`s product 51 // ("Services"). 52 // You understand and agree that, except otherwise agreed by both parties in 53 // writing, Services are provided on an "AS IS" basis and the warranty 54 // disclaimer set forth in Section 4 above shall apply. 55 // 56 // 6. Nothing contained herein shall be construed as by implication, estoppels 57 // or otherwise: 58 // (a) conferring any license or right to use MStar name, trademark, service 59 // mark, symbol or any other identification; 60 // (b) obligating MStar or any of its affiliates to furnish any person, 61 // including without limitation, you and your customers, any assistance 62 // of any kind whatsoever, or any information; or 63 // (c) conferring any license or right under any intellectual property right. 64 // 65 // 7. These terms shall be governed by and construed in accordance with the laws 66 // of Taiwan, R.O.C., excluding its conflict of law rules. 67 // Any and all dispute arising out hereof or related hereto shall be finally 68 // settled by arbitration referred to the Chinese Arbitration Association, 69 // Taipei in accordance with the ROC Arbitration Law and the Arbitration 70 // Rules of the Association by three (3) arbitrators appointed in accordance 71 // with the said Rules. 72 // The place of arbitration shall be in Taipei, Taiwan and the language shall 73 // be English. 74 // The arbitration award shall be final and binding to both parties. 75 // 76 //****************************************************************************** 77 //<MStar Software> 78 //////////////////////////////////////////////////////////////////////////////// 79 // 80 // Copyright (c) 2006-2009 MStar Semiconductor, Inc. 81 // All rights reserved. 82 // 83 // Unless otherwise stipulated in writing, any and all information contained 84 // herein regardless in any format shall remain the sole proprietary of 85 // MStar Semiconductor Inc. and be kept in strict confidence 86 // ("MStar Confidential Information") by the recipient. 87 // Any unauthorized act including without limitation unauthorized disclosure, 88 // copying, use, reproduction, sale, distribution, modification, disassembling, 89 // reverse engineering and compiling of the contents of MStar Confidential 90 // Information is unlawful and strictly prohibited. MStar hereby reserves the 91 // rights to any and all damages, losses, costs and expenses resulting therefrom. 92 // 93 //////////////////////////////////////////////////////////////////////////////// 94 95 //////////////////////////////////////////////////////////////////////////////////////////////////// 96 /// 97 /// @file drvAESDMA.h 98 /// @brief AESDMA Driver Interface 99 /// @author MStar Semiconductor,Inc. 100 /// 101 //////////////////////////////////////////////////////////////////////////////////////////////////// 102 103 104 /*! \defgroup G_AESDMA AESDMA interface 105 \ingroup G_CIPHER 106 107 \brief 108 AESDMA is a DMA ip with En/Decrypt engine. It can Encrypt/Decrypt data transmission between MIU to MIU, 109 parse data header, provide random numbers, calculate SHA and RSA of data. 110 111 <b>Features</b> 112 113 - Encrypt/Decrypt Algorithm: AES/DES/Triple DEC + ECB/CBC 114 - SHA1, SHA256 115 - RSA 116 - Hardware parser 117 118 119 <b> AESDMA Block Diagram: </b> \n 120 121 Data ==> AESDMA ==> En/Decrypted Data \n 122 Data ==> SHA ==> Hash Value \n 123 Data ==> RSA ==> Decrypted Value \n 124 Random Number Generatore ==> Random number \n 125 126 127 \defgroup G_AES_INIT Initialization Task relative 128 \ingroup G_AESDMA 129 \defgroup G_AES_EnDecrypt En/Decrypt Task relative 130 \ingroup G_AESDMA 131 \defgroup G_AES_SHA Hash relative 132 \ingroup G_AESDMA 133 \defgroup G_AES_OTHER other relative 134 \ingroup G_AESDMA 135 \defgroup G_AES_ToBeModified AESDMA api to be modified 136 \ingroup G_AESDMA 137 \defgroup G_AES_ToBeRemove AESDMA api to be removed 138 \ingroup G_AESDMA 139 */ 140 141 #ifndef _DRVAESDMA_H_ 142 #define _DRVAESDMA_H_ 143 144 #ifdef __cplusplus 145 extern "C" 146 { 147 #endif 148 149 #include "MsTypes.h" 150 #include "MsDevice.h" 151 #include "MsCommon.h" 152 #include "UFO.h" 153 154 #define AESDMA_UTOPIA20 (1) 155 //-------------------------------------------------------------------------------------------------- 156 // Define 157 //-------------------------------------------------------------------------------------------------- 158 #define AES_ENABLE 0x01 159 #define TDES_ENABLE 0x10 160 #define WORD_MASK 0x0000000F 161 #define RSA_INPUT_SIZE 256 162 #define RSA_UNIT_SIZE 4 163 #define SHA_WAIT 1 164 #if (SHA_WAIT==1) 165 #if defined(UFO_PUBLIC_HEADER_212)||defined(UFO_PUBLIC_HEADER_500_3) 166 #define SHA_TIMEOUT_VALUE 500000 167 #elif defined(UFO_PUBLIC_HEADER_300) 168 #define SHA_TIMEOUT_VALUE 0x500000 169 #else 170 #define SHA_TIMEOUT_VALUE 1200000 171 #endif 172 #endif 173 #define AES_MAX_TIMEOUT_VALUE 0x500000 174 #define RSA_MAX_TIMEOUT_VALUE 0x500000 175 #define RSA_DEFAULT_TIMEOUT_VALUE 0x180000 176 177 #define MSIF_AESDMA_LIB_CODE {'D','M','A','_'} //Lib code 178 #define MSIF_AESDMA_LIBVER {'0','3'} //LIB version 179 #define MSIF_AESDMA_BUILDNUM {'0','3'} //Build Number 180 #define MSIF_AESDMA_CHANGELIST {'0','0','3','3','1','6','3','7'} //P4 ChangeList Number 181 182 #define AESDMA_DRV_VERSION /* Character String for DRV/API version */ \ 183 MSIF_TAG, /* 'MSIF' */ \ 184 MSIF_CLASS, /* '00' */ \ 185 MSIF_CUS, /* 0x0000 */ \ 186 MSIF_MOD, /* 0x0000 */ \ 187 MSIF_CHIP, \ 188 MSIF_CPU, \ 189 MSIF_AESDMA_LIB_CODE, /* IP__ */ \ 190 MSIF_AESDMA_LIBVER, /* 0.0 ~ Z.Z */ \ 191 MSIF_AESDMA_BUILDNUM, /* 00 ~ 99 */ \ 192 MSIF_AESDMA_CHANGELIST, /* CL# */ \ 193 MSIF_OS 194 195 /// AESDMA Cipher Mode 196 typedef enum 197 { 198 E_DRVAESDMA_CIPHER_ECB = 0, 199 E_DRVAESDMA_CIPHER_CTR, 200 E_DRVAESDMA_CIPHER_CBC, 201 E_DRVAESDMA_CIPHER_DES_ECB, 202 E_DRVAESDMA_CIPHER_DES_CTR, 203 E_DRVAESDMA_CIPHER_DES_CBC, 204 E_DRVAESDMA_CIPHER_TDES_ECB, 205 E_DRVAESDMA_CIPHER_TDES_CTR, 206 E_DRVAESDMA_CIPHER_TDES_CBC, 207 E_DRVAESDMA_CIPHER_CTS_CBC, 208 E_DRVAESDMA_CIPHER_CTS_ECB, 209 E_DRVAESDMA_CIPHER_DES_CTS_CBC, 210 E_DRVAESDMA_CIPHER_DES_CTS_ECB, 211 E_DRVAESDMA_CIPHER_TDES_CTS_CBC, 212 E_DRVAESDMA_CIPHER_TDES_CTS_ECB, 213 } DrvAESDMA_CipherMode; 214 215 /// AESDMA HW Parser mode 216 typedef enum 217 { 218 E_DRVAESDMA_PARSER_TS_PKT192 = 0, 219 E_DRVAESDMA_PARSER_TS_PKT192_CLEAR, 220 E_DRVAESDMA_PARSER_TS_PKT188, 221 E_DRVAESDMA_PARSER_TS_PKT188_CLEAR, 222 E_DRVAESDMA_PARSER_HDCP20_PKT192, 223 E_DRVAESDMA_PARSER_HDCP20_PKT192_CLEAR, 224 E_DRVAESDMA_PARSER_HDCP20_PKT188, 225 E_DRVAESDMA_PARSER_HDCP20_PKT188_CLEAR, 226 } DrvAESDMA_ParserMode; 227 228 typedef enum 229 { 230 E_DRVAESDMA_PARSER_SCRMB_10 = 0, 231 E_DRVAESDMA_PARSER_SCRMB_11, 232 E_DRVAESDMA_PARSER_SCRMB_CLEAR, 233 } DrvAESDMA_ScrmbPattern; 234 235 /// SHA Mode 236 typedef enum 237 { 238 E_DRVAESDMA_SHA1 = 0, 239 E_DRVAESDMA_SHA256, 240 } DrvAESDMA_SHAMode; 241 242 /// RSA Mode 243 typedef enum 244 { 245 E_DRVAESDMA_RSA1024_PUBLIC = 0, 246 E_DRVAESDMA_RSA1024_PRIVATE, 247 E_DRVAESDMA_RSA2048_PUBLIC, 248 E_DRVAESDMA_RSA2048_PRIVATE, 249 E_DRVAESDMA_RSA256_PUBLIC, 250 E_DRVAESDMA_RSA256_PRIVATE, 251 } DrvAESDMA_RSAMode; 252 253 /// RSA HW Key Mode 254 typedef enum 255 { 256 E_DRVAESDMA_RSA_HWKEY_PRIVATE = 0, 257 E_DRVAESDMA_RSA_HWKEY_PUBLIC1, 258 E_DRVAESDMA_RSA_HWKEY_PUBLIC2, 259 E_DRVAESDMA_RSA_HWKEY_ROM_PRIVATE, 260 E_DRVAESDMA_RSA_HWKEY_ROM_PUBLIC, 261 } DrvAESDMA_RSAHwKeyMode; 262 263 /// AESDMA notification event 264 typedef enum //_DrvAESDMA_Event 265 { 266 E_DRVAESDMA_EVENT_DATA_INIT = 0x00000000, 267 /// DMA Done 268 E_DRVAESDMA_EVENT_DMA_DONE = 0x00010000, 269 /// DMA Pause 270 E_DRVAESDMA_EVENT_DMA_PAUSE = 0x00020000, 271 272 } DrvAESDMA_Event; 273 274 typedef enum //_DrvTSP_DbgLevel 275 { 276 E_DRVAESDMA_DBG_Release = 0, 277 E_DRVAESDMA_DBG_L1, // display error msg 278 E_DRVAESDMA_DBG_L2, // display error msg and enter while(1) 279 } DrvAESDMA_DbgLevel; 280 281 typedef enum //_DrvAESDMA_KEY_TYPE 282 { 283 E_DRVAESDMA_ODD_KEY = 0, 284 E_DRVAESDMA_EVEN_KEY, 285 } DrvAESDMA_KEY_TYPE; 286 287 typedef enum 288 { 289 E_DRVAESDMA_SECRETKEY_1 = 1, 290 E_DRVAESDMA_SECRETKEY_2 = 2, 291 E_DRVAESDMA_SECRETKEY_EAEK, 292 } DrvAESDMA_SecretKeyType; 293 294 //-------------------------------------------------------------------------------------------------- 295 // Driver Capability 296 //-------------------------------------------------------------------------------------------------- 297 298 //-------------------------------------------------------------------------------------------------- 299 // Local variable 300 //-------------------------------------------------------------------------------------------------- 301 302 //-------------------------------------------------------------------------------------------------- 303 // Type and Structure 304 //-------------------------------------------------------------------------------------------------- 305 /// AESDMA DDI return value 306 typedef MS_U32 DRVAESDMA_RESULT; 307 308 typedef struct DLL_PACKED 309 { 310 MS_U32 u32KeyN[64]; 311 MS_U32 u32KeyE[64]; 312 313 }DrvAESDMA_RSAKey; 314 315 typedef struct DLL_PACKED 316 { 317 MS_U32 u32Sig[64]; 318 319 }DrvAESDMA_RSASig; 320 321 typedef struct DLL_PACKED 322 { 323 MS_U32 u32RSAOut[64]; 324 325 }DrvAESDMA_RSAOut; 326 327 /// Secure information 328 typedef struct DLL_PACKED 329 { 330 MS_U32 u32SHMPhyAddr; 331 MS_BOOL bSecureModeEnable; 332 MS_U32 u32SHMSize; 333 MS_U8 u8SHMMiuSel; 334 335 }DrvAESDMA_SecureInfo; 336 337 typedef struct DLL_PACKED 338 { 339 #if defined(UFO_PUBLIC_HEADER_500_3)||defined(UFO_PUBLIC_HEADER_700) 340 MS_VIRT u32Addr; 341 MS_U32 u32Size; 342 #else 343 MS_U32 u32Addr; 344 MS_U32 u32Size; 345 #endif 346 }DrvAESDMA_SHADataInfo; 347 348 typedef enum 349 { 350 E_DRVAESDMA_HASH_STAGE_FIRST , 351 E_DRVAESDMA_HASH_STAGE_UPDATE , 352 E_DRVAESDMA_HASH_STAGE_LAST , 353 E_DRVAESDMA_HASH_STAGE_ONCE , 354 }DrvAESDMA_HASH_STAGE; 355 356 typedef struct DLL_PACKED 357 { 358 DrvAESDMA_SHAMode eMode; 359 DrvAESDMA_SHADataInfo stInput; 360 DrvAESDMA_SHADataInfo stOutput; 361 }DrvAESDMA_HASHCFG; 362 363 /// @name DRVAESDMA_RESULT 364 /// @ref DRVAESDMA_RESULT 365 /// return value 366 /// @{ 367 #define DRVAESDMA_OK 0x00000000 368 #define DRVAESDMA_FAIL 0x00000001 369 #define DRVAESDMA_INVALID_PARAM 0x00000002 370 #define DRVAESDMA_FUNC_ERROR 0x00000003 371 #define DRVAESDMA_MIU_ADDR_ERROR 0x00000004 372 373 /// @} 374 375 #define AESDMA_DMA_DONE 0x00010000 376 #define AESDMA_DMA_PAUSE 0x00020000 377 #define AESDMA_STATES_GROUP (AESDMA_DMA_DONE | \ 378 AESDMA_DMA_PAUSE ) 379 380 #define AESDMA_PARSER_PID_MAX 0x00001FFF 381 /// AESDMA notification function 382 typedef void (*P_DrvAESDMA_EvtCallback)(DrvAESDMA_Event eEvent); 383 384 //////////////////////////////////////////////////////////////////////////////// 385 // include utopia v2 header files here 386 //////////////////////////////////////////////////////////////////////////////// 387 #include "drvAESDMA_v2.h" 388 389 //-------------------------------------------------------------------------------------------------- 390 // Function Prototype 391 //-------------------------------------------------------------------------------------------------- 392 #ifndef MSOS_TYPE_NUTTX 393 //------------------------------------------------------------------------------------------------- 394 /// SetSecurityInfo 395 /// @ingroup G_AES_OTHER 396 /// @param pSecureInfo \b IN: Security information 397 /// @return DRVAESDMA_OK : Success 398 /// @return Others : Fail 399 //------------------------------------------------------------------------------------------------- 400 DRVAESDMA_RESULT MDrv_AESDMA_SetSecurityInfo(DrvAESDMA_SecureInfo *pSecureInfo); 401 #endif 402 403 //------------------------------------------------------------------------------------------------- 404 /// Initialize AESDMA 405 /// @ingroup G_AES_INIT 406 /// @param u32miu0addr \b IN: MIU0 Base Address (Unused) 407 /// @param u32miu1addr \b IN: MIU1 Base Address (Unused) 408 /// @param u32miunum \b IN: Numbers of MIU 409 /// @return DRVAESDMA_OK : Success 410 /// @return Others : Fail 411 //------------------------------------------------------------------------------------------------- 412 DRVAESDMA_RESULT MDrv_AESDMA_Init(MS_PHY u32miu0addr , MS_PHY u32miu1addr , MS_U32 u32miunum); 413 414 //------------------------------------------------------------------------------------------------- 415 /// Check Cihper Mode 416 /// @ingroup G_AES_EnDecrypt 417 /// @param eMode \b IN: Cipher Mode 418 /// @return DRVAESDMA_OK : Success 419 /// @return Others : Fail 420 //------------------------------------------------------------------------------------------------- 421 DRVAESDMA_RESULT MDrv_AESDMA_QueryCipherMode(DrvAESDMA_CipherMode eMode); 422 423 //------------------------------------------------------------------------------------------------- 424 /// Set Cipher mode and En/Decrypt 425 /// @ingroup G_AES_EnDecrypt 426 /// @param eMode \b IN: Cipher Mode 427 /// @param bDescrypt \b IN: TRUE: Decrypt, FALSE: Encrypt 428 /// @return DRVAESDMA_OK : Success 429 /// @return Others : Fail 430 //------------------------------------------------------------------------------------------------- 431 DRVAESDMA_RESULT MDrv_AESDMA_SelEng(DrvAESDMA_CipherMode eMode, MS_BOOL bDescrypt); 432 433 //------------------------------------------------------------------------------------------------- 434 /// Set a set of key to AESDMA 435 /// @ingroup G_AES_EnDecrypt 436 /// @param pu8Key \b IN: The key is represented as vectors of bytes with the MSB first 437 /// @param u32Len \b IN: The byte length of the pu8Key. 16 for AES/TDES and 8 for DES 438 /// @return DRVAESDMA_OK : Success 439 /// @return DRVAESDMA_INVALID_PARAM : Invalid key length 440 /// @return Others : Fail 441 //------------------------------------------------------------------------------------------------- 442 DRVAESDMA_RESULT MDrv_AESDMA_SetKey_Ex(const MS_U8 *pu8Key, MS_U32 u32Len); 443 //------------------------------------------------------------------------------------------------- 444 /// Set IV to the AESDMA 445 /// @ingroup G_AES_EnDecrypt 446 /// @param pu8IV \b IN: The IV is represented as vectors of bytes with the MSB first 447 /// @param u32Len \b IN: The byte length of the pu8IV. 16 for AES and 8 for TDES/DES 448 /// @return DRVAESDMA_OK : Success 449 /// @return DRVAESDMA_INVALID_PARAM : Invalid key length 450 /// @return Others : Fail 451 //------------------------------------------------------------------------------------------------- 452 DRVAESDMA_RESULT MDrv_AESDMA_SetIV_Ex(const MS_U8 *pu8IV, MS_U32 u32Len); 453 454 //------------------------------------------------------------------------------------------------- 455 /// Set a set of even key to AESDMA 456 /// @ingroup G_AES_EnDecrypt 457 /// @param pCipherKey \b IN: Key set 458 /// @return DRVAESDMA_OK : Success 459 /// @return DRVAESDMA_INVALID_PARAM : Invalid key length 460 /// @return Others : Fail 461 //------------------------------------------------------------------------------------------------- 462 DRVAESDMA_RESULT MDrv_AESDMA_SetKey(MS_U32 *pCipherKey); 463 464 //------------------------------------------------------------------------------------------------- 465 /// Set Odd/Even Key to AESDMA 466 /// @ingroup G_AES_EnDecrypt 467 /// @param pCipherKey \b IN: Key set 468 /// @param stKeyType \b IN: Enum: E_DRVAESDMA_ODD_KEY, E_DRVAESDMA_EVEN_KEY 469 /// @return DRVAESDMA_OK : Success 470 /// @return Others : Fail 471 //------------------------------------------------------------------------------------------------- 472 DRVAESDMA_RESULT MDrv_AESDMA_SetKeySel(MS_U32 *pCipherKey, DrvAESDMA_KEY_TYPE stKeyType); 473 //------------------------------------------------------------------------------------------------- 474 /// Set Odd IV to AESDMA 475 /// @ingroup G_AES_EnDecrypt 476 /// @param pCipherKey \b IN: Odd IV 477 /// @return DRVAESDMA_OK : Success 478 /// @return Others : Fail 479 //------------------------------------------------------------------------------------------------- 480 DRVAESDMA_RESULT MDrv_AESDMA_SetOddIV(MS_U32 *pInitVector); 481 //------------------------------------------------------------------------------------------------- 482 /// Enable Secure Key of AESDMA 483 /// @ingroup G_AES_EnDecrypt 484 /// @return DRVAESDMA_OK : Success 485 /// @return Others : Fail 486 //------------------------------------------------------------------------------------------------- 487 DRVAESDMA_RESULT MDrv_AESDMA_SetSecureKey(void); 488 //------------------------------------------------------------------------------------------------- 489 /// Set a set of default IV (even iv) to AESDMA 490 /// @ingroup G_AES_EnDecrypt 491 /// @param pCipherKey \b IN: IV 492 /// @return DRVAESDMA_OK : Success 493 /// @return Others : Fail 494 //------------------------------------------------------------------------------------------------- 495 DRVAESDMA_RESULT MDrv_AESDMA_SetIV(MS_U32 *pInitVector); 496 //------------------------------------------------------------------------------------------------- 497 /// Set a set of PS Pattern to AESDMA 498 /// @ingroup G_AES_EnDecrypt 499 /// @param u32PTN \b IN: PS Pattern 500 /// @param u32Mask \b IN: Mask 501 /// @param bPSin_Enable \b IN: Bit of In Enable 502 /// @param bPSout_Enable \b IN: Bit of Out Enable 503 /// @return DRVAESDMA_OK : Success 504 /// @return Others : Fail 505 //------------------------------------------------------------------------------------------------- 506 DRVAESDMA_RESULT MDrv_AESDMA_SetPS(MS_U32 u32PTN, MS_U32 u32Mask, MS_BOOL bPSin_Enable, MS_BOOL bPSout_Enable); 507 //------------------------------------------------------------------------------------------------- 508 /// Release PS of AESDMA 509 /// @ingroup G_AES_EnDecrypt 510 /// @return DRVAESDMA_OK : Success 511 /// @return Others : Fail 512 //------------------------------------------------------------------------------------------------- 513 DRVAESDMA_RESULT MDrv_AESDMA_PSRelease(void); 514 //------------------------------------------------------------------------------------------------- 515 /// Set File in/out address and size to AESDMA 516 /// @ingroup G_AES_EnDecrypt 517 /// @param u32FileinAddr \b IN: Source Address 518 /// @param u32FileInNum \b IN: Size of Data 519 /// @param u32FileOutSAddr \b IN: Dest Start Address 520 /// @param u32FileOutEAddr \b IN: Dest End Address 521 /// @return DRVAESDMA_OK : Success 522 /// @return Others : Fail 523 //------------------------------------------------------------------------------------------------- 524 DRVAESDMA_RESULT MDrv_AESDMA_SetFileInOut(MS_PHY phyFileinAddr, MS_U32 u32FileInNum, MS_PHY phyFileOutSAddr, MS_PHY phyFileOutEAddr); 525 526 //------------------------------------------------------------------------------------------------- 527 /// Trigger AESDMA engine 528 /// @ingroup G_AES_EnDecrypt 529 /// @return DRVAESDMA_OK : Success 530 /// @return Others : Fail 531 //------------------------------------------------------------------------------------------------- 532 DRVAESDMA_RESULT MDrv_AESDMA_Start(MS_BOOL bStart); 533 534 //------------------------------------------------------------------------------------------------- 535 /// Reset AESDMA engine 536 /// @ingroup G_AES_INIT 537 /// @return DRVAESDMA_OK : Success 538 /// @return Others : Fail 539 //------------------------------------------------------------------------------------------------- 540 DRVAESDMA_RESULT MDrv_AESDMA_Reset(void); 541 542 //------------------------------------------------------------------------------------------------- 543 /// Get the status of AESDMA engine 544 /// @ingroup G_AES_EnDecrypt 545 /// @return DRVAESDMA_OK : Ready 546 /// @return Others : Not Ready 547 //------------------------------------------------------------------------------------------------- 548 DRVAESDMA_RESULT MDrv_AESDMA_GetStatus(void); 549 550 //------------------------------------------------------------------------------------------------- 551 /// Check the status of AESDMA engine 552 /// @ingroup G_AES_EnDecrypt 553 /// @return DRVAESDMA_OK : Done 554 /// @return Others : Not yet 555 //------------------------------------------------------------------------------------------------- 556 DRVAESDMA_RESULT MDrv_AESDMA_IsFinished(void); 557 558 //------------------------------------------------------------------------------------------------- 559 /// Get the byte count of PS matched. 560 /// @ingroup G_AES_EnDecrypt 561 /// @return Numbers of byte counts. 562 //------------------------------------------------------------------------------------------------- 563 MS_U32 MDrv_AESDMA_GetPSMatchedByteCNT(void); 564 565 //------------------------------------------------------------------------------------------------- 566 /// Get the byte count of PTN matched. 567 /// @ingroup G_AES_EnDecrypt 568 /// @return Numbers of byte counts. 569 //------------------------------------------------------------------------------------------------- 570 MS_U32 MDrv_AESDMA_GetPSMatchedPTN(void); 571 572 //------------------------------------------------------------------------------------------------- 573 /// Call back function of AESDMA interrupt. 574 /// @ingroup G_AES_OTHER 575 /// @param eEvents \b IN: Interrupt event 576 /// @param pfCallback \b OUT: pointer of callback function 577 /// @return DRVAESDMA_OK : Success 578 /// @return Others : Fail 579 //------------------------------------------------------------------------------------------------- 580 DRVAESDMA_RESULT MDrv_AESDMA_Notify(DrvAESDMA_Event eEvents, P_DrvAESDMA_EvtCallback pfCallback); 581 582 //------------------------------------------------------------------------------------------------- 583 /// Set debug level 584 /// @ingroup G_AES_OTHER 585 /// @param DbgLevel \b IN: Interrupt event 586 /// @return DRVAESDMA_OK : Success 587 /// @return Others : Fail 588 //------------------------------------------------------------------------------------------------- 589 DRVAESDMA_RESULT MDrv_AESDMA_SetDbgLevel(DrvAESDMA_DbgLevel DbgLevel); 590 591 //------------------------------------------------------------------------------------------------- 592 /// Get library version 593 /// @ingroup G_AES_OTHER 594 /// @param ppVersion \b OUT: version 595 /// @return DRVAESDMA_OK : Success 596 /// @return Others : Fail 597 //------------------------------------------------------------------------------------------------- 598 DRVAESDMA_RESULT MDrv_AESDMA_GetLibVer(const MSIF_Version **ppVersion); 599 600 //------------------------------------------------------------------------------------------------- 601 /// Get random numbers. 602 /// @ingroup G_AES_OTHER 603 /// @param u32PABuf \b OUT: an array of random numbers. 604 /// @param u32Size \b IN: Array size 605 /// @return DRVAESDMA_OK : Success 606 /// @return Others : Fail 607 //------------------------------------------------------------------------------------------------- 608 DRVAESDMA_RESULT MDrv_AESDMA_Rand(MS_U32 *u32PABuf, MS_U32 u32Size); 609 610 //------------------------------------------------------------------------------------------------- 611 /// Enable/Disable Clock 612 /// @ingroup G_AES_INIT 613 /// @param benable \b IN: TRUE: Enable, FALSE: Disable 614 /// @return DRVAESDMA_OK : Success 615 /// @return Others : Fail 616 //------------------------------------------------------------------------------------------------- 617 DRVAESDMA_RESULT MDrv_AESDMA_Set_Clk(MS_BOOL benable); 618 //------------------------------------------------------------------------------------------------- 619 /// Calculate SHA 620 /// @ingroup G_AES_SHA 621 /// @param eMode \b IN: SHA Mode 622 /// @param u32PAInBuf \b IN: Source address of data 623 /// @param u32Size \b IN: Size of data 624 /// @param u32PAOutBuf \b IN: out hash address 625 /// @return DRVAESDMA_OK : Success 626 /// @return Others : Fail 627 //------------------------------------------------------------------------------------------------- 628 DRVAESDMA_RESULT MDrv_SHA_Calculate(DrvAESDMA_SHAMode eMode, MS_PHY phyPAInBuf, MS_U32 u32Size, MS_PHY phyPAOutBuf); 629 630 //------------------------------------------------------------------------------------------------- 631 /// Calculate Manual SHA 632 /// @ingroup G_AES_SHA 633 /// @param stCfg \b IN: SHA Config 634 /// @param eStage \b IN: SHA Stage 635 /// @param u32DoneBytes \b IN: Size 636 /// @param pu8SetIV \b IN: Init value 637 /// @return DRVAESDMA_OK : Success 638 /// @return Others : Fail 639 //------------------------------------------------------------------------------------------------- 640 DRVAESDMA_RESULT MDrv_SHA_CalculateManual(DrvAESDMA_HASHCFG stCfg, DrvAESDMA_HASH_STAGE eStage, MS_U32 u32DoneBytes, MS_U8 *pu8SetIV); 641 642 DRVAESDMA_RESULT SYMBOL_WEAK MDrv_SHA_Accumulation(DrvAESDMA_HASH_STAGE eMode, DrvAESDMA_SHAMode eStage, MS_U32 u32SrcBufAddr, MS_U32 u32SrcSize, MS_U32 u32WorkingBufAddr, MS_U32 u32WorkingSize, MS_U16* pu16ShaVal ); 643 //------------------------------------------------------------------------------------------------- 644 /// MOBF 645 /// @ingroup G_AES_ToBeRemove 646 /// @return DRVAESDMA_OK : Success 647 /// @return Others : Fail 648 //------------------------------------------------------------------------------------------------- 649 DRVAESDMA_RESULT MDrv_MOBF_DmaOnly(void); 650 651 //------------------------------------------------------------------------------------------------- 652 /// MOBF Encrypt 653 /// @ingroup G_AES_ToBeRemove 654 /// @param u32Key \b IN: Key 655 /// @param bEnable \b IN: TRUE/FLASE 656 /// @return DRVAESDMA_OK : Success 657 /// @return Others : Fail 658 //------------------------------------------------------------------------------------------------- 659 DRVAESDMA_RESULT MDrv_MOBF_Encrypt(MS_U32 u32Key, MS_BOOL bEnable); 660 661 //------------------------------------------------------------------------------------------------- 662 /// MOBF Decrypt 663 /// @ingroup G_AES_ToBeRemove 664 /// @param u32Key \b IN: Key 665 /// @param bEnable \b IN: TRUE/FLASE 666 /// @return DRVAESDMA_OK : Success 667 /// @return Others : Fail 668 //------------------------------------------------------------------------------------------------- 669 DRVAESDMA_RESULT MDrv_MOBF_Decrypt(MS_U32 u32Key, MS_BOOL bEnable); 670 671 //------------------------------------------------------------------------------------------------- 672 /// MOBF Oneway 673 /// @ingroup G_AES_ToBeRemove 674 /// @return DRVAESDMA_OK : Success 675 /// @return Others : Fail 676 //------------------------------------------------------------------------------------------------- 677 DRVAESDMA_RESULT MDrv_MOBF_OneWay(void); 678 679 //------------------------------------------------------------------------------------------------- 680 /// NA 681 /// @ingroup G_AES_EnDecrypt 682 /// @return DRVAESDMA_OK : Success 683 /// @return Others : Fail 684 //------------------------------------------------------------------------------------------------- 685 DRVAESDMA_RESULT MDrv_AESDMA_Parser_MaskScrmb(MS_BOOL bEnable); 686 687 //------------------------------------------------------------------------------------------------- 688 /// NA 689 /// @ingroup G_AES_EnDecrypt 690 /// @return DRVAESDMA_OK : Success 691 /// @return Others : Fail 692 //------------------------------------------------------------------------------------------------- 693 DRVAESDMA_RESULT MDrv_AESDMA_Parser_SetScrmbPattern(DrvAESDMA_ScrmbPattern ePattern); 694 695 //------------------------------------------------------------------------------------------------- 696 /// NA 697 /// @ingroup G_AES_EnDecrypt 698 /// @return DRVAESDMA_OK : Success 699 /// @return Others : Fail 700 //------------------------------------------------------------------------------------------------- 701 DRVAESDMA_RESULT MDrv_AESDMA_Parser_SetAddedScrmbPattern(DrvAESDMA_ScrmbPattern ePattern); 702 703 //------------------------------------------------------------------------------------------------- 704 /// NA 705 /// @ingroup G_AES_OTHER 706 /// @return DRVAESDMA_OK : Success 707 /// @return Others : Fail 708 //------------------------------------------------------------------------------------------------- 709 MS_U8 MDrv_AESDMA_Parser_QueryPidCount(void); 710 711 //------------------------------------------------------------------------------------------------- 712 /// NA 713 /// @ingroup G_AES_EnDecrypt 714 /// @return DRVAESDMA_OK : Success 715 /// @return Others : Fail 716 //------------------------------------------------------------------------------------------------- 717 DRVAESDMA_RESULT MDrv_AESDMA_Parser_SetPid(MS_U8 u8Index, MS_U16 u16Pid); 718 719 //------------------------------------------------------------------------------------------------- 720 /// NA 721 /// @ingroup G_AES_EnDecrypt 722 /// @return DRVAESDMA_OK : Success 723 /// @return Others : Fail 724 //------------------------------------------------------------------------------------------------- 725 DRVAESDMA_RESULT MDrv_AESDMA_Parser_BypassPid(MS_BOOL bEnable); 726 727 //------------------------------------------------------------------------------------------------- 728 /// NA 729 /// @ingroup G_AES_EnDecrypt 730 /// @return DRVAESDMA_OK : Success 731 /// @return Others : Fail 732 //------------------------------------------------------------------------------------------------- 733 DRVAESDMA_RESULT MDrv_AESDMA_Parser_Encrypt(DrvAESDMA_ParserMode eMode); 734 735 //------------------------------------------------------------------------------------------------- 736 /// NA 737 /// @ingroup G_AES_EnDecrypt 738 /// @return DRVAESDMA_OK : Success 739 /// @return Others : Fail 740 //------------------------------------------------------------------------------------------------- 741 DRVAESDMA_RESULT MDrv_AESDMA_Parser_Decrypt(DrvAESDMA_ParserMode eMode); 742 743 //------------------------------------------------------------------------------------------------- 744 /// NA 745 /// @ingroup G_AES_OTHER 746 /// @return DRVAESDMA_OK : Success 747 /// @return Others : Fail 748 //------------------------------------------------------------------------------------------------- 749 MS_BOOL MDrv_AESDMA_Lock(void); 750 751 //------------------------------------------------------------------------------------------------- 752 /// NA 753 /// @ingroup G_AES_OTHER 754 /// @return DRVAESDMA_OK : Success 755 /// @return Others : Fail 756 //------------------------------------------------------------------------------------------------- 757 MS_BOOL MDrv_AESDMA_Unlock(void); 758 759 //------------------------------------------------------------------------------------------------- 760 /// NA 761 /// @ingroup G_AES_EnDecrypt 762 /// @return DRVAESDMA_OK : Success 763 /// @return Others : Fail 764 //------------------------------------------------------------------------------------------------- 765 DRVAESDMA_RESULT MDrv_RSA_Calculate(DrvAESDMA_RSASig *pstSign, DrvAESDMA_RSAKey *pstKey, DrvAESDMA_RSAMode eMode); 766 //------------------------------------------------------------------------------------------------- 767 /// NA 768 /// @ingroup G_AES_EnDecrypt 769 /// @return DRVAESDMA_OK : Success 770 /// @return Others : Fail 771 //------------------------------------------------------------------------------------------------- 772 DRVAESDMA_RESULT MDrv_RSA_Calculate_Hw_Key(DrvAESDMA_RSASig *pstSign, DrvAESDMA_RSAHwKeyMode eMode); 773 DRVAESDMA_RESULT MDrv_RSA_IsFinished(void); 774 775 //------------------------------------------------------------------------------------------------- 776 /// NA 777 /// @ingroup G_AES_EnDecrypt 778 /// @return DRVAESDMA_OK : Success 779 /// @return Others : Fail 780 //------------------------------------------------------------------------------------------------- 781 DRVAESDMA_RESULT MDrv_RSA_Output(DrvAESDMA_RSAMode eMode, DrvAESDMA_RSAOut *pstRSAOut); 782 783 //------------------------------------------------------------------------------------------------- 784 /// NA 785 /// @ingroup G_AES_OTHER 786 /// @return DRVAESDMA_OK : Success 787 /// @return Others : Fail 788 //------------------------------------------------------------------------------------------------- 789 MS_U32 MDrv_AESDMA_SetPowerState(EN_POWER_MODE u16PowerState); 790 791 //------------------------------------------------------------------------------------------------- 792 /// NA 793 /// @ingroup G_AES_OTHER 794 /// @return DRVAESDMA_OK : Success 795 /// @return Others : Fail 796 //------------------------------------------------------------------------------------------------- 797 DRVAESDMA_RESULT MDrv_AESDMA_Exit(void); 798 799 //------------------------------------------------------------------------------------------------- 800 /// NA 801 /// @ingroup G_AES_OTHER 802 /// @return DRVAESDMA_OK : Success 803 /// @return Others : Fail 804 //------------------------------------------------------------------------------------------------- 805 DRVAESDMA_RESULT MDrv_AESDMA_IsSecretKeyInNormalBank(void); 806 807 DRVAESDMA_RESULT MDrv_AESDMA_EnableTwoKeys(MS_BOOL bEnable); 808 DRVAESDMA_RESULT MDrv_AESDMA_SetOddKey(MS_U32 *pInitVector); 809 DRVAESDMA_RESULT MDrv_AESDMA_ParserStart(MS_BOOL bStart); 810 DRVAESDMA_RESULT _MDrv_AESDMA_NormalReset(void); 811 812 //------------------------------------------------------------------------------------------------- 813 /// NA 814 /// @ingroup G_AES_INIT 815 /// @return DRVAESDMA_OK : Success 816 /// @return Others : Fail 817 //------------------------------------------------------------------------------------------------- 818 DRVAESDMA_RESULT MDrv_AESDMA_NormalReset(void); 819 820 DRVAESDMA_RESULT _MDrv_AESDMA_SelEng(DrvAESDMA_CipherMode eMode, MS_BOOL bDescrypt); 821 DRVAESDMA_RESULT _MDrv_AESDMA_SetKey(MS_U32 *pCipherKey); 822 DRVAESDMA_RESULT _MDrv_AESDMA_SetIV(MS_U32 *pInitVector); 823 DRVAESDMA_RESULT _MDrv_AESDMA_SetFileInOut(MS_PHY phy64FileinAddr, MS_U32 u32FileInNum, MS_PHY phy64FileOutSAddr, MS_PHY phy64FileOutEAddr); 824 DRVAESDMA_RESULT _MDrv_AESDMA_Start(MS_BOOL bStart); 825 DRVAESDMA_RESULT _MDrv_RSA_Calculate(DrvAESDMA_RSASig *pstSign, DrvAESDMA_RSAKey *pstKey, DrvAESDMA_RSAMode eMode); 826 DRVAESDMA_RESULT _MDrv_SHA_Calculate(DrvAESDMA_SHAMode eMode, MS_PHY phy64PAInBuf, MS_U32 u32Size, MS_PHY phy64PAOutBuf); 827 DRVAESDMA_RESULT _MDrv_RSA_IsFinished(void); 828 DRVAESDMA_RESULT _MDrv_RSA_Output(DrvAESDMA_RSAMode eMode, DrvAESDMA_RSAOut *pstRSAOut); 829 DRVAESDMA_RESULT _MDrv_AESDMA_Init(MS_PHY phy64miu0addr , MS_PHY phy64miu1addr , MS_U32 u32miunum); 830 DRVAESDMA_RESULT _MDrv_AESDMA_Reset(void); 831 DRVAESDMA_RESULT _MDrv_AESDMA_Set_Clk(MS_BOOL benable); 832 DRVAESDMA_RESULT _MDrv_AESDMA_SetPS(MS_U32 u32PTN, MS_U32 u32Mask, MS_BOOL bPSin_Enable, MS_BOOL bPSout_Enable); 833 DRVAESDMA_RESULT _MDrv_AESDMA_PSRelease(void); 834 #if defined(UFO_PUBLIC_HEADER_700) 835 DRVAESDMA_RESULT _MDrv_AESDMA_IsFinished(MS_U32 *u32RetVal); 836 DRVAESDMA_RESULT _MDrv_AESDMA_GetStatus(MS_U32 *u32RetVal); 837 MS_U32 _MDrv_AESDMA_GetPSMatchedByteCNT(MS_U32 *u32RetVal); 838 #endif 839 840 841 MS_U32 _MDrv_AESDMA_GetPSMatchedPTN(void); 842 DRVAESDMA_RESULT _MDrv_AESDMA_Notify(DrvAESDMA_Event eEvents, P_DrvAESDMA_EvtCallback pfCallback); 843 DRVAESDMA_RESULT _MDrv_AESDMA_Get_Rand_Num(MS_U8 *pu8Num); 844 DRVAESDMA_RESULT _MDrv_AESDMA_Parser_MaskScrmb(MS_BOOL bEnable); 845 DRVAESDMA_RESULT _MDrv_AESDMA_Parser_SetScrmbPattern(DrvAESDMA_ScrmbPattern ePattern); 846 DRVAESDMA_RESULT _MDrv_AESDMA_Parser_BypassPid(MS_BOOL bEnable); 847 DRVAESDMA_RESULT _MDrv_AESDMA_Parser_SetPid(MS_U8 u8Index, MS_U16 u16Pid); 848 DRVAESDMA_RESULT _MDrv_AESDMA_Rand(MS_U32 *u32PABuf, MS_U32 u32Size); 849 850 //------------------------------------------------------------------------------------------------- 851 /// NA 852 /// @ingroup G_AES_OTHER 853 /// @return DRVAESDMA_OK : Success 854 /// @return Others : Fail 855 //------------------------------------------------------------------------------------------------- 856 DRVAESDMA_RESULT MDrv_HDCP_ProcessCipher(MS_U8 u8Idx, MS_U8* pu8Riv, MS_U8 *pu8ContentKey); 857 858 DRVAESDMA_RESULT MDrv_AESDMA_SetDefaultCAVid(MS_U32 u32CAVid); 859 //------------------------------------------------------------------------------------------------- 860 /// Set index of Secure Key 861 /// @ingroup G_AES_EnDecrypt 862 /// @param u8KeyIdx \b IN: Index of efuse Key (1:efuse Key1, 2: efuse key2) 863 /// @return DRVAESDMA_OK : Success 864 /// @return Others : Fail 865 //------------------------------------------------------------------------------------------------- 866 DRVAESDMA_RESULT SYMBOL_WEAK MDrv_AESDMA_SetSecuredKeyIndex (MS_U8 u8KeyIdx); 867 868 DRVAESDMA_RESULT _MDrv_AESDMA_Parser_Encrypt(DrvAESDMA_ParserMode eMode); 869 #if defined(UFO_PUBLIC_HEADER_700)||defined(UFO_PUBLIC_HEADER_500) 870 MS_U8 _MDrv_AESDMA_Parser_QueryPidCount(MS_U8* retCount); 871 #endif 872 DRVAESDMA_RESULT _MDrv_AESDMA_Parser_Decrypt(DrvAESDMA_ParserMode eMode); 873 DRVAESDMA_RESULT _MDrv_AESDMA_Parser_SetAddedScrmbPattern(DrvAESDMA_ScrmbPattern ePattern); 874 DRVAESDMA_RESULT _MDrv_AESDMA_SetKeySel(MS_U32 *pCipherKey, DrvAESDMA_KEY_TYPE stKeyType); 875 DRVAESDMA_RESULT _MDrv_AESDMA_SetOddIV(MS_U32 *pInitVector); 876 DRVAESDMA_RESULT _MDrv_AESDMA_IsSecretKeyInNormalBank(MS_U8 *retVal); 877 DRVAESDMA_RESULT _MDrv_AESDMA_EnableTwoKeys(MS_BOOL bEnable); 878 DRVAESDMA_RESULT _MDrv_AESDMA_SetSecureKey(void); 879 880 //------------------------------------------------------------------------------------------------- 881 /// NA 882 /// @ingroup G_AES_OTHER 883 /// @return DRVAESDMA_OK : Success 884 /// @return Others : Fail 885 //------------------------------------------------------------------------------------------------- 886 DRVAESDMA_RESULT MDrv_HDCP_GetHdcpCipherState(MS_U8 u8Idx, MS_U8 *pu8State); 887 888 DRVAESDMA_RESULT MDrv_HDMI_GetM0(MS_U32 u32InputPortType, MS_U8 *pu8Data); 889 //------------------------------------------------------------------------------------------------- 890 /// Set index of kslot 891 /// @ingroup G_AES_EnDecrypt 892 /// @param u32Index \b IN: Index of kslot 893 /// @param bIsOddKey \b IN: Key type (True: odd key, False: even key) 894 /// @return DRVAESDMA_OK : Success 895 /// @return Others : Fail 896 //------------------------------------------------------------------------------------------------- 897 DRVAESDMA_RESULT SYMBOL_WEAK MDrv_AESDMA_SetKeyIndex (MS_U32 u32Index, MS_BOOL bIsOddKey); 898 899 //------------------------------------------------------------------------------------------------- 900 /// Enable AES CTR64 901 /// @ingroup G_AES_EnDecrypt 902 /// @param bCtr64En \b IN: True: Support CTR64 Algo 903 /// @return DRVAESDMA_OK : Success 904 /// @return Others : Fail 905 //------------------------------------------------------------------------------------------------- 906 DRVAESDMA_RESULT SYMBOL_WEAK MDrv_AESDMA_SetAesCtr64 (MS_BOOL bCtr64En); 907 908 //------------------------------------------------------------------------------------------------- 909 /// Allocate empty key slot 910 /// @ingroup G_AES_EnDecrypt 911 /// @param u32Index \b OUT: Index of key slot 912 /// @return DRVAESDMA_OK : Success 913 /// @return Others : Fail 914 //------------------------------------------------------------------------------------------------- 915 DRVAESDMA_RESULT SYMBOL_WEAK MDrv_AESDMA_AllocKeySlot (MS_U32 *pu32Index); 916 917 //------------------------------------------------------------------------------------------------- 918 /// Free key slot 919 /// @ingroup G_AES_EnDecrypt 920 /// @param u32Index \b IN: Index of key slot 921 /// @return DRVAESDMA_OK : Success 922 /// @return Others : Fail 923 //------------------------------------------------------------------------------------------------- 924 DRVAESDMA_RESULT SYMBOL_WEAK MDrv_AESDMA_FreeKeySlot (MS_U32 u32Index); 925 926 MS_BOOL MDrv_AESDMA_GetConfig(PAESDMA_INIT sAesdmaInit); 927 928 //reserved for secure protect function 929 /* 930 DRVAESDMA_RESULT MDrv_AESDMA_SecureSetKey(MS_U32 *pCipherKey); 931 DRVAESDMA_RESULT MDrv_AESDMA_SecureProtect(MS_BOOL bEnable); 932 DRVAESDMA_RESULT MDrv_AESDMA_SecureSetIV(MS_U32 *pInitVector); 933 DRVAESDMA_RESULT MDrv_AESDMA_SetFileOutEnable(MS_BOOL bEnable); 934 DRVAESDMA_RESULT MDrv_AESDMA_SecureStart(MS_BOOL bStart); 935 DRVAESDMA_RESULT MDrv_AESDMA_SecureIsFinished(void); 936 */ 937 #ifdef __cplusplus 938 } 939 #endif 940 941 942 #endif // _DRVAESDMA_H_ 943