[Feature][ZXW-241]merge P56U01 version

Only Configure: No
Affected branch: master
Affected module: unknow
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No

Change-Id: I7985538dde6951dd824c36149bf9a1e3ca23c734
diff --git a/cp/ps/driver/inc/misc/drvs_voiceprocess.h b/cp/ps/driver/inc/misc/drvs_voiceprocess.h
index a3f11e1..67cc84d 100755
--- a/cp/ps/driver/inc/misc/drvs_voiceprocess.h
+++ b/cp/ps/driver/inc/misc/drvs_voiceprocess.h
@@ -282,6 +282,7 @@
 	BOOL rxMuteEn; //24

 	BOOL firstRegZCATFlag; //25

 	T_Hal_EcallData	ecallData;//26

+    UINT8 voice_nv_update;//27

 } T_zDrvVoice_GbVar; //T_zDrvVoice_GbVar

 

 typedef struct

diff --git a/cp/ps/driver/src/chipsets/src/audio_base/audio_lib/amr/lib/armv7-a/GCC/amr.a b/cp/ps/driver/src/chipsets/src/audio_base/audio_lib/amr/lib/armv7-a/GCC/amr.a
index dd137ab..b84b7c5 100755
--- a/cp/ps/driver/src/chipsets/src/audio_base/audio_lib/amr/lib/armv7-a/GCC/amr.a
+++ b/cp/ps/driver/src/chipsets/src/audio_base/audio_lib/amr/lib/armv7-a/GCC/amr.a
Binary files differ
diff --git a/cp/ps/driver/src/chipsets/src/audio_base/voiceprocess/hal_voiceprocess.c b/cp/ps/driver/src/chipsets/src/audio_base/voiceprocess/hal_voiceprocess.c
index 784a254..2d20f9d 100755
--- a/cp/ps/driver/src/chipsets/src/audio_base/voiceprocess/hal_voiceprocess.c
+++ b/cp/ps/driver/src/chipsets/src/audio_base/voiceprocess/hal_voiceprocess.c
@@ -134,8 +134,9 @@
 	FALSE, //24 rxMuteEn

 	FALSE, //25 firstRegZCATFlag

 #ifdef ECALL_SUPPORT	

-	{0} //26 ecallData

+	{0}, //26 ecallData

 #endif

+    0 //27 voice_nv_update

 };

 

 static T_zDrvVp_State s_vpState =

@@ -1676,6 +1677,16 @@
         *voice_status = g_voiceVar.vpI2sStatus;

 }

 

+VOID zDrvVp_UpdateVoiceNv(UINT8 *voice_nv_update)

+{

+    if(NULL != voice_nv_update)

+        *voice_nv_update = g_voiceVar.voice_nv_update;

+

+    //g_voiceVar.voice_nv_update = 0;

+    

+    zDrvRamlog_PRINTF(RAMLOG_MOD_AUDIO, "zDrvVp_UpdateVoiceNv start!\n");

+}

