/****************************************************************************** | |
* | |
* (C)Copyright 2022 ASR. All Rights Reserved. | |
* | |
******************************************************************************/ | |
#ifndef _GEU_PROVISIONING_H_ | |
#define _GEU_PROVISIONING_H_ | |
#include "tim.h" | |
#include "Provisioning.h" | |
#include "fuse_conf_spec.h" | |
#define DIGEST_WLEN_MAX 8 | |
#define DEBUG_GEU (1) | |
#if DEBUG_GEU | |
#define GEU_UARTLOG(format,...) obm_printf(format,##__VA_ARGS__) | |
#else | |
#define GEU_UARTLOG(format,...) do {} while(0) | |
#endif | |
// Internal Functions | |
static fuse_conf_spec_t GetFuseConfSpec(void* parameter); | |
// GEU LIB Provisioning Functions | |
extern UINT_T GEU_LIB_GetTSR(volatile UINT_T* tsr); | |
extern UINT_T GEU_LIB_ReadProfileFuse(pTIM ptim, UINT_T addr); | |
extern UINT_T GEU_LIB_BindPlatform(pTIM ptim, void* parameter); | |
extern UINT_T GEU_LIB_VerifyPlatform(pTIM ptim); | |
extern UINT_T GEU_LIB_PlatformBinded(pTIM ptim, void* parameter); | |
extern UINT_T GEU_LIB_BindJTAGKey(pTIM ptim, void* parameter); | |
extern UINT_T GEU_LIB_VerifyJTAGKey(pTIM ptim); | |
extern UINT_T GEU_LIB_ProgramRKEK(void* parameter); | |
extern UINT_T GEU_LIB_ProgramEC521DK(void* parameter); | |
extern UINT_T GEU_LIB_WritePlatformConfig(UINT_T* conf, UINT_T bit_cnt, fuse_type_enum type, pTIM ptim, void* parameter); | |
extern UINT_T GEU_LIB_ReadPlatformConfig(UINT_T* conf, UINT_T* bit_cnt, fuse_type_enum type, void* parameter); | |
extern UINT_T GEU_LIB_AutoConfigPlatform(pTIM ptim, void* parameter); | |
extern UINT_T GEU_LIB_ProgramUsbId(void* parameter); | |
extern UINT_T GEU_LIB_ProgramOemUid(void* parameter); | |
extern UINT_T GEU_LIB_ReadUsbId(UINT8_T* usb, UINT_T* len, void* parameter); | |
extern UINT_T GEU_LIB_ReadOEMUniqueId(UINT8_T* oem_id, UINT_T len, void* parameter); | |
extern UINT_T GEU_LIB_AdvanceLifeCycle(UINT_T* lc, void* parameter); | |
extern UINT_T GEU_LIB_ReadLifeCycle(UINT_T* lc, void* parameter); | |
extern UINT_T GEU_LIB_AdvanceVersion(UINT_T* ver, void* parameter); | |
extern UINT_T GEU_LIB_ReadVersion(UINT_T* ver, void* parameter); | |
extern UINT_T GEU_LIB_ProgramPIN(pTIM ptim); | |
extern UINT_T GEU_LIB_ProgramMISCConfig(void* parameter, pTIM ptim); | |
extern UINT_T GEU_LIB_PlatformFusePrep(pFUSE_SET pFuses); | |
extern UINT_T GEU_LIB_CheckLifecycleAdvancement(void* parameter); | |
extern UINT_T GEU_LIB_ProgramSocConfig(void* parameter, pTIM ptim); | |
#endif /* _GEU_PROVISIONING_H_ */ |