[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit
Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/boot/common/src/uboot/include/secure_verify.h b/boot/common/src/uboot/include/secure_verify.h
new file mode 100644
index 0000000..34c2ce5
--- /dev/null
+++ b/boot/common/src/uboot/include/secure_verify.h
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (C) 2016, ZIXC Corporation.
+ *
+ * File Name:
+ * File Mark:
+ * Description:
+ * Others:
+ * Version:
+ * Author:
+ * Date:
+ * History 1:
+ * Date:
+ * Version:
+ * Author:
+ * Modification:
+ * History 2:
+ ********************************************************************************/
+#ifndef __SECURE_VERIFY_H__
+#define __SECURE_VERIFY_H__
+//#include <image.h>
+
+/*--------------CRM ¼Ä´æÆ÷------------*/
+#define SYS_CTRL_BASE 0x00140000
+#define SYS_LSP_CRM_BASE 0x01400000
+#define SYS_MATRIX_CRM_BASE 0x01306000
+#define SYS_SOC_CRM_BASE 0x0013b000
+
+
+#define EFUSE_BYPASS (SYS_CTRL_BASE+0x140)
+#define BOOTSEL_INFO (SYS_SOC_CRM_BASE+0x4)
+#define MPLL_CFG0 (SYS_SOC_CRM_BASE+0x8)
+#define UPLL_CFG0 (SYS_SOC_CRM_BASE+0x10)
+#define RMCORE_CLK_CFG (SYS_SOC_CRM_BASE+0x38)
+#define RM_MOD_CLKSEL (SYS_SOC_CRM_BASE+0x3c)
+#define MATRIX_AXI_SEL (SYS_MATRIX_CRM_BASE+0x0)
+
+/* -------- efuse ²ÎÊý-------------*/
+#define SYS_EFUSE_BASE 0x0121b000
+#define EFUSE_RAM_BASE (SYS_EFUSE_BASE+0x40)
+
+/* -------- RSA, HASH ²ÎÊý-------------*/
+#define SYS_RSA_BASE 0x0121c000
+#define SYS_HASH_BASE 0x0121d000
+
+/*ΪÁË¿´ÆðÀ´·½±ã, hashºÍkeyÔÚbufferµÄ´æ·Å˳ÐòΪµÍµØÖ··Å¸ßλÊý¾Ý*/
+// ¶¨Òå½á¹¹
+typedef volatile struct
+{
+ u32 secure_flag;
+ u32 puk_hash[4];
+ u32 dev_id[3];
+} efuse_struct;
+
+typedef struct
+{
+ u32 uiPubKeyRsaE[32];
+ u32 uiPubKeyRsaN[32];
+ u32 uiHashY[32];
+} sImageHeader;
+
+static void get_efuse_data(void);
+static u32 SMALL2BIG(u32 *puiArrIn, u32 *puiArrOut, u32 uiLen);
+u8 secure_verify(u32 addr);
+static u8 data_cmp_word(u32* src, u32* dst, u32 cnt);
+int efuse_init(void);
+void efuse_get_devinfo(efuse_struct *efuse_info);
+
+#endif /* __SECURE_VERIFY_H__ */