/******************************************************************************* | |
* Copyright (C) 2014, ZTE Corporation. | |
* | |
* File Name: | |
* File Mark: | |
* Description: | |
* Others: | |
* Version: 1.0 | |
* Author: | |
* Date: | |
* History 1: | |
* Date: | |
* Version: | |
* Author: | |
* Modification: | |
* History 2: | |
********************************************************************************/ | |
#ifndef _DRVS_EFUSE_H | |
#define _DRVS_EFUSE_H | |
/**************************************************************************** | |
* Include files | |
****************************************************************************/ | |
#ifndef _OS_LINUX | |
#include "oss_api.h" | |
/**************************************************************************** | |
* Macros | |
****************************************************************************/ | |
/**************************************************************************** | |
* Types | |
****************************************************************************/ | |
typedef struct | |
{ | |
UINT32 pubKeyRsaE[32]; | |
UINT32 pubKeyRsaN[32]; | |
UINT32 secureFlag; | |
UINT32 pubKeyHash[4]; | |
UINT32 secureDevId[3]; | |
}T_ZDrvEfuse_Secure; | |
typedef enum | |
{ | |
SECURE_EN, | |
PUB_KEY_HASH, | |
DEVICE_ID, | |
MAX_ENUM | |
}E_ZDrvEfuse_SecureMsg; | |
#else | |
#include <linux/soc/zte/efuse/efuse_zx.h> | |
#endif | |
/**************************************************************************** | |
* Constants | |
****************************************************************************/ | |
/**************************************************************************** | |
* Global Variables | |
****************************************************************************/ | |
/**************************************************************************** | |
* Function Prototypes | |
****************************************************************************/ | |
/******************************************************************************* | |
* Function: zDrvEfuse_IsSpe | |
* Description: | |
* Parameters: | |
* Input: | |
* None | |
* Output: | |
* None | |
* Returns: | |
* Others: | |
*******************************************************************************/ | |
UINT32 zDrvEfuse_IsSpe(VOID); | |
/******************************************************************************* | |
* Function: zDrvEfuse_GetSecureMsg | |
* Description:¸Ãº¯ÊýÓÃÓÚ»ñÈ¡¹«Ô¿¶Ô¡¢°²È«¿ªÆô±ê¼Ç¡¢¹«Ô¿hashÖµ¡¢É豸ID¡£ | |
* Parameters: | |
* Input: | |
* | |
* Output: | |
* | |
* Returns: | |
* | |
* Others: | |
********************************************************************************/ | |
extern VOID zDrvEfuse_GetSecureMsg(T_ZDrvEfuse_Secure *secure); | |
#ifndef _OS_LINUX | |
/******************************************************************************* | |
* Function: zDrvEfuse_SetSecureMsg | |
* Description:¸Ãº¯ÊýÓÃÓÚÉèÖð²È«¿ªÆô±ê¼Ç¡¢¹«Ô¿hashÖµ¡¢É豸ID¡£ | |
* Parameters: | |
* Input: | |
* None | |
* Output: | |
* None | |
* Returns: | |
* None | |
* Others: | |
*******************************************************************************/ | |
SINT32 zDrvEfuse_SetSecureMsg(E_ZDrvEfuse_SecureMsg secure_msg, UINT32 *secure_buf); | |
#endif | |
#endif |