+

 SINT32 vp_TdmCfgParam(T_ZDrvVp_Cfg *cfgParam)

 {

 	SINT32 ret = DRV_SUCCESS;

@@ -4013,6 +4024,8 @@
 {

 	SINT32  ret = DRV_SUCCESS;

 

+    g_voiceVar.voice_nv_update = 1;

+    

 	ret = VoiceProc_InitNvParam();

 	if (ret != DRV_SUCCESS)

 	{

diff --git a/cp/ps/driver/src/chipsets/src/uicc/infineonIp/uicc_io.c b/cp/ps/driver/src/chipsets/src/uicc/infineonIp/uicc_io.c
old mode 100644
new mode 100755
index 331e8be..da490f2
--- a/cp/ps/driver/src/chipsets/src/uicc/infineonIp/uicc_io.c
+++ b/cp/ps/driver/src/chipsets/src/uicc/infineonIp/uicc_io.c
@@ -1187,6 +1187,9 @@
 * Modified:... DD.MM.YY by (Full name / initials)

 *                Modifications note.

 *******************************************************************************/

+#ifdef UICC_ENABLE_IN_OUT_DETECTION

+extern	UINT8 is_hp_notsupported;

+#endif

 T_UICC_CLOSE_RESULT UICC_close(T_UICC_CARD_SELECTOR card_selector)

 {

     UICC_BEGIN_EXECUTE;

@@ -1285,6 +1288,10 @@
 	{

 		UICC_UninstallIsr(GSM_USIM_INT);

 	}

+#if defined(UICC_ENABLE_IN_OUT_DETECTION)

+	if (is_hp_notsupported == 0) {

+	}

+#endif

     UICC_uninstall_inout_callback();

 #ifdef _USE_PSM

     zDrvPow_SetDevIdle((UINT32)IDLE_FLAG_UICC);

diff --git a/cp/ps/driver/src/chipsets/src/uicc/infineonIp/uicc_ref.c b/cp/ps/driver/src/chipsets/src/uicc/infineonIp/uicc_ref.c
index bba2e94..1a78316 100755
--- a/cp/ps/driver/src/chipsets/src/uicc/infineonIp/uicc_ref.c
+++ b/cp/ps/driver/src/chipsets/src/uicc/infineonIp/uicc_ref.c
@@ -29,6 +29,9 @@
 

 #include "uicc.h"

 #include "uicc_ctrl.h"

+

+#include "NvParam_drv.h"

+

 extern VOID udelay(UINT32  us);

 extern void uicc_insert_isr(void);

 extern void uicc_remove_isr(void);

@@ -311,13 +314,28 @@
  *

  * Others:

  ********************************************************************************/

-

+#ifdef UICC_ENABLE_IN_OUT_DETECTION

+UINT8 is_hp_notsupported;

+#endif

 UINT8 zDrvUICC_ConfigForDetectSIM(VOID)

 {

 #ifdef UICC_ENABLE_IN_OUT_DETECTION

     UINT32 temp = 0;// 1 means in,0 means out

     int ret = 0;

 

+	ret = zOss_NvItemRead(DRV_SYS_NV_ITEM_ADDR(ishpnotsupported), (UINT8 *)&is_hp_notsupported, DRV_SYS_NV_ITEM_SIZE(ishpnotsupported));

+	if(ret != DRV_SUCCESS)

+	{

+	 	zOss_Printf(SUBMDL_FS, PRINT_LEVEL_ABNORMAL, "[UICC]uicc_nv_ishpnotsupported failed!!! \n");

+		return DRV_ERROR;

+	}

+

+	if (is_hp_notsupported == 1)

+	{

+		zOss_Printf(SUBMDL_FS, PRINT_LEVEL_ABNORMAL, "UICC hot plug not supported!!!\n");

+		return -1;

+	}

+

 	if(s_uicc_insert_detect == 0)

 	{

 //	s_uicc_insert_detect = zDrvGpio_Request(UICC_GPIO_NAME);

diff --git a/cp/ps/modem/com/inc/config/atcfg/sys_func_atcfg.h b/cp/ps/modem/com/inc/config/atcfg/sys_func_atcfg.h
index 14ef26d..5f08f20 100755
--- a/cp/ps/modem/com/inc/config/atcfg/sys_func_atcfg.h
+++ b/cp/ps/modem/com/inc/config/atcfg/sys_func_atcfg.h
@@ -440,8 +440,11 @@
     UINT8 bOosScanThreshFlg;/*OOSËÑÍøÃÅÏÞ¿ª¹Ø,0-¹Ø±Õ,1-´ò¿ª,³ö³§Öµ0*/

     UINT8 bOosScanThresh;/*OOSËÑÍøÃÅÏÞ,ȡֵ100-120,¶ÔÓ¦-110dBmµ½-120dBm,³ö³§Öµ0*/

     UINT8 bEcallFlg;/*0-ʹÓÿ¨ÖеÄECALL,1-ʹÓÃNVÖеÄECALL,³ö³§Öµ0*/

-    /*bit0:0-οؽµÎ»ָ´Ê±,µÈ»Ø¿ÕÏÐÔÙ´ò¿ªNRÄÜÁ¦,1-οؽµÎÂʱÁ¢¿Ì´ò¿ªNRÄÜÁ¦,³ö³§Öµ0

-      bit1:1-ÎÞÂÛ¿¨ÖÐRPLMNÊÇ·ñÓëNVÖеÄÏàͬ,´ÓRPLMN¿ªÊ¼Ñ¡Íø,1-¿¨ÖÐRPLMNÓëNVÖеIJ»Í¬Ê±,²»Ñ¡RPLMN,Ö±½Ó´ÓHPLMN¿ªÊ¼Ñ¡Íø,³ö³§Öµ0*/

+    /*bit0:0-±£Áô*/

+    /*bit1:×Ô¶¯ËÑÍøÑ¡ÔñRPLMN¹æÔò,1-±ØÐ뿨ÖкÍNVÖеÄRPLMNÒ»Ö²ÅʹÓÃRPLMNפÁô,·ñÔòʹÓÃHPLMN,0-ʹÓÃRPLMNפÁôʱ,¿¨ÖкÍNVÖеÄRPLMN²»ÊDZØÐëÒ»ÖÂ,³ö³§Öµ0*/

+    /*bit2:ÍøÂç¾Ü¾øºóUE×Ô¶¯»Ö¸´¶¨Ê±Æ÷ÊÇ·ñÆô¶¯,1-²»Æô¶¯,0-Æô¶¯,¶¨Ê±Æ÷³¬Ê±ºóɾ³ý½ûÖ¹Áбí»Ö¸´¿¨×´Ì¬,³ö³§Öµ0*/

+    /*bit3:PDN±»#33Ô­Òò¾Ü¾øºóÊÇ·ñÔÊÐíÔٴη¢Æð,0-ÔÊÐíÔٴη¢ÆðÏàͬPDNÇëÇó,1-ÏàͬPDNµÄÇëÇó²»ÄÜ·¢Æð,Ö±µ½ÖØÆô»òÕß»»¿¨*/

+    /*bit4:Èç¹û·¢ÆðPDNµÄAPNÓëATTACH CIDµÄAPNÏàͬ,ÊÇ·ñ°áǨATTACH CIDµÄÉÏÏÂÎĵ½Ð·¢ÆðµÄPDNÖÐ,0-attach cid´óÓÚ1ʱ²Å°áǨ,1-ÎÞÂÛattach cidÊÇ·ñ´óÓÚ1¶¼°áǨ*/

     UINT16 wNasBitmap;

 }CommAtSetting;

 /* atÉèÖýṹÌå ²»´æNV*/

diff --git a/cp/ps/modem/com/src/appstart/inc/version_number.h b/cp/ps/modem/com/src/appstart/inc/version_number.h
index 1f5d7cb..e2a9005 100755
--- a/cp/ps/modem/com/src/appstart/inc/version_number.h
+++ b/cp/ps/modem/com/src/appstart/inc/version_number.h
@@ -1,9 +1,9 @@
 #if defined _CHIP_ZX297520
-#define VERSION_NUMBER "7520SCV2.01.01.02P54U03"
+#define VERSION_NUMBER "7520SCV2.01.01.02P56U01"
 #endif
 #if defined _CHIP_ZX297520V2
-#define VERSION_NUMBER "7520V2SCV2.01.01.02P54U03"
+#define VERSION_NUMBER "7520V2SCV2.01.01.02P56U01"
 #endif
 #if defined _CHIP_ZX297520V3
-#define VERSION_NUMBER "7520V3SCV2.01.01.02P54U03"
+#define VERSION_NUMBER "7520V3SCV2.01.01.02P56U01"
 #endif
diff --git a/cp/ps/modem/ps/inc/atipscom.h b/cp/ps/modem/ps/inc/atipscom.h
index d4a85f3..d8e8aca 100755
--- a/cp/ps/modem/ps/inc/atipscom.h
+++ b/cp/ps/modem/ps/inc/atipscom.h
@@ -238,7 +238,7 @@
 #define Z_ATI_NV_PttSubWayFlag                             (BYTE)(Z_ATI_NV_PttIOTFlag + 1)

 #define Z_ATI_NV_PrvEnd                                    (BYTE)(Z_ATI_NV_PttSubWayFlag + 0)

 #else

-#define Z_ATI_NV_PrvEnd                                    (BYTE)(Z_ATI_NV_EcallNum + 0)

+#define Z_ATI_NV_PrvEnd                                    (BYTE)(Z_ATI_NV_EcallTime + 0)

 #endif

 

 

@@ -1221,7 +1221,8 @@
 typedef struct {

     BYTE     bOnOff;/*ÊÇ·ñÖ§³ÖNITZ×Ô¶¯¸üÐÂÊ±Çø0²»Ö§³Ö,1Ö§³Ö*/

     BYTE     bRptMod;/*Ê±Çø±ä»¯Éϱ¨Ä£Ê½,ȡֵ·¶Î§0-1*/

-    BYTE     abPadding[2];

+    BYTE     bZmmiSet;/*ÊÇ·ñ´ò¿ªZMMIÉϱ¨,0-¹Ø±Õ,1-´ò¿ª*/

+    BYTE     bPadding;

 }T_zAti_NV_NitzCfg;

 

 typedef struct{

@@ -1957,7 +1958,8 @@
 #endif

     BYTE                            bRoamNetSerch; /*¹úÄÚÂþÓÎÍøÂçËÑË÷¹¦ÄÜ¿ª¹Ø*/

     BYTE                            bCecnSet;

-    BYTE                            abPadding2[2];

+    BYTE                            bCauseIndSet;

+    BYTE                            bPadding3;

 }T_zDev_AtMem_Mmia_PrivateMem;

 

 typedef struct {

diff --git a/cp/ps/modem/ps/inc/atipsint.h b/cp/ps/modem/ps/inc/atipsint.h
index 0272e78..1f8b743 100755
--- a/cp/ps/modem/ps/inc/atipsint.h
+++ b/cp/ps/modem/ps/inc/atipsint.h
@@ -1844,6 +1844,22 @@
     T_z_PlmnId                  tCurPlmnId;     /*µ±Ç°ÍøÂçID*/

 }T_zMmiaUmm_MmInfo_Ind;

 

+

+/*==============================================================================

+ Ô­ÓMMIA_UMM_CAUSE_IND_EV( UMM-->ATI )

+ ˵Ã÷:  NASÏòATIÖ÷¶¯Éϱ¨Cause

+==============================================================================*/

+typedef struct {

+    BYTE                        bSrcIndex;

+    BYTE                        bDesIndex;

+    BYTE                        abPadding[2];

+

+    BYTE                        bModType;/*0-MM*/

+    BYTE                        bAct; /*3-GSM,5-W,15-TD,17-LTE*/

+    BYTE                        bDomain; /*0-CS,1-PS*/

+    BYTE                        bCause;

+}T_zMmiaUmm_Cause_Ind;

+

 /*==============================================================================

  Ô­ÓMMIA_UMM_RFControlReq_EV( MMIA->UMM )

  ˵Ã÷: MMIA·¢ËÍ¿ª¹ØÉ䯵µÄÇëÇóµ½UMM

diff --git a/cp/ps/modem/ps/src/nas/ati/inc/zat_api.h b/cp/ps/modem/ps/src/nas/ati/inc/zat_api.h
index 238bae2..6da8e4b 100755
--- a/cp/ps/modem/ps/src/nas/ati/inc/zat_api.h
+++ b/cp/ps/modem/ps/src/nas/ati/inc/zat_api.h
@@ -110,7 +110,9 @@
     ZAT2_CFG_ZUECAPASET,

     ZAT2_CFG_ZULRTIND,

     ZAT2_CFG_ZCUSTMMCC,

-    ZAT2_CFG_END,       

+    ZAT2_CFG_ZCAUSE,

+    ZAT2_CFG_ZVREG,

+    ZAT2_CFG_END,

     

     /*-----------MMÄ£¿é-------------*/

     ZAT2_MM_BGN,

diff --git a/cp/ps/modem/ps/src/nas/ati/inc/zat_fnc.h b/cp/ps/modem/ps/src/nas/ati/inc/zat_fnc.h
index 9aaea8e..96b21ad 100755
--- a/cp/ps/modem/ps/src/nas/ati/inc/zat_fnc.h
+++ b/cp/ps/modem/ps/src/nas/ati/inc/zat_fnc.h
@@ -1008,7 +1008,7 @@
 UINT16 zAt_PsEncZemltehoInd(T_ZAt_EncCmdInfo * pEncCmdInfo);

 UINT16 zAt_PsEncZcsqQryCnf(T_ZAt_EncCmdInfo * pEncCmdInfo);

 UINT16 zAt_PsEncZlbsCnf(T_ZAt_EncCmdInfo * pEncCmdInfo);

-

+UINT16 zAt_PsEncUmmCause(T_ZAt_EncCmdInfo * pEncCmdInfo);

 /****************************ACMÄ£¿éЭÒéÕ»²à»ØÓ¦±àÂ뺯Êý*******************************/

 #ifdef USE_VOICE_SUPPORT

 UINT16 zAt_PsEncAcmCaocSetCnf(T_ZAt_EncCmdInfo * pEncCmdInfo);

@@ -1282,8 +1282,11 @@
 T_ZAt_ParseCmd2MsgRslt zAt_PsDecZuecapaSetReq(T_ZAt_DecCmdInfo * pDecCmdInfo);

 T_ZAt_ParseCmd2MsgRslt zAt_PsDecZuecapaSetQry(T_ZAt_DecCmdInfo * pDecCmdInfo);

 T_ZAt_ParseCmd2MsgRslt zAt_PsDecZulrtindSetReq(T_ZAt_DecCmdInfo * pDecCmdInfo);

+T_ZAt_ParseCmd2MsgRslt zAt_PsDecZcauseSetReq(T_ZAt_DecCmdInfo * pDecCmdInfo);

+T_ZAt_ParseCmd2MsgRslt zAt_PsDecZcauseQryReq(T_ZAt_DecCmdInfo * pDecCmdInfo);

 T_ZAt_ParseCmd2MsgRslt zAt_PsDecZcustmMccSetReq(T_ZAt_DecCmdInfo *pDecCmdInfo);

 T_ZAt_ParseCmd2MsgRslt zAt_PsDecZcustmMccQryReq(T_ZAt_DecCmdInfo *pDecCmdInfo);

+T_ZAt_ParseCmd2MsgRslt zAt_PsDecZvregSetReq(T_ZAt_DecCmdInfo * pDecCmdInfo);

 #ifdef DSDS_VSIM

 T_ZAt_ParseCmd2MsgRslt zAt_PsDecZcardSwitchReq(T_ZAt_DecCmdInfo *pDecCmdInfo);

 UINT16 zAt_PsEncCardSwitchReqCnf(T_ZAt_EncCmdInfo * pEncCmdInfo);

diff --git a/cp/ps/modem/ps/src/nas/ati/inc/zati_com.h b/cp/ps/modem/ps/src/nas/ati/inc/zati_com.h
index e622d5e..3547aa4 100755
--- a/cp/ps/modem/ps/src/nas/ati/inc/zati_com.h
+++ b/cp/ps/modem/ps/src/nas/ati/inc/zati_com.h
@@ -1780,4 +1780,6 @@
 extern VOID zAti_SetS0Value(BYTE bS0Value);

 extern BYTE zAti_GetS0Value(VOID);

 BYTE zAt_IsBeepCallNum(T_z_CallNum *ptCheckedNum);

+BYTE zAti_GetSubActAccord2SubMode(BYTE bSubMode);

+VOID zAti_GetLteSubActAccord2SubMode(PBYTE pSubAct, PBYTE pSubActFg, BYTE bSubMode);

 #endif

diff --git a/cp/ps/modem/ps/src/nas/ati/inc/zati_int.h b/cp/ps/modem/ps/src/nas/ati/inc/zati_int.h
old mode 100644
new mode 100755
index ec3689a..fefb59b
--- a/cp/ps/modem/ps/src/nas/ati/inc/zati_int.h
+++ b/cp/ps/modem/ps/src/nas/ati/inc/zati_int.h
@@ -313,6 +313,12 @@
 #define Z_APMMIA_LTE_TDD_PREF                  (BYTE)2

 #define Z_APMMIA_LTE_FDD_PREF                  (BYTE)3

 

+/*+ZVREGÉèÖÃȡֵ*/

+#define Z_APMMIA_ZVREG_GSM                     (BYTE)0

+#define Z_APMMIA_ZVREG_TD                      (BYTE)1

+#define Z_APMMIA_ZVREG_W                       (BYTE)2

+#define Z_APMMIA_ZVREG_LTE                     (BYTE)3

+

 /*CEMODEÉèÖÃȡֵ*/

 #define Z_APMMIA_CEMODE_PSMODE                 (BYTE)0    /*LTEÐÂÔö*/

 #define Z_APMMIA_CEMODE_MODE1                  (BYTE)1    /*LTEÐÂÔö*/

diff --git a/cp/ps/modem/ps/src/nas/ati/src/zat_ext_fnc.c b/cp/ps/modem/ps/src/nas/ati/src/zat_ext_fnc.c
old mode 100644
new mode 100755
index bad0881..bcee7f1
--- a/cp/ps/modem/ps/src/nas/ati/src/zat_ext_fnc.c
+++ b/cp/ps/modem/ps/src/nas/ati/src/zat_ext_fnc.c
@@ -7823,6 +7823,7 @@
 {

     T_zApMmia_ZmmiSet_Req* ptZmmiSet = (T_zApMmia_ZmmiSet_Req*)pBuff;

     T_zDev_AtMem_Mmia_PrivateMem tAtData = {0};

+    T_zAti_NV_NitzCfg tNvZmmiSet = {0};

 

     zAti_MarkIndex(ptZmmiSet, Z_PSMDL_UMM);

 

@@ -7832,14 +7833,21 @@
     }

     else

     {

-        /* ´ÓNV¶ÁÈ¡ÉèÖà */

         zDev_AtMemReadItem(Z_AtMem_ID_MmiaPrvtMem, 0, (PBYTE)&tAtData, g_zAti_CurInstance);

         tAtData.bZmmiSet = ptZmmiSet->bZmmiSet;     /* ÉèÖÃ+ZMMI²ÎÊý */

         zDev_AtMemWriteItem(Z_AtMem_ID_MmiaPrvtMem, 0 ,(PBYTE)&tAtData, g_zAti_CurInstance);

+

+        zDev_NV_AtiReadItem(Z_ATI_NV_NitzUpdateCfg, (PBYTE)&tNvZmmiSet);

+

+        if(tNvZmmiSet.bZmmiSet != ptZmmiSet->bZmmiSet)

+        {

+            tNvZmmiSet.bZmmiSet = ptZmmiSet->bZmmiSet;

+            zDev_NV_AtiWriteItem(Z_ATI_NV_NitzUpdateCfg, (PBYTE)&tNvZmmiSet);

+        }

     }

 

     sprintf((char *)g_zAt_EncBuf, "%s",  g_zAt_OK);

-    

+

     return Z_APMMIA_NOERROR_ERR;

 }

 

@@ -7858,10 +7866,10 @@
     T_zDev_AtMem_Mmia_PrivateMem tAtData = {0};

 

     zAti_MarkIndex(ptZmmiQryReq, Z_PSMDL_UMM);

-    

+

     /* ´ÓNV¶ÁÈ¡ÉèÖà */

     zDev_AtMemReadItem(Z_AtMem_ID_MmiaPrvtMem, 0, (PBYTE)&tAtData, g_zAti_CurInstance);

-    

+

     sprintf((char *)g_zAt_EncBuf, "%s+ZMMI: %d%s%s", g_zAt_CRLF, tAtData.bZmmiSet, g_zAt_CRLF, g_zAt_OK);

     return Z_APMMIA_NOERROR_ERR;

 }

diff --git a/cp/ps/modem/ps/src/nas/ati/src/zat_fnc.c b/cp/ps/modem/ps/src/nas/ati/src/zat_fnc.c
index 0e6b24f..0b9ebf3 100755
--- a/cp/ps/modem/ps/src/nas/ati/src/zat_fnc.c
+++ b/cp/ps/modem/ps/src/nas/ati/src/zat_fnc.c
@@ -24446,6 +24446,115 @@
 

     return zAt_GetParseRslt(ZAT2_CMD_REPLY_DIRECT);

 }

+

+T_ZAt_ParseCmd2MsgRslt zAt_PsDecZvregSetReq(T_ZAt_DecCmdInfo * pDecCmdInfo)

+{

+    CHAR* pDecCmdStr = pDecCmdInfo->strParam;   /* ¼Ç¼²ÎÊý×ֶεÄÓÎ×ßÖ¸Õë */

+    CHAR strSubBuf[ZAT2_SUB_PARAM_MAX_LEN] = {0};    /* ´æ·ÅÁÙʱ½ØÈ¡µÄ×Ö·û´® */

+    BYTE bAct = Z_NO_ACT;

+    BYTE bSubAct = 0;

+    BYTE bSubActFg = Z_INVALID;

+    BYTE bQryMode = 0;

+    BYTE bEpsState = 0xFF;

+    BYTE bPsState = 0xFF;

+    CHAR * pStrWalk = g_zAt_EncBuf;

+    T_zAti_PlmnPara tPlmnPara = {0};

+    T_ZAt_ParseCmd2MsgRslt     prsCmd2Msg = {0};

+

+    if(!zAt_PsDecNextParamDecimalNumByteNeed(&prsCmd2Msg, strSubBuf, &pDecCmdStr, &bQryMode, NULL)

+        || bQryMode > Z_APMMIA_ZVREG_LTE)

+    {

+        return zAt_GetParseRslt2(&prsCmd2Msg, ZAT2_CMD_PARAM_ERR);

+    }

+

+    if(strlen((const char *)pDecCmdStr) != 0)

+    {

+        return zAt_GetParseRslt2(&prsCmd2Msg, ZAT2_CMD_PARAM_ERR);

+    }

+

+    if(bQryMode == Z_APMMIA_ZVREG_LTE)

+    {

+        #ifdef PS_RAT_LTE

+        bEpsState = g_zAti_atDataEx[g_zAti_CurInstance].bEpsState;

+        pStrWalk += sprintf((char *)pStrWalk, "%s+ZVREG: %d", g_zAt_CRLF, bEpsState);

+

+        if(bEpsState == Z_APMMIA_REGSTATE_REGROAMING || bEpsState == Z_APMMIA_REGSTATE_REGHPLMN || bEpsState == Z_APMMIA_REGSTATE_NOREGNOSEARCH)

+        {

+            tPlmnPara = g_zAti_atDataEx[g_zAti_CurInstance].tEPlmnPara;

+            pStrWalk += sprintf((char *)pStrWalk, ",\"%X%X%X%X%X", tPlmnPara.tPlmnId.bMCC1, tPlmnPara.tPlmnId.bMCC2, tPlmnPara.tPlmnId.bMCC3,

+                tPlmnPara.tPlmnId.bMNC1, tPlmnPara.tPlmnId.bMNC2);

+

+            if(tPlmnPara.tPlmnId.bMNC3 != 15)

+            {

+                pStrWalk += sprintf((char *)pStrWalk, "%X", tPlmnPara.tPlmnId.bMNC3);

+            }

+

+            pStrWalk += sprintf((char *)pStrWalk, "\",\"%02X%02X\",\"%02X%02X%02X%02X\",%d", tPlmnPara.abTac[1], tPlmnPara.abTac[0], 

+                tPlmnPara.abCi[3], tPlmnPara.abCi[2], tPlmnPara.abCi[1], tPlmnPara.abCi[0], tPlmnPara.bAct);

+

+            zAti_GetLteSubActAccord2SubMode(&bSubAct, &bSubActFg, tPlmnPara.bSubMode);

+

+            if(bSubActFg == Z_VALID)

+            {

+                pStrWalk += sprintf((char *)pStrWalk, ",%d", bSubAct);

+            }

+        }

+        sprintf((char *)pStrWalk, "%s%s", g_zAt_CRLF, g_zAt_OK);

+        #else

+        zAt_EncErrorCode(g_zAt_EncBuf, ZAT2_CFG_ZVREG, ZAT2_CMEE_GETNOINFO_ERR);

+        #endif

+    }

+    else

+    {

+        bPsState = g_zAti_atDataEx[g_zAti_CurInstance].bPsState;

+        pStrWalk += sprintf((char *)pStrWalk, "%s+ZVREG: %d", g_zAt_CRLF, bPsState);

+

+        if(bPsState == Z_APMMIA_REGSTATE_REGROAMING || bPsState == Z_APMMIA_REGSTATE_REGHPLMN || bPsState == Z_APMMIA_REGSTATE_NOREGNOSEARCH)

+        {

+            tPlmnPara = g_zAti_atDataEx[g_zAti_CurInstance].tPsPlmnPara;

+

+            pStrWalk += sprintf((char *)pStrWalk, ",\"%X%X%X%X%X", tPlmnPara.tPlmnId.bMCC1, tPlmnPara.tPlmnId.bMCC2, tPlmnPara.tPlmnId.bMCC3,

+                tPlmnPara.tPlmnId.bMNC1, tPlmnPara.tPlmnId.bMNC2);

+

+            if(tPlmnPara.tPlmnId.bMNC3 != 15)

+            {

+                pStrWalk += sprintf((char *)pStrWalk, "%X", tPlmnPara.tPlmnId.bMNC3);

+            }

+

+            pStrWalk += sprintf((char *)pStrWalk, "\",\"%02X%02X\",\"%02X%02X%02X%02X\"", tPlmnPara.abLac[1], tPlmnPara.abLac[0], 

+                tPlmnPara.abCi[3], tPlmnPara.abCi[2], tPlmnPara.abCi[1], tPlmnPara.abCi[0]);

+

+            bAct = zAti_GetSubActAccord2SubMode(tPlmnPara.bSubMode);

+

+            if(bAct == Z_ATI_INVALID_BYTE)

+            {

+                bAct = tPlmnPara.bAct;

+            }

+

+            pStrWalk += sprintf((char *)pStrWalk, ",%d", bAct);

+

+            if (tPlmnPara.tAct.bW == Z_VALID)

+            {

+                bSubActFg = Z_VALID;

+                bSubAct = FDD_SUBACT;

+            }

+            else if (tPlmnPara.tAct.bTD == Z_VALID)

+            {

+                bSubActFg = Z_VALID;

+                bSubAct = TDD_SUBACT;

+            }

+

+            if(bSubActFg == Z_VALID)

+            {

+                pStrWalk += sprintf((char *)pStrWalk, ",%d", bSubAct);

+            }

+        }

+

+        sprintf((char *)pStrWalk, "%s%s", g_zAt_CRLF, g_zAt_OK);

+    }

+

+    return zAt_GetParseRslt2(&prsCmd2Msg, ZAT2_CMD_REPLY_DIRECT);

+}

 /**************************************************************************

 * º¯ÊýÃû³Æ£º zAt_PsDecZpaidQueryReq

 * ¹¦ÄÜÃèÊö£º ¸ù¾ÝµÚ1²½½âÎö½á¹û£¬½âÎö+ZPAIDÇëÇ󣬲¢Ö±½ÓÌîд²éѯ½á¹û

@@ -25621,6 +25730,47 @@
     prsCmd2Msg.decRslt2nd = ZAT2_CMD_REPLY_DIRECT;

     return prsCmd2Msg;

 }

+T_ZAt_ParseCmd2MsgRslt zAt_PsDecZcauseSetReq(T_ZAt_DecCmdInfo * pDecCmdInfo)

+{

+    CHAR* pDecCmdStr = pDecCmdInfo->strParam;

+    CHAR strSubBuf[100] = {0};

+    T_ZAt_ParseCmd2MsgRslt     prsCmd2Msg = {0};

+    T_zDev_AtMem_Mmia_PrivateMem tAtData    = {0};

+    BYTE bSetPara = Z_APMMIA_INVALID;

+

+    /*+ZCAUSE=<n>*/

+    if(!(zAt_PsDecNextParamDecimalNumByteNeed( &prsCmd2Msg, strSubBuf, &pDecCmdStr, &bSetPara, NULL))

+        || bSetPara > Z_APMMIA_VALID)

+    {

+        return zAt_GetParseRslt2(&prsCmd2Msg,ZAT2_CMD_PARAM_ERR);

+    }

+

+    if(strlen((const char *)pDecCmdStr) != 0)

+    {

+        return zAt_GetParseRslt2(&prsCmd2Msg,ZAT2_CMD_PARAM_ERR);

+    }

+

+    zDev_AtMemReadItem(Z_AtMem_ID_MmiaPrvtMem, 0, (PBYTE)&tAtData, g_zAti_CurInstance);

+    tAtData.bCauseIndSet = bSetPara;

+    zDev_AtMemWriteItem(Z_AtMem_ID_MmiaPrvtMem, 0 ,(PBYTE)&tAtData, g_zAti_CurInstance);

+

+    zOss_Memcpy(g_zAt_EncBuf, g_zAt_OK, strlen((const char *)g_zAt_OK));

+    prsCmd2Msg.decRslt2nd = ZAT2_CMD_REPLY_DIRECT;

+

+    return prsCmd2Msg;

+}

+

+T_ZAt_ParseCmd2MsgRslt zAt_PsDecZcauseQryReq(T_ZAt_DecCmdInfo * pDecCmdInfo)

+{

+    CHAR * pStrWalk = g_zAt_EncBuf;

+    T_zDev_AtMem_Mmia_PrivateMem tAtData    = {0};

+

+    zDev_AtMemReadItem(Z_AtMem_ID_MmiaPrvtMem, 0, (PBYTE)&tAtData, g_zAti_CurInstance);

+

+    sprintf((char *)pStrWalk ,"%s+ZCAUSE: %d%s%s", g_zAt_CRLF, tAtData.bCauseIndSet, g_zAt_CRLF, g_zAt_OK);

+

+    return zAt_GetParseRslt(ZAT2_CMD_REPLY_DIRECT);

+}

 /**************************************************************************

 * º¯ÊýÃû³Æ£º zAt_PsDecZtpmrReq

 * ¹¦ÄÜÃèÊö£º ¸ù¾ÝµÚ1²½½âÎö½á¹û£¬ÌîдÏûÏ¢¶ÔÓ¦µÄ½á¹¹Ìå

diff --git a/cp/ps/modem/ps/src/nas/ati/src/zat_fnc_sup.c b/cp/ps/modem/ps/src/nas/ati/src/zat_fnc_sup.c
index 9abf081..5ca1e08 100755
--- a/cp/ps/modem/ps/src/nas/ati/src/zat_fnc_sup.c
+++ b/cp/ps/modem/ps/src/nas/ati/src/zat_fnc_sup.c
@@ -12482,4 +12482,40 @@
     return (UINT16)strlen((const char *)pEncCmdInfo->pStrCmd);

 }

 #endif

+UINT16 zAt_PsEncUmmCause(T_ZAt_EncCmdInfo * pEncCmdInfo)

+{

+    BYTE bAct = Z_NO_ACT;

+    CHAR * pStrWalk = pEncCmdInfo->pStrCmd;

+    T_zDev_AtMem_Mmia_PrivateMem tAtData    = {0};

+    T_zMmiaUmm_Cause_Ind *ptCauseInd = (T_zMmiaUmm_Cause_Ind*) pEncCmdInfo->pMsgBody;

+

+    zDev_AtMemReadItem(Z_AtMem_ID_MmiaPrvtMem, 0, (PBYTE)&tAtData, g_zAti_CurInstance);

+

+    if(tAtData.bCauseIndSet == Z_INVALID)

+    {

+        return 0;

+    }

+

+    if(ptCauseInd->bAct == Z_LTE_ACT)

+    {

+        bAct = Z_APMMIA_LTE;

+    }

+    else if(ptCauseInd->bAct == Z_W_ACT)

+    {

+        bAct = Z_APMMIA_WCDMA;

+    }

+    else if(ptCauseInd->bAct == Z_TD_ACT)

+    {

+        bAct = Z_APMMIA_TDSCDMA;

+    }

+    else if(ptCauseInd->bAct == Z_GSM_ACT)

+    {

+        bAct = Z_APMMIA_GSMGPRS;

+    }

+

+    sprintf((char *)pStrWalk, "%s+ZCAUSE: %d,%d,%d,%d%s", g_zAt_CRLF, ptCauseInd->bModType, bAct, ptCauseInd->bDomain, 

+        ptCauseInd->bCause, g_zAt_CRLF);

+

+    return (UINT16)strlen((const char *)pEncCmdInfo->pStrCmd);

+}

 

diff --git a/cp/ps/modem/ps/src/nas/ati/src/zat_var.c b/cp/ps/modem/ps/src/nas/ati/src/zat_var.c
index 65050cd..759cb8a 100755
--- a/cp/ps/modem/ps/src/nas/ati/src/zat_var.c
+++ b/cp/ps/modem/ps/src/nas/ati/src/zat_var.c
@@ -498,6 +498,8 @@
     {   "+ZLTEBLKCELL",    ZAT2_LTE_ZLTEBLKCELL,    "+ZLTEBLKCELL: (0-5)"},

     {   "+ZLTECAT",        ZAT2_LTE_ZLTECAT,           ""},

     {   "+ZCUSTMMCC",       ZAT2_CFG_ZCUSTMMCC,            ""    },

+    {   "+ZVREG",        ZAT2_CFG_ZVREG,        "+ZVREG: (0-3)"                },

+    {   "+ZCAUSE",       ZAT2_CFG_ZCAUSE,           "+ZCAUSE: (0,1)"    },

 

     /********************************* LTE GoTaÄ£¿é *******************************/

 #ifdef BTRUNK_SUPPORT

@@ -706,6 +708,9 @@
     { ZAT2_CFG_ZUECAPASET,      ZAT2_CO_QUERY_REQ,    0,    zAt_PsDecZuecapaSetQry },

     /**********************************+ZULRTIND******************************/

     { ZAT2_CFG_ZULRTIND,     ZAT2_CO_SET_REQ,    0,    zAt_PsDecZulrtindSetReq  },

+    /**********************************+ZCAUSE***********************/

+    { ZAT2_CFG_ZCAUSE,     ZAT2_CO_SET_REQ,    0,    zAt_PsDecZcauseSetReq  },

+    { ZAT2_CFG_ZCAUSE,     ZAT2_CO_QUERY_REQ,    0,    zAt_PsDecZcauseQryReq  },

     /***********************************************************************************************    

     MMÄ£¿é

     ***********************************************************************************************/    

@@ -1729,6 +1734,9 @@
     { ZAT2_CFG_ZCUSTMMCC,    ZAT2_CO_SET_REQ,  0,  zAt_PsDecZcustmMccSetReq  },

     { ZAT2_CFG_ZCUSTMMCC,    ZAT2_CO_QUERY_REQ,  0,  zAt_PsDecZcustmMccQryReq  },

 

+    /**************************************+ZVREG*********************************/

+    { ZAT2_CFG_ZVREG,   ZAT2_CO_SET_REQ,    0,     zAt_PsDecZvregSetReq   },

+

 #ifdef DSDS_VSIM

     /*******************************************+ZCARDSWITCHREQ**********************************************/

     { ZAT2_LTE_ZCARDSWITCHREQ,    ZAT2_CO_SET_REQ,   ATI_DISTRIBUTE_FUNC_CARDSWITCH_REQ_EV,    zAt_PsDecZcardSwitchReq    },

@@ -1935,6 +1943,9 @@
 

     /**********************************+ZLBS**********************************/

     {MMIA_AS_LBS_CNF_EV,    zAt_PsEncZlbsCnf,    ZAT2_CO_CNF},

+

+    /**********************************+ZCAUSE*******************************/

+    {MMIA_UMM_CAUSE_IND_EV,    zAt_PsEncUmmCause,    ZAT2_CO_IND},

     

     /*****************************************************************

     CCÄ£¿é

diff --git a/cp/ps/modem/ps/src/nas/ati/src/zati_com.c b/cp/ps/modem/ps/src/nas/ati/src/zati_com.c
index 72b5b7f..9fce355 100755
--- a/cp/ps/modem/ps/src/nas/ati/src/zati_com.c
+++ b/cp/ps/modem/ps/src/nas/ati/src/zati_com.c
@@ -1099,6 +1099,7 @@
     case AP_UICC_NO_PROC_NOTIFY_IND_EV:

     case AP_UICC_USAT_FETCH_IND_EV:

     case AP_MMIA_ZULRTIND_IND_EV:

+    case MMIA_UMM_CAUSE_IND_EV:

 #ifdef _USE_LPP_ECID

     case MMIA_SS_MOLR_RES_IND_EV:

     case MMIA_SS_MTLOCIREQ_NOTIFY_IND_EV:

diff --git a/cp/ps/plat/inc/oss/ramdump.h b/cp/ps/plat/inc/oss/ramdump.h
old mode 100644
new mode 100755
index a83ffda..0acfba7
--- a/cp/ps/plat/inc/oss/ramdump.h
+++ b/cp/ps/plat/inc/oss/ramdump.h
@@ -26,6 +26,7 @@
 /*******************************************************************************
 *                                   ºê¶¨Òå                                     *
 *******************************************************************************/
+#define RAMDUMP_CLEAR_PRIO_FLAG  (0x7)
 
 /*******************************************************************************
 *                                Êý¾ÝÀàÐͶ¨Òå                                  *
@@ -39,7 +40,10 @@
     RAMDUMP_FLAG_NEED_COPY      = 0x01, /* Copy destination address */
     RAMDUMP_FLAG_HAS_EXTERNAL   = 0x02, /* External address         */
     RAMDUMP_FLAG_HAS_CALLBACK   = 0x04, /* Callback funtion         */
-};
+    RAMDUMP_FLAG_LEVEL_HIGH     = 0x08, /* High prior level         */
+    RAMDUMP_FLAG_LEVEL_MEDIUM   = 0x10, /* Medium prior level       */
+    RAMDUMP_FLAG_LEVEL_LOW      = 0x20, /* Low prior level          */
+ };
 
 /*******************************************************************************
 *                                È«¾Ö±äÁ¿ÉùÃ÷                                  *
diff --git a/cp/ps/plat/src/oss/osa/linux/src/linux_kernel.c b/cp/ps/plat/src/oss/osa/linux/src/linux_kernel.c
index 7d5728b..60ade21 100755
--- a/cp/ps/plat/src/oss/osa/linux/src/linux_kernel.c
+++ b/cp/ps/plat/src/oss/osa/linux/src/linux_kernel.c
@@ -2885,7 +2885,7 @@
         for_each_processex(task) {

             integer = (unsigned int)task->ac_cpupercent;

             decimal = (unsigned int)((task->ac_cpupercent - integer) * 100);

-            snprintf(percent, sizeof(percent), "%u.%u", integer, decimal);

+            snprintf(percent, sizeof(percent), "%u.%02u", integer, decimal);

             snprintf(buf + cnt*SCHED_STAT_STR_LEN, SCHED_STAT_STR_LEN,

                     "%-16s %16d %16llu %16s %16d %16u %16s\n",

                     &task->comm[0],

@@ -2912,10 +2912,11 @@
             if(task->ac_cpupercent > 0){

                 integer = (unsigned int)task->ac_cpupercent;

                 decimal = (unsigned int)((task->ac_cpupercent - integer) * 100);

-                snprintf(percent, sizeof(percent), "%u.%u", integer, decimal);

+                snprintf(percent, sizeof(percent), "%u.%02u", integer, decimal);

                 snprintf(buf + cnt*SCHED_STAT_STR_LEN, SCHED_STAT_STR_LEN,

-                        "%-16s %16llu %16s %16d %16u %16s\n",

+                        "%-16s %16d %16llu %16s %16d %16u %16s\n",

                         &task->comm[0],

+                        task->pid,

                         (unsigned long long)task->se.sum_exec_runtime,

                         linux_thread_sched_policy[task->policy],

                         task->prio, task->rt_priority, percent);

diff --git a/cp/ps/plat/src/oss/sup/src/ramdump_client.c b/cp/ps/plat/src/oss/sup/src/ramdump_client.c
old mode 100644
new mode 100755
index 399c9ce..78f55d4
--- a/cp/ps/plat/src/oss/sup/src/ramdump_client.c
+++ b/cp/ps/plat/src/oss/sup/src/ramdump_client.c
@@ -256,7 +256,7 @@
     ramdump_client_ram_conf[i_entry].vir   = ram_virt;
     ramdump_client_ram_conf[i_entry].flag  = ram_flag;
 
-    switch (ram_flag)
+    switch (ram_flag & RAMDUMP_CLEAR_PRIO_FLAG)
     {
         case RAMDUMP_FLAG_NEED_COPY:
             ramdump_client_ram_conf[i_entry].copy  = ram_extra;
@@ -329,7 +329,7 @@
         (unsigned long)ramdump_client_errno_log, 
         RAMDUMP_ERROR_LOG_SIZE,
         0,
-        0,
+        RAMDUMP_FLAG_LEVEL_MEDIUM,
         0);
     /* generate dump name prefix */
     memset(bin_name, 0, sizeof(bin_name));
