lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | /*******************************************************************************
|
| 2 | * Copyright (C) 2014, ZTE Corporation.
|
| 3 | *
|
| 4 | * File Name:
|
| 5 | * File Mark:
|
| 6 | * Description:
|
| 7 | * Others:
|
| 8 | * Version: 1.0
|
| 9 | * Author:
|
| 10 | * Date:
|
| 11 | * History 1:
|
| 12 | * Date:
|
| 13 | * Version:
|
| 14 | * Author:
|
| 15 | * Modification:
|
| 16 | * History 2:
|
| 17 | ********************************************************************************/
|
| 18 |
|
| 19 | #ifndef _DRVS_EFUSE_H
|
| 20 | #define _DRVS_EFUSE_H
|
| 21 |
|
| 22 | /****************************************************************************
|
| 23 | * Include files
|
| 24 | ****************************************************************************/
|
| 25 | #ifndef _OS_LINUX
|
| 26 | #include "oss_api.h"
|
| 27 |
|
| 28 | /****************************************************************************
|
| 29 | * Macros
|
| 30 | ****************************************************************************/
|
| 31 |
|
| 32 |
|
| 33 | /****************************************************************************
|
| 34 | * Types
|
| 35 | ****************************************************************************/
|
| 36 | typedef struct
|
| 37 | {
|
| 38 | UINT32 pubKeyRsaE[32];
|
| 39 | UINT32 pubKeyRsaN[32];
|
| 40 | UINT32 secureFlag;
|
| 41 | UINT32 pubKeyHash[4];
|
| 42 | UINT32 secureDevId[3];
|
| 43 | }T_ZDrvEfuse_Secure;
|
| 44 |
|
| 45 | typedef enum
|
| 46 | {
|
| 47 | SECURE_EN,
|
| 48 | PUB_KEY_HASH,
|
| 49 | DEVICE_ID,
|
| 50 | MAX_ENUM
|
| 51 | }E_ZDrvEfuse_SecureMsg;
|
xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 52 | #else
|
| 53 | #include <linux/soc/zte/efuse/efuse_zx.h>
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 54 | #endif
|
| 55 |
|
| 56 | /****************************************************************************
|
| 57 | * Constants
|
| 58 | ****************************************************************************/
|
| 59 |
|
| 60 | /****************************************************************************
|
| 61 | * Global Variables
|
| 62 | ****************************************************************************/
|
| 63 |
|
| 64 | /****************************************************************************
|
| 65 | * Function Prototypes
|
| 66 | ****************************************************************************/
|
| 67 |
|
| 68 | /*******************************************************************************
|
| 69 | * Function: zDrvEfuse_IsSpe
|
| 70 | * Description:
|
| 71 | * Parameters:
|
| 72 | * Input:
|
| 73 | * None
|
| 74 | * Output:
|
| 75 | * None
|
| 76 | * Returns:
|
| 77 | * Others:
|
| 78 | *******************************************************************************/
|
| 79 | UINT32 zDrvEfuse_IsSpe(VOID);
|
| 80 |
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 81 | /*******************************************************************************
|
| 82 | * Function: zDrvEfuse_GetSecureMsg
|
| 83 | * Description:¸Ãº¯ÊýÓÃÓÚ»ñÈ¡¹«Ô¿¶Ô¡¢°²È«¿ªÆô±ê¼Ç¡¢¹«Ô¿hashÖµ¡¢É豸ID¡£
|
| 84 | * Parameters:
|
| 85 | * Input:
|
| 86 | *
|
| 87 | * Output:
|
| 88 | *
|
| 89 | * Returns:
|
| 90 | *
|
| 91 | * Others:
|
| 92 | ********************************************************************************/
|
xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 93 | extern VOID zDrvEfuse_GetSecureMsg(T_ZDrvEfuse_Secure *secure);
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 94 |
|
xf.li | bdd93d5 | 2023-05-12 07:10:14 -0700 | [diff] [blame] | 95 | #ifndef _OS_LINUX
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 96 | /*******************************************************************************
|
| 97 | * Function: zDrvEfuse_SetSecureMsg
|
| 98 | * Description:¸Ãº¯ÊýÓÃÓÚÉèÖð²È«¿ªÆô±ê¼Ç¡¢¹«Ô¿hashÖµ¡¢É豸ID¡£
|
| 99 | * Parameters:
|
| 100 | * Input:
|
| 101 | * None
|
| 102 | * Output:
|
| 103 | * None
|
| 104 | * Returns:
|
| 105 | * None
|
| 106 | * Others:
|
| 107 | *******************************************************************************/
|
| 108 | SINT32 zDrvEfuse_SetSecureMsg(E_ZDrvEfuse_SecureMsg secure_msg, UINT32 *secure_buf);
|
| 109 | #endif
|
| 110 |
|
| 111 | #endif
|