blob: da3b99d0fc1bce8b9c78e7bb87cdf30e30185068 [file] [log] [blame]
/*****************************************************************************
* Copyright Statement:
* --------------------
* This software is protected by Copyright and the information contained
* herein is confidential. The software may not be copied and the information
* contained herein may not be used or disclosed except with the written
* permission of MediaTek Inc. (C) 2005
*
* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
*
* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
*
* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
*
*****************************************************************************/
/*****************************************************************************
*
* Filename:
* ---------
* nvram_data_items.c
*
* Project:
* --------
* MAUI
*
* Description:
* ------------
* This file contains `vendor' defined logical data items stored in NVRAM.
* These logical data items are used in object code of Protocol Stack software.
*
* As for customizable logical data items, they are defined in nvram_user_config.c
*
* Author:
* -------
* -------
* -------
*
*============================================================================
* HISTORY
* Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*------------------------------------------------------------------------------
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
*
* removed!
* removed!
*
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
*
* removed!
* removed!
*
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
*
* removed!
* removed!
*
* removed!
*
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
*
* removed!
* removed!
*
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
* removed!
*
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
*
* removed!
* removed!
*
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
*------------------------------------------------------------------------------
* Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*============================================================================
****************************************************************************/
#ifndef NVRAM_NOT_PRESENT
#ifdef __AST_TL1_TDD__
#define __AST_TL1_TDD_RF_PARAMETER_DEFINE__
#define __3G_TDD_DRDI_DEFINE__
#endif // __AST_TL1_TDD__
#ifdef NVRAM_AUTO_GEN
#include "nvram_auto_gen.h"
#endif
#include "kal_general_types.h"
#include "kal_public_defs.h" //MSBB change #include "stack_config.h"
#include "kal_public_defs.h" //MSBB change #include "stack_common.h"
#include "nvram_defs.h"
#include "nvram_enums.h"
#include "nvram_data_items.h"
#include "nvram_group_def.h" //add for break group files from header file
#include "nvram_editor_data_item.h"
#include "nvram_group_editor.h" //add for break group files from header file
#include "custom_nvram_config.h"
#include "custom_nvram_sec.h"
#include "custom_nvram_restore.h"
#include "custom_nvram_config.h"
#if defined(__NVRAM_COMPRESS_SUPPORT__) && !defined(NVRAM_AUTO_GEN)
#include "nvram_default_value.h"
#endif
#if defined(__CUSTOMIZED_PORT_SETTING__) && !defined(NVRAM_AUTO_GEN)
#include "custom_port_setting.h"
#endif
#include "tst.h"
#if defined(__UMTS_RAT__) && defined(__MTK_UL1_FDD__)
#include "ul1cal.h"
#endif /* __UMTS_RAT__ && __MTK_UL1_FDD__ */
#ifdef __AST_TL1_TDD__
#include "tl1cal_ast.h"
#include "t12193.h"
#include "tl1d_custom_drdi.h"
#endif // __AST_TL1_TDD__
#include "l1cal.h"
#if defined(__WIFI_SUPPORT__)
#include "wndrv_cal.h"
#endif
#include "el1d_rf_cid.h"
#include "dcl.h"
#include "custom_gprs_pdp_default_qos_config.h"
#if(defined(ISP_SUPPORT))
#include "drv_sw_features_isp.h"
#include "camera_tuning_para.h"
#endif
#include "nvram_default_audio.h" /* NVRAM_EF_CUST_ACOUSTIC_DATA_SIZE */
#ifdef __GAIN_TABLE_SUPPORT__
#include "gain_table.h"
#endif /* __GAIN_TABLE_SUPPORT__ */
#include "adc_channel.h"
/**
* Steps of defining logical data item:
* 1> Define LID of new logical data item into `nvram_lid_core_enum' in
* nvram_data_items.h
* 2> Define two constants: SIZE and TOTAL, in nvram_data_items.h
* 3> Define default value of that new logical data item.
* 4> Define attributes of that new logical data item into
* `logical_data_item_table_core'
* 5> Change NVRAM_TOTAL_LID_VENDOR in nvram_user_defs.h
* 6> Add structure defination in nvram_editor_data_item.h
* 7> Add bit-level description in nvram_editor_data_item.h
* 8> Change version number CODED_DATA_VERSION in nvram_user_config.c
*
* Note that multiple copied attribute DOES NOT support for
* near fixed logical data items.
*/
/**
* Step 3:
* Define necessary default values for each logical data item.
*/
kal_uint8 const NVRAM_EF_ZERO_DEFAULT[] = { 0x00 };
kal_uint8 const NVRAM_EF_FF_DEFAULT[] = { 0xFF };
kal_uint8 const NVRAM_EF_SPECIAL_DEFAULT[] = { 0x55 };
#ifdef __NVRAM_CRYPT_TEST__
kal_uint32 bWriteMsp = 0;
kal_uint32 bReadMsp = 0;
/* should keep data number is equal to array size
should define NVRAM_EF_NVRAM_MSP_TEST_TOTAL = 1 */
static kal_uint8 const NVRAM_EF_MSP_TEST_DEFAULT[] =
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,
16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
};
#endif
static kal_uint8 NVRAM_EF_CORE_FACTORY_RESET_AND_OTA_DEFAULT[] =
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,
16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,
32,33
};
#ifdef __NV_CHKSUM_ENHANCE__
extern void nvram_lid_chksum_algrthm_config_value(nvram_lid_enum file_id, kal_uint8 *buffer, kal_uint16 buffer_size);
#endif
/**
* Step 4:
* The logical data item table.
* Note:
* Each logical data item must be:
* 1> Size must be EVEN
* 2> Size of default value must be equal to the logical data item's size.
*
* The last LID in the MT reign now is MT1k
*/
ltable_entry_struct logical_data_item_table_core[] =
{
{
NVRAM_EF_SYS_CACHE_OCTET_LID,
NVRAM_EF_SYS_CACHE_OCTET_TOTAL,
NVRAM_EF_SYS_CACHE_OCTET_SIZE,
NVRAM_NORMAL_NOT_GEN(NVRAM_EF_SYS_CACHE_OCTET_DEFAULT),
NVRAM_CATEGORY_USER,
NVRAM_ATTR_MULTI_DEFAULT,
"MT6K",
VER(NVRAM_EF_SYS_CACHE_OCTET_LID)
},
#ifdef __NVRAM_CRYPT_TEST__
{
NVRAM_EF_NVRAM_MSP_TEST_LID,
NVRAM_EF_NVRAM_MSP_TEST_TOTAL,
NVRAM_EF_NVRAM_MSP_TEST_SIZE,
NVRAM_NORMAL(NVRAM_EF_MSP_TEST_DEFAULT),
NVRAM_CATEGORY_USER,
NVRAM_ATTR_AVERAGE | NVRAM_ATTR_CONFIDENTIAL | NVRAM_ATTR_GEN_DEFAULT
#ifdef __NVRAM_BIND_TO_CHIP_CIPHER__
| NVRAM_ATTR_MSP | NVRAM_ATTR_MULTIPLE
#endif
,
"MT0T",
VER(NVRAM_EF_NVRAM_MSP_TEST_LID)
},
#endif
{
NVRAM_EF_CORE_FACTORY_RESET_AND_OTA_LID,
NVRAM_EF_CORE_FACTORY_RESET_AND_OTA_TOTAL,
NVRAM_EF_CORE_FACTORY_RESET_AND_OTA_SIZE,
NVRAM_NORMAL(NVRAM_EF_CORE_FACTORY_RESET_AND_OTA_DEFAULT),
#if (defined(__SMART_PHONE_MODEM__) || defined(__CCCIFS_SUPPORT__))
NVRAM_CATEGORY_IMPORTANT_L4,
#else
NVRAM_CATEGORY_USER,
#endif
NVRAM_ATTR_AVERAGE | NVRAM_ATTR_GEN_DEFAULT
#if defined (__CCCIFS_SUPPORT__)
| NVRAM_ATTR_COMMITTED
#endif
,
"MTFW",
VER(NVRAM_EF_CORE_FACTORY_RESET_AND_OTA_LID)
},
#ifdef __NV_CHKSUM_ENHANCE__
{
NVRAM_EF_CORE_CHKSUM_INFO_LID,
NVRAM_EF_CORE_CHKSUM_INFO_TOTAL,
NVRAM_EF_CORE_CHKSUM_INFO_SIZE,
NVRAM_DEFAULT_FUNC(nvram_lid_chksum_algrthm_config_value),
#if (defined(__SMART_PHONE_MODEM__) || defined(__CCCIFS_SUPPORT__))
NVRAM_CATEGORY_IMPORTANT_L4 | NVRAM_CATEGORY_FUNC_DEFAULT,
#else
NVRAM_CATEGORY_USER | NVRAM_CATEGORY_FUNC_DEFAULT,
#endif
NVRAM_ATTR_AVERAGE | NVRAM_ATTR_GEN_DEFAULT | NVRAM_ATTR_CONFIDENTIAL | NVRAM_ATTR_MULTIPLE
#ifdef __NVRAM_BIND_TO_CHIP_CIPHER__
| NVRAM_ATTR_MSP
#endif
#if defined (__CCCIFS_SUPPORT__)
| NVRAM_ATTR_COMMITTED
#endif
,
"MTCS",
VER(NVRAM_EF_CORE_CHKSUM_INFO_LID)
},
#endif
{
NVRAM_EF_CORE_INTERNAL_CLONE_LID,
NVRAM_EF_CORE_INTERNAL_CLONE_TOTAL,
NVRAM_EF_CORE_INTERNAL_CLONE_SIZE,
NVRAM_NORMAL(NVRAM_EF_ZERO_DEFAULT),
NVRAM_CATEGORY_USER,
NVRAM_ATTR_AVERAGE,
"MTTP",
VER(NVRAM_EF_CORE_INTERNAL_CLONE_LID)
},
#ifdef __NV_CHKSUM_ENHANCE__
{
NVRAM_EF_CORE_BNRG_CHKSUM_ALGRTHM_LID,
NVRAM_EF_CORE_BNRG_CHKSUM_ALGRTHM_TOTAL,
NVRAM_EF_CORE_BNRG_CHKSUM_ALGRTHM_SIZE,
NVRAM_DEFAULT_FUNC(nvram_lid_chksum_algrthm_config_value),
#if (defined(__SMART_PHONE_MODEM__) || defined(__CCCIFS_SUPPORT__))
NVRAM_CATEGORY_IMPORTANT | NVRAM_CATEGORY_FUNC_DEFAULT,
#else
NVRAM_CATEGORY_USER | NVRAM_CATEGORY_FUNC_DEFAULT,
#endif
NVRAM_ATTR_AVERAGE | NVRAM_ATTR_GEN_DEFAULT | NVRAM_ATTR_CONFIDENTIAL
#ifdef __NVRAM_BIND_TO_CHIP_CIPHER__
| NVRAM_ATTR_MSP
#endif
#if defined (__CCCIFS_SUPPORT__)
| NVRAM_ATTR_COMMITTED
#endif
,
"MTCA",
VER(NVRAM_EF_CORE_BNRG_CHKSUM_ALGRTHM_LID)
},
#endif
};
/* Configure NVRAM_EF_SYS_CACHE_OCTET_LID begin */
#ifdef NVRAM_AUTO_GEN
nvram_sys_cache_entry nvram_sys_cache[] =
{
SYS_CACHE_ENTRY(NVRAM_SYS_CACHE_BEGIN,
NVRAM_APP_RESERVED,
KAL_FALSE,
"Record system cache will be restore or not",
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
SYS_CACHE_ENTRY(NVRAM_SYS_FLIGHTMODE_STATE,
NVRAM_APP_RESERVED,
KAL_TRUE,
"NVRAM_SYS_FLIGHTMODE_STATE",
#if (GEMINI_PLUS == 4)
0x00, 0x00, 0x0F, 0x00, 0x01, 0x0A, 0x00, 0x00),
#elif (GEMINI_PLUS == 3)
0x00, 0x00, 0x07, 0x00, 0x01, 0x0A, 0x00, 0x00),
#elif (GEMINI_PLUS == 2)
0x00, 0x00, 0x03, 0x00, 0x01, 0x0A, 0x00, 0x00),
#else
0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x00, 0x00),
#endif
SYS_CACHE_ENTRY(NVRAM_SYS_DSP_PATCH,
NVRAM_APP_RESERVED,
KAL_FALSE,
"NVRAM_SYS_DSP_PATCH",
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
SYS_CACHE_ENTRY(NVRAM_SYS_SIM_PLUS_SETTING,
NVRAM_APP_RESERVED,
KAL_TRUE,
"NVRAM_SYS_SIM_PLUS_SETTING",
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
SYS_CACHE_ENTRY(NVRAM_SYS_FIXED_GAIN_MECH_FOR_HELIOS2,
NVRAM_APP_RESERVED,
KAL_FALSE,
"NVRAM_SYS_FIXED_GAIN_MECH_FOR_HELIOS2",
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
SYS_CACHE_ENTRY(NVRAM_SYS_FACTORY_FLAG,
NVRAM_APP_RESERVED,
KAL_TRUE,
"NVRAM_SYS_FACTORY_FLAG",
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
SYS_CACHE_ENTRY(NVRAM_SYS_LAST_FAT_STATUS,
NVRAM_APP_RESERVED,
KAL_TRUE,
"NVRAM_SYS_LAST_FAT_STATUS",
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
SYS_CACHE_ENTRY(NVRAM_SYS_INFO,
NVRAM_APP_RESERVED,
KAL_FALSE,
"NVRAM_SYS_INFO",
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
#if defined(NEPTUNE_MMI)
SYS_CACHE_ENTRY(NVRAM_SYS_PHB_COMPARE_DIGIT,
NVRAM_APP_RESERVED,
KAL_FALSE,
"NVRAM_SYS_PHB_COMPARE_DIGIT",
0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
#else
SYS_CACHE_ENTRY(NVRAM_SYS_PHB_COMPARE_DIGIT,
NVRAM_APP_RESERVED,
KAL_FALSE,
"NVRAM_SYS_PHB_COMPARE_DIGIT",
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
#endif
SYS_CACHE_ENTRY(NVRAM_SYS_SVN,
NVRAM_APP_RESERVED,
KAL_FALSE,
"NVRAM_SYS_SVN",
0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
SYS_CACHE_ENTRY(NVRAM_SYS_USB_BOOT_MODE,
NVRAM_APP_RESERVED,
KAL_FALSE,
"NVRAM_SYS_USB_BOOT_MODE\0",
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
SYS_CACHE_ENTRY(NVRAM_SYS_USB_TETHERING_MODE,
NVRAM_APP_RESERVED,
KAL_FALSE,
"NVRAM_SYS_USB_TETHERING_MODE\0",
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
SYS_CACHE_ENTRY(NVRAM_SYS_AUTO_TEST,
NVRAM_APP_RESERVED,
KAL_FALSE,
"NVRAM_SYS_AUTO_TEST\0",
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
SYS_CACHE_ENTRY(NVRAM_SYS_MINI_LOG_IDX,
NVRAM_APP_RESERVED,
KAL_FALSE,
"NVRAM_SYS_MINI_LOG_IDX\0",
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
SYS_CACHE_ENTRY(NVRAM_SYS_SWLA,
NVRAM_APP_RESERVED,
KAL_FALSE,
"NVRAM_SYS_SWLA\0",
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
SYS_CACHE_ENTRY(NVRAM_SYS_NVRAM_INIT_TIME_UT,
NVRAM_APP_RESERVED,
KAL_FALSE,
"NVRAM_SYS_NVRAM_INIT_TIME_UT\0",
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
SYS_CACHE_ENTRY(NVRAM_SYS_NVRAM_INIT_TIME_UT2,
NVRAM_APP_RESERVED,
KAL_FALSE,
"NVRAM_SYS_NVRAM_INIT_TIME_UT2\0",
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
/* !!Add a entry above this line by using SYS_CACHE_ENTRY macro */
SYS_CACHE_ENTRY(NVRAM_SYS_CACHE_MAX,
NVRAM_APP_RESERVED,
KAL_FALSE,
"The last record of system cache",
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
SYS_CACHE_ENTRY(NVRAM_SYS_CACHE_BEGIN,
NVRAM_APP_RESERVED,
KAL_FALSE,
"Record system cache will be restore or not",
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
SYS_CACHE_ENTRY(NVRAM_SYS_FLIGHTMODE_STATE,
NVRAM_APP_RESERVED,
KAL_TRUE,
"NVRAM_SYS_FLIGHTMODE_STATE",
#if (GEMINI_PLUS == 4)
0x00, 0x00, 0x0F, 0x00, 0x01, 0x0A, 0x00, 0x00),
#elif (GEMINI_PLUS == 3)
0x00, 0x00, 0x07, 0x00, 0x01, 0x0A, 0x00, 0x00),
#elif (GEMINI_PLUS == 2)
0x00, 0x00, 0x03, 0x00, 0x01, 0x0A, 0x00, 0x00),
#else
0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x00, 0x00),
#endif
SYS_CACHE_ENTRY(NVRAM_SYS_DSP_PATCH,
NVRAM_APP_RESERVED,
KAL_FALSE,
"NVRAM_SYS_DSP_PATCH",
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
SYS_CACHE_ENTRY(NVRAM_SYS_SIM_PLUS_SETTING,
NVRAM_APP_RESERVED,
KAL_TRUE,
"NVRAM_SYS_SIM_PLUS_SETTING",
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
SYS_CACHE_ENTRY(NVRAM_SYS_FIXED_GAIN_MECH_FOR_HELIOS2,
NVRAM_APP_RESERVED,
KAL_FALSE,
"NVRAM_SYS_FIXED_GAIN_MECH_FOR_HELIOS2",
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
SYS_CACHE_ENTRY(NVRAM_SYS_FACTORY_FLAG,
NVRAM_APP_RESERVED,
KAL_TRUE,
"NVRAM_SYS_FACTORY_FLAG",
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
SYS_CACHE_ENTRY(NVRAM_SYS_LAST_FAT_STATUS,
NVRAM_APP_RESERVED,
KAL_TRUE,
"NVRAM_SYS_LAST_FAT_STATUS",
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
SYS_CACHE_ENTRY(NVRAM_SYS_INFO,
NVRAM_APP_RESERVED,
KAL_FALSE,
"NVRAM_SYS_INFO",
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
#if defined(NEPTUNE_MMI)
SYS_CACHE_ENTRY(NVRAM_SYS_PHB_COMPARE_DIGIT,
NVRAM_APP_RESERVED,
KAL_FALSE,
"NVRAM_SYS_PHB_COMPARE_DIGIT",
0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
#else
SYS_CACHE_ENTRY(NVRAM_SYS_PHB_COMPARE_DIGIT,
NVRAM_APP_RESERVED,
KAL_FALSE,
"NVRAM_SYS_PHB_COMPARE_DIGIT",
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
#endif
SYS_CACHE_ENTRY(NVRAM_SYS_SVN,
NVRAM_APP_RESERVED,
KAL_FALSE,
"NVRAM_SYS_SVN",
0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
SYS_CACHE_ENTRY(NVRAM_SYS_USB_BOOT_MODE,
NVRAM_APP_RESERVED,
KAL_FALSE,
"NVRAM_SYS_USB_BOOT_MODE\0",
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
SYS_CACHE_ENTRY(NVRAM_SYS_USB_TETHERING_MODE,
NVRAM_APP_RESERVED,
KAL_FALSE,
"NVRAM_SYS_USB_TETHERING_MODE\0",
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
SYS_CACHE_ENTRY(NVRAM_SYS_AUTO_TEST,
NVRAM_APP_RESERVED,
KAL_FALSE,
"NVRAM_SYS_AUTO_TEST\0",
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
SYS_CACHE_ENTRY(NVRAM_SYS_MINI_LOG_IDX,
NVRAM_APP_RESERVED,
KAL_FALSE,
"NVRAM_SYS_MINI_LOG_IDX\0",
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
SYS_CACHE_ENTRY(NVRAM_SYS_SWLA,
NVRAM_APP_RESERVED,
KAL_FALSE,
"NVRAM_SYS_SWLA\0",
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
/* !!Add a entry above this line by using SYS_CACHE_ENTRY macro */
SYS_CACHE_ENTRY(NVRAM_SYS_CACHE_MAX,
NVRAM_APP_RESERVED,
KAL_FALSE,
"The last record of system cache",
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
};
kal_uint16 nvram_sys_cache_length = sizeof(nvram_sys_cache);
#endif
/* Configure NVRAM_EF_SYS_CACHE_OCTET_LID end */
#endif /* NVRAM_NOT_PRESENT */