@@ -343,7 +343,7 @@
         (unsigned long)ramdump_client_cmm_buf, 
         RAMDUMP_CMM_SIZE,
         0,
-        0,
+        RAMDUMP_FLAG_LEVEL_MEDIUM,
         0);
 
     OSS_PRINTF("Ramdump client init success!\n");
diff --git a/cp/ps/plat/src/oss/sup/src/ramdump_client_tos_adapt.c b/cp/ps/plat/src/oss/sup/src/ramdump_client_tos_adapt.c
old mode 100644
new mode 100755
index ecb44c5..07ff150
--- a/cp/ps/plat/src/oss/sup/src/ramdump_client_tos_adapt.c
+++ b/cp/ps/plat/src/oss/sup/src/ramdump_client_tos_adapt.c
@@ -120,7 +120,7 @@
             regionInfo->baseForSelf, 
             regionInfo->size,
             0,
-            RAMDUMP_FLAG_NEED_COPY,
+            RAMDUMP_FLAG_NEED_COPY|RAMDUMP_FLAG_LEVEL_MEDIUM,
             regionInfo->baseForCopy);
     else if (regionInfo->baseForServer != 0 &&
              regionInfo->baseForServer != regionInfo->baseForSelf)
@@ -129,7 +129,7 @@
             regionInfo->baseForSelf, 
             regionInfo->size,
             0,
