[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit
Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/app/include/ref_nv_def.h b/ap/app/include/ref_nv_def.h
new file mode 100755
index 0000000..bf848bf
--- /dev/null
+++ b/ap/app/include/ref_nv_def.h
@@ -0,0 +1,88 @@
+/**
+ * @file ref_nv_def.h
+ * @brief ÌṩÁËnvºê¶¨Òå
+ *
+ * Copyright (C) 2017 Sanechips Technology Co., Ltd.
+ * @author
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#ifndef __REF_NV_DEF__
+#define __REF_NV_DEF__
+
+#include "RWNvConfig.h"
+#include "libcpnv.h"
+
+/******************************
+ 7520 NVRWÇøÊ×µØÖ·
+*******************************/
+#define ZPS_REF_MSINFO_REFDESIGN_BASE_ADDR (OS_FLASH_REF_DESIGN_RW_OFFSET_FROM_NV)
+
+/******************************
+ ²Î¿¼Éè¼ÆÓû§Êý¾ÝÇø£¬3K
+*******************************/
+#define NVRW_REF_NV_USER_OFFSET_SIZE (3 * 1024)
+
+/******************************
+ ²Î¿¼Éè¼ÆË½ÓÐÇø£¬8K
+ Ïà¶ÔNVRWÇøÆðʼµØÖ·µÄÆ«ÒÆµØÖ·Îª0x100C00
+*******************************/
+#define NVRW_REF_NV_PRIVATE_OFFSET_ADDRESS (ZPS_REF_MSINFO_REFDESIGN_BASE_ADDR + NVRW_REF_NV_USER_OFFSET_SIZE)
+#define NVRW_REF_NV_PRIVATE_OFFSET_SIZE (8 * 1024)
+
+
+/******************************
+ ²Î¿¼Éè¼ÆË½ÓÐÇøNV¹æ»®£¬8K
+*******************************/
+#define ZPS_REF_MSINFO_SOFTVERSION_INT_BASE_ADDR (NVRW_REF_NV_PRIVATE_OFFSET_ADDRESS)
+#define ZPS_REF_MSINFO_MAX_SOFTVERSION_INT_LEN (unsigned char)100 /*ÄÚ²¿Èí¼þ°æ±¾ºÅ×î´ó³¤¶È*/
+
+#define ZPS_REF_MSINFO_SOFTVERSION_EXT_BASE_ADDR (ZPS_REF_MSINFO_SOFTVERSION_INT_BASE_ADDR + ZPS_REF_MSINFO_MAX_SOFTVERSION_INT_LEN)
+#define ZPS_REF_MSINFO_MAX_SOFTVERSION_EXT_LEN (unsigned char)100 /*ÍⲿÈí¼þ°æ±¾ºÅ×î´ó³¤¶È*/
+
+#define ZPS_REF_MSINFO_HARDWAREVERSION_BASE_ADDR (ZPS_REF_MSINFO_SOFTVERSION_EXT_BASE_ADDR + ZPS_REF_MSINFO_MAX_SOFTVERSION_EXT_LEN)
+#define ZPS_REF_MSINFO_MAX_HARDWAREVERSION_LEN (unsigned char)100 /*Ó²¼þ°æ±¾ºÅ×î´ó³¤¶È*/
+
+#define ZPS_REF_MSINFO_PHONE_INT_BASE_ADDR (ZPS_REF_MSINFO_HARDWAREVERSION_BASE_ADDR + ZPS_REF_MSINFO_MAX_HARDWAREVERSION_LEN)
+#define ZPS_REF_MSINFO_MAX_PHONE_INT_LEN (unsigned char)32 /*ÄÚ²¿»úÐÍ×î´ó³¤¶È*/
+
+#define ZPS_REF_MSINFO_PHONE_EXT_BASE_ADDR (ZPS_REF_MSINFO_PHONE_INT_BASE_ADDR + ZPS_REF_MSINFO_MAX_PHONE_INT_LEN)
+#define ZPS_REF_MSINFO_MAX_PHONE_EXT_LEN (unsigned char)32 /*Íⲿ»úÐÍ×î´ó³¤¶È*/
+
+#define ZPS_REF_MSINFO_SSID_BASE_ADDR (ZPS_REF_MSINFO_PHONE_EXT_BASE_ADDR + ZPS_REF_MSINFO_MAX_PHONE_EXT_LEN)
+#define ZPS_REF_MSINFO_MAX_SSID_LEN (unsigned char)100 /*ZTE_WIRELESS_MACµØÖ·ºóËÄλ*/
+
+#define ZPS_REF_MSINFO_CGMI_BASE_ADDR (ZPS_REF_MSINFO_SSID_BASE_ADDR + ZPS_REF_MSINFO_MAX_SSID_LEN)
+#define ZPS_REF_MSINFO_MAX_CGMI_LEN (unsigned char)100 /*³§ÉÌÐÅÏ¢*/
+
+#define ZPS_REF_MSINFO_NEWWIFIKEY_BASE_ADDR (ZPS_REF_MSINFO_CGMI_BASE_ADDR + ZPS_REF_MSINFO_MAX_CGMI_LEN)
+#define ZPS_REF_MSINFO_MAX_NEWWIFIKEY_LEN (unsigned char)65 /*wifikey*/
+
+#define ZPS_REF_MSINFO_UNLOCKTIMES_BASE_ADDR (ZPS_REF_MSINFO_NEWWIFIKEY_BASE_ADDR + ZPS_REF_MSINFO_MAX_NEWWIFIKEY_LEN)
+#define ZPS_REF_MSINFO_MAX_UNLOCKTIMES_LEN (unsigned char)4 /*ËøÍø×î´ó½âËø´ÎÊý*/
+
+#define ZPS_REF_MSINFO_PLATFORM_END (ZPS_REF_MSINFO_UNLOCKTIMES_BASE_ADDR + ZPS_REF_MSINFO_MAX_UNLOCKTIMES_LEN)
+
+///======´Ë´¦NV¶¨ÒåΪƽ̨ÄÚ²¿NV£¬ºóÐøÆäËûÄ£¿éNV¶¨Òå¾ùÔÚ¸÷×ÔÄ£¿éÄÚ²¿Ìí¼Ó¶¨Òå
+
+#define ZPS_REF_MSINFO_VERSIONMODE_BASE_ADDR (ZPS_REF_MSINFO_PLATFORM_END)
+#define ZPS_REF_MSINFO_MAX_VERSIONMODE_LEN (unsigned char)1 /*°æ±¾Ä£Ê½ÀàÐÍ£¬Õý³£°æ±¾/¹Ò²à°æ±¾*/
+
+#define ZPS_REF_MSINFO_ZISMS_BASE_ADDR (ZPS_REF_MSINFO_VERSIONMODE_BASE_ADDR + ZPS_REF_MSINFO_MAX_VERSIONMODE_LEN)
+#define ZPS_REF_MSINFO_MAX_ZISMS_LEN (unsigned char)1 /*ÖÇÄܶÌÐŹ¦ÄÜ¿ª¹Ø*/
+
+#define ZPS_REF_MSINFO_WEBKEY_FLAG_BASE_ADDR (ZPS_REF_MSINFO_ZISMS_BASE_ADDR + ZPS_REF_MSINFO_MAX_ZISMS_LEN)
+#define ZPS_REF_MSINFO_MAX_WEBKEY_FLAG_LEN (unsigned char)1 /*ʹÓÃnvÖÐhttpsÃØÔ¿¿ª¹Ø*/
+
+#define ZPS_REF_MSINFO_WEBKEY_DATA_BASE_ADDR (ZPS_REF_MSINFO_WEBKEY_FLAG_BASE_ADDR + ZPS_REF_MSINFO_MAX_WEBKEY_FLAG_LEN)
+#define ZPS_REF_MSINFO_MAX_WEBKEY_DATA_LEN (unsigned char)2048 /*httpsÃØÔ¿Êý¾Ý*/
+
+#define REF_REF_NV_END (NVRW_REF_NV_PRIVATE_OFFSET_ADDRESS + NVRW_REF_NV_PRIVATE_OFFSET_SIZE - 1)/*¿ØÖƹÜÀíNV½áÊøµØÖ·0x2BFF*/
+
+
+#endif
+