blob: 1a6a81d01b691250d07f5114a4fe279d6068641d [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.h
*
* Project:
* --------
* Maui
*
* Description:
* ------------
* This file defines 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_defs.h
*
* 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!
*
* 07 04 2016 ming-chien.hung
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* 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_DATA_ITEMS_H
#define NVRAM_DATA_ITEMS_H
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
#include "nvram_defs.h"
#ifdef GEN_FOR_PC //add for break group files from header file
#include "nvram_group_def.h"
#endif
#include "custom_nvram_sec.h" /* nvram_sml_context_struct */
/*
current keep enum value scope start LID
======================================================================================
2G 22 30 15 ~ 44 NVRAM_EF_L1_START
3G 21 21 45 ~ 65 NVRAM_EF_UL1_START
ADC 1 1 66 NVRAM_EF_ADC_LID
WIFI 7 7 67 ~ 73 NVRAM_EF_WNDRV_START
BT 8 11 74 ~ 84 NVRAM_EF_BTRADIO_RFMD3500_LID
TD 12 12 85 ~ 96 NVRAM_EF_AST_TL1_START
Other ~ 120 Reserver for calibration data in the future
*/
/**
* Step 1: (See comment of nvram_data_item.c for detail).
* Vendor defined logical data item ID's.
* These logical data items are used in object code of Protocol Stack software.
*
*/
typedef enum
{
/* System record, keep the system version */
NVRAM_EF_SYS_LID = NVRAM_LID_GRP_INTERNAL(0),
/* Branch record, keep the branch version */
NVRAM_EF_BRANCH_VERNO_LID = NVRAM_LID_GRP_INTERNAL(1),
/* Flavor record, keep the flavor version */
NVRAM_EF_FLAVOR_VERNO_LID = NVRAM_LID_GRP_INTERNAL(2),
/* Build-time record, keep the load build time */
NVRAM_EF_BUILD_TIME_LID = NVRAM_LID_GRP_INTERNAL(3),
/* CustPack record, keep the custpack version */
NVRAM_EF_CUSTPACK_VERNO_LID = NVRAM_LID_GRP_INTERNAL(4),
/* SecuPack record, keep the secupack version */
NVRAM_EF_SECUPACK_VERNO_LID = NVRAM_LID_GRP_INTERNAL(5),
/* Security setting in NVRAM */
NVRAM_EF_NVRAM_LOCK_LID = NVRAM_LID_GRP_INTERNAL(6),
/* For __NVRAM_READ_RESERVED_FILE__ feature */
NVRAM_EF_READ_RESERVED_LID = NVRAM_LID_GRP_INTERNAL(7),
NVRAM_EF_NVRAM_SEC_CHECK_LID = NVRAM_LID_GRP_INTERNAL(8),
NVRAM_EF_CHKSUM_RESET_REC_LID = NVRAM_LID_GRP_INTERNAL(9),
/* Don't remove this line: insert LID definition above */
NVRAM_EF_NVRAM_UNIT_TEST_LID = NVRAM_LID_GRP_INTERNAL(16),
NVRAM_EF_NVRAM_TEST_1_LID = NVRAM_LID_GRP_INTERNAL(17),
NVRAM_EF_NVRAM_TEST_2_LID = NVRAM_LID_GRP_INTERNAL(18),
NVRAM_EF_NVRAM_TEST_3_LID = NVRAM_LID_GRP_INTERNAL(19),
NVRAM_EF_NVRAM_TEST_4_LID = NVRAM_LID_GRP_INTERNAL(20),
NVRAM_EF_NVRAM_TEST_5_LID = NVRAM_LID_GRP_INTERNAL(21),
NVRAM_EF_NVRAM_TEST_6_LID = NVRAM_LID_GRP_INTERNAL(22),
NVRAM_EF_NVRAM_TEST_7_LID = NVRAM_LID_GRP_INTERNAL(23),
NVRAM_EF_NVRAM_TEST_8_LID = NVRAM_LID_GRP_INTERNAL(24),
NVRAM_EF_NVRAM_TEST_9_LID = NVRAM_LID_GRP_INTERNAL(25),
NVRAM_EF_NVRAM_TEST_10_LID = NVRAM_LID_GRP_INTERNAL(26),
NVRAM_EF_NVRAM_TEST_11_LID = NVRAM_LID_GRP_INTERNAL(27),
NVRAM_EF_NVRAM_TEST_12_LID = NVRAM_LID_GRP_INTERNAL(28),
NVRAM_EF_INTERNAL_13_LID = NVRAM_LID_GRP_INTERNAL(29),
NVRAM_EF_INTERNAL_TEST_14_LID = NVRAM_LID_GRP_INTERNAL(30),
NVRAM_EF_INTERNAL_TEST_15_LID = NVRAM_LID_GRP_INTERNAL(31),
NVRAM_EF_INTERNAL_TEST_16_LID = NVRAM_LID_GRP_INTERNAL(32),
NVRAM_EF_INTERNAL_TEST_17_LID = NVRAM_LID_GRP_INTERNAL(33),
NVRAM_EF_NVRAM_UNIT_TEST_LID_END = NVRAM_LID_GRP_INTERNAL(34),
NVRAM_EF_LAST_LID_CORE = NVRAM_LID_GRP_INTERNAL(255),
//Core Group
NVRAM_EF_START = NVRAM_LID_GRP_CORE(0),
NVRAM_EF_SYS_CACHE_OCTET_LID = NVRAM_EF_START,
NVRAM_EF_IMPT_COUNTER_LID = NVRAM_EF_START, //9
NVRAM_EF_NVRAM_MSP_TEST_LID = NVRAM_LID_GRP_CORE(1),
NVRAM_EF_CORE_FACTORY_RESET_AND_OTA_LID = NVRAM_LID_GRP_CORE(2),
NVRAM_EF_CORE_CHKSUM_INFO_LID = NVRAM_LID_GRP_CORE(3),
NVRAM_EF_CORE_INTERNAL_CLONE_LID = NVRAM_LID_GRP_CORE(4),
NVRAM_EF_CORE_BNRG_CHKSUM_ALGRTHM_LID = NVRAM_LID_GRP_CORE(5),
NVRAM_EF_CORE_LAST_LID = NVRAM_LID_GRP_CORE(255)
} nvram_lid_internal_enum;
/* check ENUM total number */
//typedef unsigned int nvram_lid_core_enum_check[256*4 -(NVRAM_EF_LAST_LID_CORE - NVRAM_EF_SYS_LID + 1)];
/* MS unique ID */
//#define UNI_ID NVRAM_EF_IMEI_IMEISV_LID
/**
* Step 2:
* Defines constants of size and number of records for each logical data item.
* For linear-fixed, TOTAL is greater than 1, and SIZE is size of each record;
* for transparent, TOTAL must be exaclty 1, and SIZE is size of entire data item.
*
* 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.
*
* Notice:
* If total number of L1 Calibration data items is changed, NVRAM_L1CAL_ELEMENT_TOTAL
* must be modified properly.
*/
/** System record:
* [ DATA_VERSION ][ PADDING ][ LOCK_PATTERN ]
* 18 bytes 4 bytes 12 bytes
* Size must be
* strlen(CODED_DATA_VERSION) + strlen(CODED_PADDING_LENGTH) + strlen(NVRAM_LOCK_PATTERN)
* And must be even-byte aligned.
*
* System record is two-copied. It is controlled directly by NVRAM Layer itself.
* Ie, their record ID's are: 1 and 2.
*/
#define CODED_DATA_VERSION_SIZE 32 //18
#define CODED_PADDING_SIZE 2
#define CODED_LOCK_PATTERN_SIZE 16 //need 16b align
#define NVRAM_EF_IMPT_COUNTER_SIZE 2
#define NVRAM_EF_IMPT_COUNTER_TOTAL 1
/* MM NVRAM Re-structure End */
/*----------------------------------------------------------------------------*/
/* Audio NVRAM info above */
/*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*/
/* NVRAM test info */
/*----------------------------------------------------------------------------*/
#ifdef __NVRAM_CRYPT_TEST__
#define NVRAM_MSP_TEST_LEN 32
typedef struct
{
kal_uint8 data[NVRAM_MSP_TEST_LEN];
} nvram_ef_nvram_msp_test_struct;
#define NVRAM_EF_NVRAM_MSP_TEST_SIZE sizeof(nvram_ef_nvram_msp_test_struct)
#define NVRAM_EF_NVRAM_MSP_TEST_TOTAL 1
#endif
#define NVRAM_SEC_CHECK_LEN 32
typedef struct
{
kal_uint8 data[NVRAM_SEC_CHECK_LEN];
} nvram_ef_nvram_security_check_struct;
#define NVRAM_EF_NVRAM_SEC_CHECK_SIZE sizeof(nvram_ef_nvram_security_check_struct)
#define NVRAM_EF_NVRAM_SEC_CHECK_TOTAL 2
#define NVRAM_EF_NVRAM_UNIT_TEST_SIZE sizeof(nvram_ef_nvram_unit_test_struct)
#define NVRAM_EF_NVRAM_UNIT_TEST_TOTAL 5
/*
NVRAM_EF_CORE_FACTORY_RESET_AND_OTA_SIZE must equal NVRAM_EF_SYS_SIZE
If modify the NVRAM_EF_SYS_SIZE,must modify NVRAM_EF_CORE_FACTORY_RESET_AND_OTA_SIZE
*/
#define NVRAM_EF_CORE_FACTORY_RESET_AND_OTA_SIZE 34
#define NVRAM_EF_CORE_FACTORY_RESET_AND_OTA_TOTAL 1
/*NVRAM checksum algorithm information LID*/
/*typedef struct
{
kal_uint32 chksum_enhance_algrthm_type;
kal_uint32 chksum_enhance_algrthm_length;
kal_uint32 chksum_default_algrthm_type;
kal_uint32 chksum_default_algrthm_length;
}nvram_chksum_algorithm_struct;
*/
typedef struct
{
kal_uint32 en_algo_length;
kal_uint32 en_algo_type;
kal_uint32 def_algo_length;
kal_uint32 def_algo_type;
} nvram_algo_struct;
#ifdef __NV_CHKSUM_ENHANCE__
#define NVRAM_EF_CORE_CHKSUM_INFO_SIZE sizeof(nvram_algo_struct)
#define NVRAM_EF_CORE_CHKSUM_INFO_TOTAL 1
#define NVRAM_EF_CORE_BNRG_CHKSUM_ALGRTHM_SIZE sizeof(nvram_algo_struct)
#define NVRAM_EF_CORE_BNRG_CHKSUM_ALGRTHM_TOTAL 1
#endif
#define NVRAM_EF_CORE_INTERNAL_CLONE_SIZE 1
#define NVRAM_EF_CORE_INTERNAL_CLONE_TOTAL 1
/*----------------------------------------------------------------------------*/
/* camera NVRAM info end */
/*----------------------------------------------------------------------------*/
/**
* System Cache OCTET : This is a special NVRAM data item used for storage purpose.
* Please note that the default value is ALWAYS 0x00
*/
#define NVRAM_EF_SYS_CACHE_OCTET_SIZE 8
#define NVRAM_EF_SYS_CACHE_OCTET_TOTAL 20
/** EQ_PLMN
*
*/
#define NVRAM_EF_EQ_PLMN_SIZE 38
#define NVRAM_EF_EQ_PLMN_TOTAL (1 * NVRAM_DUAL_RECORD)
#define NVRAM_EF_NVRAM_LOCK_SIZE sizeof(nvram_ef_nvram_lock_dummy_struct)
#define NVRAM_EF_NVRAM_LOCK_TOTAL 1
/**
* Drx parameters
*/
#define NVRAM_EF_DRX_PARAM_SIZE 2
#define NVRAM_EF_DRX_PARAM_TOTAL 1
typedef enum
{
NVRAM_SYS_CACHE_BEGIN = 1,
NVRAM_SYS_FLIGHTMODE_STATE,
NVRAM_SYS_DSP_PATCH,
NVRAM_SYS_SIM_PLUS_SETTING,
NVRAM_SYS_FIXED_GAIN_MECH_FOR_HELIOS2,
NVRAM_SYS_FACTORY_FLAG,
NVRAM_SYS_LAST_FAT_STATUS,
NVRAM_SYS_INFO,
NVRAM_SYS_PHB_COMPARE_DIGIT,
NVRAM_SYS_SVN,
NVRAM_SYS_USB_BOOT_MODE,
NVRAM_SYS_USB_TETHERING_MODE,
NVRAM_SYS_AUTO_TEST,
NVRAM_SYS_MINI_LOG_IDX,
NVRAM_SYS_SWLA,
NVRAM_SYS_NVRAM_INIT_TIME_UT,
NVRAM_SYS_NVRAM_INIT_TIME_UT2,
NVRAM_SYS_CACHE_MAX
} nvram_sys_cache_enum;
/*****************************************************************************
*
* Verno of Data Item
*
*****************************************************************************/
/* verno of data items */
#define NVRAM_EF_SYS_LID_VERNO "001"
#define NVRAM_EF_BRANCH_VERNO_LID_VERNO "000"
#define NVRAM_EF_FLAVOR_VERNO_LID_VERNO "001"
#define NVRAM_EF_CUSTPACK_VERNO_LID_VERNO "000"
#define NVRAM_EF_SECUPACK_VERNO_LID_VERNO "001"
#define NVRAM_EF_NVRAM_LOCK_LID_VERNO "000"
#define NVRAM_EF_READ_RESERVED_LID_VERNO "000"
#define NVRAM_EF_SYS_CACHE_OCTET_LID_VERNO "004"
#define NVRAM_EF_NVRAM_MSP_TEST_LID_VERNO "000"
#define NVRAM_EF_NVRAM_UNIT_TEST_LID_VERNO "000"
#define NVRAM_EF_NVRAM_SEC_CHECK_LID_VERNO "000"
#define NVRAM_EF_CORE_FACTORY_RESET_AND_OTA_LID_VERNO "000"
#define NVRAM_EF_CORE_CHKSUM_INFO_LID_VERNO "000"
#define NVRAM_EF_CORE_INTERNAL_CLONE_LID_VERNO "000"
#define NVRAM_EF_CORE_BNRG_CHKSUM_ALGRTHM_LID_VERNO "000"
#if defined (__NVRAM_UT_TEST__)
#define NVRAM_EF_NVRAM_TEST_1_LID_VERNO "000"
#define NVRAM_EF_NVRAM_TEST_2_LID_VERNO "000"
#define NVRAM_EF_NVRAM_TEST_3_LID_VERNO "000"
#define NVRAM_EF_NVRAM_TEST_4_LID_VERNO "000"
#define NVRAM_EF_NVRAM_TEST_5_LID_VERNO "000"
#define NVRAM_EF_NVRAM_TEST_6_LID_VERNO "000"
#define NVRAM_EF_NVRAM_TEST_7_LID_VERNO "000"
#define NVRAM_EF_NVRAM_TEST_8_LID_VERNO "000"
#define NVRAM_EF_NVRAM_TEST_9_LID_VERNO "000"
#define NVRAM_EF_NVRAM_TEST_10_LID_VERNO "000"
#define NVRAM_EF_NVRAM_TEST_11_LID_VERNO "000"
#define NVRAM_EF_NVRAM_TEST_12_LID_VERNO "000"
#define NVRAM_EF_INTERNAL_13_LID_VERNO "000"
#define NVRAM_EF_INTERNAL_TEST_14_LID_VERNO "000"
#define NVRAM_EF_INTERNAL_TEST_16_LID_VERNO "000"
#define NVRAM_EF_INTERNAL_TEST_17_LID_VERNO "000"
#endif
//#if defined(__NVRAM_STRUCTURE_CHANGE_RESET__) || defined(__NVRAM_DEFVAL_CHANGE_RESET__)
#define NVRAM_EF_CHKSUM_RESET_REC_LID_VERNO "000"
#define NVRAM_EF_CHKSUM_RESET_REC_LID_TOTAL 1
//#endif
// HASH Key
#define NVRAM_EF_SYS_LID_HASH 0x33F55F63
#define NVRAM_EF_BRANCH_VERNO_LID_HASH 0x9C9A13CF
#define NVRAM_EF_FLAVOR_VERNO_LID_HASH 0x459C346C
#define NVRAM_EF_BUILD_TIME_LID_HASH 0xF154A381
#define NVRAM_EF_CUSTPACK_VERNO_LID_HASH 0xE705B1FF
#define NVRAM_EF_SECUPACK_VERNO_LID_HASH 0x767D628D
#define NVRAM_EF_NVRAM_LOCK_LID_HASH 0xF25739F5
#define NVRAM_EF_READ_RESERVED_LID_HASH 0x759AEFA6
#define NVRAM_EF_NVRAM_SEC_CHECK_LID_HASH 0x2840E88C
#define NVRAM_EF_CHKSUM_RESET_REC_LID_HASH 0xC1154025
#define NVRAM_EF_NVRAM_UNIT_TEST_LID_HASH 0x1EE1FB99
#define NVRAM_EF_NVRAM_TEST_1_LID_HASH 0x71E52CD6
#define NVRAM_EF_NVRAM_TEST_2_LID_HASH 0xF4210C15
#define NVRAM_EF_NVRAM_TEST_3_LID_HASH 0xFF3DA7FC
#define NVRAM_EF_NVRAM_TEST_4_LID_HASH 0x59A6CC85
#define NVRAM_EF_NVRAM_TEST_5_LID_HASH 0x3CF2EB09
#define NVRAM_EF_NVRAM_TEST_6_LID_HASH 0x5E40657B
#define NVRAM_EF_NVRAM_TEST_7_LID_HASH 0xDB186D79
#define NVRAM_EF_NVRAM_TEST_8_LID_HASH 0xDC146226
#define NVRAM_EF_NVRAM_TEST_9_LID_HASH 0x1FE3368C
#define NVRAM_EF_NVRAM_TEST_10_LID_HASH 0x9411A5F8
#define NVRAM_EF_NVRAM_TEST_11_LID_HASH 0xEE23891A
#define NVRAM_EF_NVRAM_TEST_12_LID_HASH 0x229FB103
#define NVRAM_EF_INTERNAL_13_LID_HASH 0x3BEA879C
#define NVRAM_EF_INTERNAL_TEST_14_LID_HASH 0x51466F24
#define NVRAM_EF_INTERNAL_TEST_16_LID_HASH 0x774AD9E9
#define NVRAM_EF_INTERNAL_TEST_17_LID_HASH 0x1A23AD1F
#define NVRAM_EF_SYS_CACHE_OCTET_LID_HASH 0xB254C9C4
#define NVRAM_EF_NVRAM_MSP_TEST_LID_HASH 0xABB2ACB2
#define NVRAM_EF_CORE_FACTORY_RESET_AND_OTA_LID_HASH 0xBED3913D
#define NVRAM_EF_CORE_CHKSUM_INFO_LID_HASH 0x0E4F286A
#define NVRAM_EF_CORE_INTERNAL_CLONE_LID_HASH 0xC0FFE66D
#define NVRAM_EF_CORE_BNRG_CHKSUM_ALGRTHM_LID_HASH 0x2D8511F3
/*****************************************************************************
* Typedef
*****************************************************************************/
#if defined (__NVRAM_UT_TEST__)
typedef struct
{
kal_uint8 nv_tdata[1024];
}nvram_ef_nv_test_lid_struct;
#define NVRAM_EF_TEST_LID_RECORD_TOTAL 10
#define NVRAM_EF_TEST_LID_SIZE sizeof(nvram_ef_nv_test_lid_struct)
typedef struct
{
kal_uint8 nv_tdata[16];
}nvram_ef_nv_test_lid_dummy_struct;
#define NVRAM_EF_TEST_8_LID_RECORD_TOTAL 3
#define NVRAM_EF_TEST_8_LID_SIZE 16
typedef struct
{
kal_uint8 nv_tdata[15*1024];
}nvram_ef_nv_test_lid_large_struct;
#define NVRAM_EF_TEST_13_LID_RECORD_TOTAL 10
#define NVRAM_EF_TEST_13_LID_SIZE sizeof(nvram_ef_nv_test_lid_large_struct)
typedef struct
{
kal_uint8 nv_tdata[64];
}nvram_ef_nv_test_lid_small_struct;
#define NVRAM_EF_TEST_14_LID_RECORD_TOTAL 10
#define NVRAM_EF_TEST_14_LID_SIZE sizeof(nvram_ef_nv_test_lid_small_struct)
typedef struct
{
kal_uint8 nv_tdata[1108];
}nvram_ef_nv_test_16_lid_dummy_struct;
#define NVRAM_EF_INTERNAL_TEST_16_LID_RECORD_TOTAL 68
#define NVRAM_EF_INTERNAL_TEST_16_LID_SIZE sizeof(nvram_ef_nv_test_16_lid_dummy_struct)
#endif
//#if defined(__NVRAM_STRUCTURE_CHANGE_RESET__) || defined(__NVRAM_DEFVAL_CHANGE_RESET__)
#define NVRAM_CHKSUM_RST_REC_NUM 50
typedef struct
{
nvram_lid_enum LID;
kal_char fileprefix[FILE_PREFIX_LEN];
}rst_rec_info;
typedef struct
{
kal_uint16 defval_rst_index;
kal_uint16 structure_rst_index;
kal_uint16 defval_chksum_nofound_index;
kal_uint16 structure_chksum_nofound_index;
rst_rec_info defval_rst[NVRAM_CHKSUM_RST_REC_NUM];
rst_rec_info structure_rst[NVRAM_CHKSUM_RST_REC_NUM];
rst_rec_info defval_chksum_nofound[NVRAM_CHKSUM_RST_REC_NUM];
rst_rec_info structure_chksum_nofound[NVRAM_CHKSUM_RST_REC_NUM];
}chksum_rst_rec_struct;
#define NVRAM_EF_CHKSUM_RESET_REC_SIZE sizeof(chksum_rst_rec_struct)
typedef struct
{
kal_uint8 data[16];
} nvram_ef_nvram_lock_dummy_struct;
typedef struct
{
kal_uint8 data;
} nvram_ef_read_reserved_dummy_struct;
typedef struct
{
kal_uint8 data[34];
} nvram_ef_sys_dummy_struct;
//#endif
#ifdef __cplusplus
}
#endif
#endif /* NVRAM_DATA_ITEMS_H */ /* define NVRAM_DATA_ITEMS_H */