-            RAMDUMP_FLAG_HAS_EXTERNAL,
+            RAMDUMP_FLAG_HAS_EXTERNAL|RAMDUMP_FLAG_LEVEL_MEDIUM,
             regionInfo->baseForServer);
     else
         ramdump_ram_conf_table_add(
@@ -137,7 +137,7 @@
             regionInfo->baseForSelf, 
             regionInfo->size,
             0,
-            RAMDUMP_FLAG_NONE,
+            RAMDUMP_FLAG_LEVEL_MEDIUM,
             0);
 }
 
diff --git a/cp/ps/plat/src/oss/sup/src/sup_nvm.c b/cp/ps/plat/src/oss/sup/src/sup_nvm.c
index 2bcd830..0eab97f 100755
--- a/cp/ps/plat/src/oss/sup/src/sup_nvm.c
+++ b/cp/ps/plat/src/oss/sup/src/sup_nvm.c
@@ -798,6 +798,40 @@
 }

 

 /**************************************************************************

+* º¯ÊýÃû³Æ£º Nvram_FsClear

+* ¹¦ÄÜÃèÊö£º Çå¿ÕÎļþ

+* ²ÎÊý˵Ã÷£º (IN)

+*            file_name: ÎļþÃû

+*            (OUT)

+* ·µ »Ø Öµ£º ³É¹¦·µ»ØZOSS_SUCCESS, ·ñÔò·µ»ØZOSS_ERROR

+* ÆäËü˵Ã÷£º 

+**************************************************************************/

