blob: 165021e34cbf12befea7cda848474940be1b19ce [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001/*******************************************************************************
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****************************************************************************/
36typedef 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
45typedef enum
46{
47 SECURE_EN,
48 PUB_KEY_HASH,
49 DEVICE_ID,
50 MAX_ENUM
51}E_ZDrvEfuse_SecureMsg;
xf.libdd93d52023-05-12 07:10:14 -070052#else
53#include <linux/soc/zte/efuse/efuse_zx.h>
lh9ed821d2023-04-07 01:36:19 -070054#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*******************************************************************************/
79UINT32 zDrvEfuse_IsSpe(VOID);
80
lh9ed821d2023-04-07 01:36:19 -070081/*******************************************************************************
82 * Function: zDrvEfuse_GetSecureMsg
83 * Description:¸Ãº¯ÊýÓÃÓÚ»ñÈ¡¹«Ô¿¶Ô¡¢°²È«¿ªÆô±ê¼Ç¡¢¹«Ô¿hashÖµ¡¢É豸ID¡£
84 * Parameters:
85 * Input:
86 *
87 * Output:
88 *
89 * Returns:
90 *
91 * Others:
92 ********************************************************************************/
xf.libdd93d52023-05-12 07:10:14 -070093extern VOID zDrvEfuse_GetSecureMsg(T_ZDrvEfuse_Secure *secure);
lh9ed821d2023-04-07 01:36:19 -070094
xf.libdd93d52023-05-12 07:10:14 -070095#ifndef _OS_LINUX
lh9ed821d2023-04-07 01:36:19 -070096/*******************************************************************************
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*******************************************************************************/
108SINT32 zDrvEfuse_SetSecureMsg(E_ZDrvEfuse_SecureMsg secure_msg, UINT32 *secure_buf);
109#endif
110
111#endif