+static UINT32 Nvram_FsClear(const CHAR *file_name)

+{

+	SINT32 ret = 0;

+	SINT32 fd = 0;

+	mm_segment_t old_fs = get_fs();;

+

+	if (file_name == NULL)

+		return ZOSS_ERROR;

+	

+	set_fs(KERNEL_DS);

+	fd = CPPS_KO_FUNC(sys_open)(file_name, O_SYNC | O_RDWR | O_CREAT | O_TRUNC, 0600);

+	if(fd < 0) 

+	{

+		printk("cpnv open %s fail,errno = %d\n", file_name, fd);

+		set_fs(old_fs);

+		return ZOSS_ERROR;

+	}

+	

+	CPPS_KO_FUNC(sys_fsync)(fd);

+	CPPS_KO_FUNC(sys_close)(fd);

+	set_fs(old_fs);

+	

+	return ZOSS_SUCCESS;

+}

+

+/**************************************************************************

 * º¯ÊýÃû³Æ£º Nvram_FsWrite

 * ¹¦ÄÜÃèÊö£º дNVÊý¾Ýµ½Îļþ

 * ²ÎÊý˵Ã÷£º (IN)

@@ -819,7 +853,7 @@
 		return ZOSS_ERROR;

 	

 	set_fs(KERNEL_DS);

-	fd = CPPS_KO_FUNC(sys_open)(part_name, O_SYNC | O_RDWR | O_CREAT , 0);

+	fd = CPPS_KO_FUNC(sys_open)(part_name, O_SYNC | O_RDWR | O_CREAT , 0600);

 	if(fd < 0) 

 	{

 		printk("cpnv open %s fail,errno = %d\n", part_name, fd);

@@ -911,7 +945,11 @@
 	if(!pBuf)

 		return ZOSS_ERROR;

 

-	ret = Nvram_FsWrite(pDstFile, 0, len, pBuf);

+	ret = Nvram_FsClear(pDstFile);

+	if (ret == ZOSS_SUCCESS)

+	{

+		ret = Nvram_FsWrite(pDstFile, 0, len, pBuf);

+	}

 

 	zOss_Free(pBuf);

 	

@@ -1044,7 +1082,7 @@
 	SINT32 fd  		= 0;

 	SINT32 ret 		= 0;

 

-	fd = CPPS_KO_FUNC(sys_open)(pFile, O_SYNC | O_RDWR | O_CREAT | O_TRUNC, 0);

+	fd = CPPS_KO_FUNC(sys_open)(pFile, O_SYNC | O_RDWR | O_CREAT | O_TRUNC, 0600);

 	if(fd < 0) 

 	{

 		printk("cpnv11 open %s fail,errno = %d\n", pFile, fd);

diff --git a/cp/ps/plat/src/oss/sup/src/sup_shell_thread.c b/cp/ps/plat/src/oss/sup/src/sup_shell_thread.c
index de1ef8b..56174f5 100755
--- a/cp/ps/plat/src/oss/sup/src/sup_shell_thread.c
+++ b/cp/ps/plat/src/oss/sup/src/sup_shell_thread.c
@@ -85,10 +85,10 @@
 static VOID Shell_ThreadSetFlagUse(const CHAR *cmd)

 {    

     zOss_AssertExN(cmd != NULL);

-    zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_NORMAL, "\tÓ÷¨:%s   m", cmd);

-    zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_NORMAL, "\tmȡֵ[0-1]");

-    zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_NORMAL, "\t m = 0±íʾ¹Ø±Õ¼Ç¼Ïß³Ìcpuʱ¼ä¿ª¹Ø");

-    zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_NORMAL, "\t m = 1±íʾ´ò¿ª¼Ç¼Ïß³Ìcpuʱ¼ä¿ª¹Ø");

+    zOss_Printf(SUBMDL_SCHE, PRINT_LEVEL_NORMAL, "\tÓ÷¨:%s   m", cmd);

+    zOss_Printf(SUBMDL_SCHE, PRINT_LEVEL_NORMAL, "\tmȡֵ[0-1]");

+    zOss_Printf(SUBMDL_SCHE, PRINT_LEVEL_NORMAL, "\t m = 0±íʾ¹Ø±Õ¼Ç¼Ïß³Ìcpuʱ¼ä¿ª¹Ø");

+    zOss_Printf(SUBMDL_SCHE, PRINT_LEVEL_NORMAL, "\t m = 1±íʾ´ò¿ª¼Ç¼Ïß³Ìcpuʱ¼ä¿ª¹Ø");

 }

 

 static VOID Shell_PrintSysCPU(VOID)

@@ -140,14 +140,14 @@
     

     if(NULL == gShell_UpdataCpuTimerId)

     {

-        zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_ABNORMAL, "\t¼Ç¼Ïß³ÌCPUʱ¼ä¿ª¹ØÎ´´ò¿ª£¬´Ë¹¦ÄܽûÓÃ");

+        zOss_Printf(SUBMDL_SCHE, PRINT_LEVEL_ABNORMAL, "\t¼Ç¼Ïß³ÌCPUʱ¼ä¿ª¹ØÎ´´ò¿ª£¬´Ë¹¦ÄܽûÓÃ");

         return;

     }

     

     ret = zOss_StopTimer(gShell_UpdataCpuTimerId);  /* ÏÈÍ£Ö¹¶¨Ê±Æ÷ */

     if(ZOSS_ERROR == ret)

     {

-        zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_ABNORMAL, "\tË¢ÐÂʱ¼äÉèÖÃʧ°Ü");

+        zOss_Printf(SUBMDL_SCHE, PRINT_LEVEL_ABNORMAL, "\tË¢ÐÂʱ¼äÉèÖÃʧ°Ü");

         return;

     }

     

@@ -156,11 +156,11 @@
     ret = zOss_StartTimer(gShell_UpdataCpuTimerId, freshTime, Shell_UpdateCpuTimerCallBack, 0); /* Æô¶¯¶¨Ê±Æ÷ */

     if(ZOSS_ERROR == ret)

     {

-        zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_ABNORMAL, "\tË¢ÐÂʱ¼äÉèÖÃʧ°Ü");

+        zOss_Printf(SUBMDL_SCHE, PRINT_LEVEL_ABNORMAL, "\tË¢ÐÂʱ¼äÉèÖÃʧ°Ü");

     }

     else

     {

-        zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_NORMAL, "\tË¢ÐÂʱ¼äÉèÖóɹ¦");

+        zOss_Printf(SUBMDL_SCHE, PRINT_LEVEL_NORMAL, "\tË¢ÐÂʱ¼äÉèÖóɹ¦");

     }

 }

 

@@ -425,7 +425,7 @@
     {

         zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_NORMAL, "\tÓ÷¨:%s   Ïß³ÌID [time]", CmdMsg->cmd);

         zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_NORMAL, "\tÏß³ÌID¿ÉÒÔ10½øÖÆÊýºÍ16½øÖÆÊý(ǰ׺0x»ò0X)");    

-        zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_NORMAL, "\t timeΪ¿ÉÑ¡ÏÉèÖÃÏÔʾµÄË¢ÐÂʱ¼ä(µ¥Î»:Ãë)£¬·¶Î§[2~10]£¬Èô²»´øtimeÔòֹͣˢÐÂ");

+        zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_NORMAL, "\t timeΪ¿ÉÑ¡ÏÉèÖÃÏÔʾµÄË¢ÐÂʱ¼ä(µ¥Î»:Ãë)£¬·¶Î§[1~10]£¬Èô²»´øtimeÔòֹͣˢÐÂ");

         return;

     }

     else if(1 == CmdMsg->paraCount || 2 == CmdMsg->paraCount)

@@ -463,7 +463,7 @@
             }

             

             freshTime = strtoul((char *)CmdMsg->para[1], (char **)NULL, 0);

-            if (freshTime < 2 || freshTime > 10)

+            if (freshTime < 1 || freshTime > 10)

             {

                 zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_ABNORMAL, "\t²ÎÊý´íÎó");

                 return;

@@ -501,16 +501,16 @@
     

     if (FALSE == gOsa_SwapTimeFlag)

     {

-        zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_ABNORMAL, "\t¼Ç¼Ïß³ÌCPUʱ¼ä¿ª¹ØÎ´´ò¿ª£¬´Ë¹¦ÄܽûÓÃ");

+        zOss_Printf(SUBMDL_SCHE, PRINT_LEVEL_ABNORMAL, "\t¼Ç¼Ïß³ÌCPUʱ¼ä¿ª¹ØÎ´´ò¿ª£¬´Ë¹¦ÄܽûÓÃ");

         return;

     }

     

     if (1 == CmdMsg->paraCount && 0 == strcmp((char *)CmdMsg->para[0], "help"))

     {

-        zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_NORMAL, "\tÓ÷¨:%s live/lazy/all time1 [time2]", CmdMsg->cmd);

-        zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_NORMAL, "\t live:Ö»ÏÔʾ»î¶¯µÄỊ̈߳¬lazy:Ö»ÏÔʾ²»»î¶¯µÄỊ̈߳¬all:ÏÔʾËùÓÐÏß³Ì");    

-        zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_NORMAL, "\t time1ÉèÖÃij¶Îʱ¼äÄÚÏß³ÌÖ´ÐÐÇé¿ö(µ¥Î»:Ãë)£¬·¶Î§[0~10](oseƽ̨Î޸ù¦ÄÜ,ÉèÖÃΪ0), 0±íʾȫ²¿Ê±¼äÄÚµÄÏß³ÌÖ´ÐÐÇé¿ö");

-        zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_NORMAL, "\t time2Ϊ¿ÉÑ¡ÏÉèÖÃÏÔʾµÄË¢ÐÂʱ¼ä(µ¥Î»:Ãë,µ±time1Ϊ0ʱÓÐЧ)£¬·¶Î§[2~10]£¬Èô²»´øtime2ÔòֹͣˢÐÂ");

+        zOss_Printf(SUBMDL_SCHE, PRINT_LEVEL_NORMAL, "\tÓ÷¨:%s live/lazy/all time1 [time2]", CmdMsg->cmd);

+        zOss_Printf(SUBMDL_SCHE, PRINT_LEVEL_NORMAL, "\t live:Ö»ÏÔʾ»î¶¯µÄỊ̈߳¬lazy:Ö»ÏÔʾ²»»î¶¯µÄỊ̈߳¬all:ÏÔʾËùÓÐÏß³Ì");    

+        zOss_Printf(SUBMDL_SCHE, PRINT_LEVEL_NORMAL, "\t time1ÉèÖÃij¶Îʱ¼äÄÚÏß³ÌÖ´ÐÐÇé¿ö(µ¥Î»:Ãë)£¬·¶Î§[0~10](oseƽ̨Î޸ù¦ÄÜ,ÉèÖÃΪ0), 0±íʾȫ²¿Ê±¼äÄÚµÄÏß³ÌÖ´ÐÐÇé¿ö");

+        zOss_Printf(SUBMDL_SCHE, PRINT_LEVEL_NORMAL, "\t time2Ϊ¿ÉÑ¡ÏÉèÖÃÏÔʾµÄË¢ÐÂʱ¼ä(µ¥Î»:Ãë,µ±time1Ϊ0ʱÓÐЧ)£¬·¶Î§[1~10]£¬Èô²»´øtime2ÔòֹͣˢÐÂ");

         return;

     }

     else if (2 == CmdMsg->paraCount || 3 == CmdMsg->paraCount)

@@ -529,13 +529,13 @@
         }

         else

         {

-            zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_ABNORMAL, "\t²ÎÊý´íÎó");

+            zOss_Printf(SUBMDL_SCHE, PRINT_LEVEL_ABNORMAL, "\t²ÎÊý´íÎó");

             return;

         }

         

         if (-1 == Shell_StrisNumber(CmdMsg->para[1]))

         {

-            zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_NORMAL, "\t²ÎÊý´íÎó");

+            zOss_Printf(SUBMDL_SCHE, PRINT_LEVEL_NORMAL, "\t²ÎÊý´íÎó");

             return;

         }                                     

         timeLen = strtoul((char *)CmdMsg->para[1], (char **)NULL, 0);

@@ -546,7 +546,7 @@
         }

         else if (0 != timeLen)

         {

-            zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_ABNORMAL, "\t²ÎÊý´íÎó");

+            zOss_Printf(SUBMDL_SCHE, PRINT_LEVEL_ABNORMAL, "\t²ÎÊý´íÎó");

             return;            

         }        

             

@@ -577,13 +577,13 @@
             

             if (0 != timeLen || -1 == Shell_StrisNumber(CmdMsg->para[2]))

             {

-                zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_NORMAL, "\t²ÎÊý´íÎó");

+                zOss_Printf(SUBMDL_SCHE, PRINT_LEVEL_NORMAL, "\t²ÎÊý´íÎó");

                 return;

             }                                     

             freshTime = strtoul((char *)CmdMsg->para[2], (char **)NULL, 0);

-            if (freshTime < 2 || freshTime > 10)

+            if (freshTime < 1 || freshTime > 10)

             {

-                zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_ABNORMAL, "\t²ÎÊý´íÎó");

+                zOss_Printf(SUBMDL_SCHE, PRINT_LEVEL_ABNORMAL, "\t²ÎÊý´íÎó");

                 return;

             }

             if (NULL != gShell_FreshCpuTimerId)

@@ -605,7 +605,7 @@
     }

     else

     {

-        zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_ABNORMAL, "\t²ÎÊý´íÎó");

+        zOss_Printf(SUBMDL_SCHE, PRINT_LEVEL_ABNORMAL, "\t²ÎÊý´íÎó");

     }      

 }

 

@@ -616,7 +616,7 @@
 

     if(FALSE == gOsa_SwapTimeFlag)

     {

-        zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_ABNORMAL, "\t¼Ç¼Ïß³ÌCPUʱ¼ä¿ª¹ØÎ´´ò¿ª£¬´Ë¹¦ÄܽûÓÃ");

+        zOss_Printf(SUBMDL_SCHE, PRINT_LEVEL_ABNORMAL, "\t¼Ç¼Ïß³ÌCPUʱ¼ä¿ª¹ØÎ´´ò¿ª£¬´Ë¹¦ÄܽûÓÃ");

         return;

     }

 

@@ -624,14 +624,14 @@
     {

         if (0 == strcmp((char *)CmdMsg->para[0], "help"))

         {

-            zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_NORMAL, "\tÓ÷¨:%s time", CmdMsg->cmd);

-            zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_NORMAL, "\t time:Ë¢ÐÂʱ¼äÒªÇóÔÚ[2-10]ÃëÖ®¼ä");    

+            zOss_Printf(SUBMDL_SCHE, PRINT_LEVEL_NORMAL, "\tÓ÷¨:%s time", CmdMsg->cmd);

+            zOss_Printf(SUBMDL_SCHE, PRINT_LEVEL_NORMAL, "\t time:Ë¢ÐÂʱ¼äÒªÇóÔÚ[1-10]ÃëÖ®¼ä");    

             return;

         }

         else if (0 == Shell_StrisNumber(CmdMsg->para[0]))

         {

             new_time = strtoul((char *)CmdMsg->para[0], NULL, 0);

-            if (new_time >= 2 && new_time <= 10)

+            if (new_time >= 1 && new_time <= 10)

             {

                 Shell_SetCpuUpdateTime(new_time);

                 return;

@@ -639,7 +639,7 @@
         }

     }

     

-    zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_ABNORMAL, "\tÊäÈëhelp²éѯÓ÷¨");

+    zOss_Printf(SUBMDL_SCHE, PRINT_LEVEL_ABNORMAL, "\tÊäÈëhelp²éѯÓ÷¨");

 

 }

 

@@ -688,18 +688,18 @@
         gShell_UpdataCpuTimerId = zOss_CreateTimer("Shell_UpdateCpuTimer", Shell_UpdateCpuTimerCallBack, 0, TRUE);

         if (NULL == gShell_UpdataCpuTimerId)

         {

-            zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_ABNORMAL, "\t´ò¿ª¼Ç¼Ïß³Ìcpuʱ¼ä¿ª¹ØÊ§°Ü");

+            zOss_Printf(SUBMDL_SCHE, PRINT_LEVEL_ABNORMAL, "\t´ò¿ª¼Ç¼Ïß³Ìcpuʱ¼ä¿ª¹ØÊ§°Ü");

             return;

         }

         if (ZOSS_ERROR == zOss_StartTimer(gShell_UpdataCpuTimerId, freshTime, Shell_UpdateCpuTimerCallBack, 0))

         {

             zOss_KillTimer(gShell_UpdataCpuTimerId);

             gShell_UpdataCpuTimerId = NULL;

-            zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_ABNORMAL, "\t´ò¿ª¼Ç¼Ïß³Ìcpuʱ¼ä¿ª¹ØÊ§°Ü");

+            zOss_Printf(SUBMDL_SCHE, PRINT_LEVEL_ABNORMAL, "\t´ò¿ª¼Ç¼Ïß³Ìcpuʱ¼ä¿ª¹ØÊ§°Ü");

         }

         else

         {

-            zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_NORMAL, "\t³É¹¦´ò¿ª¼Ç¼Ïß³Ìcpuʱ¼ä¿ª¹Ø");

+            zOss_Printf(SUBMDL_SCHE, PRINT_LEVEL_NORMAL, "\t³É¹¦´ò¿ª¼Ç¼Ïß³Ìcpuʱ¼ä¿ª¹Ø");

         }

         

     }

@@ -767,7 +767,7 @@
         }

         zOss_Free(taskIdArray);

 #endif

-        zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_NORMAL, "\t³É¹¦¹Ø±Õ¼Ç¼Ïß³Ìcpuʱ¼ä¿ª¹Ø");

+        zOss_Printf(SUBMDL_SCHE, PRINT_LEVEL_NORMAL, "\t³É¹¦¹Ø±Õ¼Ç¼Ïß³Ìcpuʱ¼ä¿ª¹Ø");

     }

 }

 

@@ -801,7 +801,7 @@
             if (0 == strcmp((char *)CmdMsg->para[0], "help"))

             {

                 zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_NORMAL, "\tÓ÷¨:%s [time]", CmdMsg->cmd);

-                zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_NORMAL, "\t timeΪ¿ÉÑ¡ÏÉèÖÃÏÔʾµÄË¢ÐÂʱ¼ä(µ¥Î»:Ãë)£¬·¶Î§[2~10]£¬Èô²»´øtimeÔòֹͣˢÐÂ");

+                zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_NORMAL, "\t timeΪ¿ÉÑ¡ÏÉèÖÃÏÔʾµÄË¢ÐÂʱ¼ä(µ¥Î»:Ãë)£¬·¶Î§[1~10]£¬Èô²»´øtimeÔòֹͣˢÐÂ");

                 break;

             }

 

@@ -811,7 +811,7 @@
                 break;

             }

             freshTime = strtoul((char *)CmdMsg->para[0], (char **)NULL, 0);

-            if (freshTime < 2 || freshTime > 10)

+            if (freshTime < 1 || freshTime > 10)

             {

                 zOss_Printf(SUBMDL_TEST, PRINT_LEVEL_ABNORMAL, "\t²ÎÊý´íÎó");

                 break;