blob: 5a5581aa550e8a93a136b06a00c02d1f34a48c85 [file] [log] [blame]
yu.dongc33b3072024-08-21 23:14:49 -07001/*****************************************************************************
2* Copyright Statement:
3* --------------------
4* This software is protected by Copyright and the information contained
5* herein is confidential. The software may not be copied and the information
6* contained herein may not be used or disclosed except with the written
7* permission of MediaTek Inc. (C) 2005
8*
9* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
10* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
11* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
12* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
13* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
14* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
15* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
16* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
17* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
18* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
19* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
20* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
21*
22* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
23* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
24* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
25* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
26* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
27*
28* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
29* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
30* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
31* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
32* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
33*
34*****************************************************************************/
35
36/*******************************************************************************
37 * Filename:
38 * ---------
39 * nvram_config.h
40 *
41 * Project:
42 * --------
43 * MAUI
44 *
45 * Description:
46 * ------------
47 * The file contains nvram configuration default value.
48 *
49 * Author:
50 * -------
51 * -------
52 *
53 *==============================================================================
54 * HISTORY
55 * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
56 *------------------------------------------------------------------------------
57 * removed!
58 *
59 * removed!
60 * removed!
61 * removed!
62 *
63 * removed!
64 * removed!
65 * removed!
66 *
67 * removed!
68 * removed!
69 * removed!
70 *
71 * removed!
72 * removed!
73 * removed!
74 *
75 * removed!
76 * removed!
77 * removed!
78 *
79 * removed!
80 * removed!
81 * removed!
82 * removed!
83 *
84 * removed!
85 * removed!
86 * removed!
87 *
88 * removed!
89 * removed!
90 * removed!
91 *
92 * removed!
93 * removed!
94 * removed!
95 * removed!
96 * removed!
97 * removed!
98 *
99 * removed!
100 * removed!
101 * removed!
102 *
103 * removed!
104 * removed!
105 * removed!
106 *
107 * removed!
108 * removed!
109 * removed!
110 * removed!
111 *
112 * removed!
113 * removed!
114 * removed!
115 *
116 * removed!
117 * removed!
118 * removed!
119 *
120 * removed!
121 * removed!
122 *
123 * removed!
124 * removed!
125 * removed!
126 *
127 * removed!
128 * removed!
129 * removed!
130 *
131 * removed!
132 * removed!
133 * removed!
134 *
135 * removed!
136 * removed!
137 * removed!
138 *
139 * removed!
140 * removed!
141 * removed!
142 *
143 * removed!
144 * removed!
145 * removed!
146 *
147 * removed!
148 * removed!
149 * removed!
150 *
151 * removed!
152 * removed!
153 * removed!
154 *
155 * removed!
156 * removed!
157 * removed!
158 *
159 * removed!
160 * removed!
161 * removed!
162 *
163 *------------------------------------------------------------------------------
164 * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
165 *==============================================================================
166 *******************************************************************************/
167#ifndef NVRAM_CONFIG_H
168#define NVRAM_CONFIG_H
169
170#include "ccci_fs_if.h"
171typedef struct CCCI_FS_PARAM_CMPT NVRAM_FS_PARAM_CMPT_T;
172#define NVRAM_FS_CMPT_OPEN CCCI_FS_CMPT_OPEN
173#define NVRAM_FS_CMPT_GETFILESIZE CCCI_FS_CMPT_GETFILESIZE
174#define NVRAM_FS_CMPT_SEEK CCCI_FS_CMPT_SEEK
175#define NVRAM_FS_CMPT_READ CCCI_FS_CMPT_READ
176#define NVRAM_FS_CMPT_CLOSE CCCI_FS_CMPT_CLOSE
177
178
179// -- Active recover file from bin region before init all --
180//***************************************************************************
181#define __NVRAM_INIT_ACTIVE_RECOVER__
182
183
184//***************************************************************************
185// -- Multiple folder configuration --
186// Turn on "Multi Folder" when pseudo merge turn off
187//***************************************************************************
188#ifndef __NVRAM_PSEUDO_MERGE__
189#define __NVRAM_MULTI_FOLDERS__
190#endif
191
192//***************************************************************************
193// -- NVRAM init LID buffer feature --
194//***************************************************************************
195#ifndef __NVRAM_UT_TEST__
196#define __NVRAM_INIT_LID_BUFFER__
197#endif
198
199//***************************************************************************
200// -- Custom_sensitive category configuration --
201//***************************************************************************
202#ifdef __TC01__
203 #ifdef __NVRAM_MULTI_FOLDERS__
204 #define __NVRAM_CUSTOM_SENSITIVE__
205 #ifdef __NVRAM_PSEUDO_MERGE__
206 #error "cannot open with pseudo merge"
207 #endif
208 #endif
209#endif
210
211//***************************************************************************
212// -- Large record size configuration --
213//***************************************************************************
214#ifdef __TC01__
215 #define __NVRAM_LARGE_RECORD_SIZE__
216#endif
217
218//***************************************************************************
219// -- Write with NVRAM file but not file's record configuration --
220//***************************************************************************
221#define __NVRAM_WRITE_WITH_FILE_SIZE__
222
223//***************************************************************************
224// -- compact the read preocess with one command --
225//***************************************************************************
226#define __NVRAM_FS_OPERATION_COMPACT__
227#if !defined(__MTK_TARGET__)
228#define __NVRAM_FS_CMPT_SIMULATION__
229#define __NVRAM_BIN_REGION_SIMULATION__
230#endif
231
232//***************************************************************************
233// -- Custom Disk configuration --
234//***************************************************************************
235#if defined(__CUSTOMER_TC01_DISK__) && defined (__MTK_TARGET__)
236 #define __NVRAM_CUSTOM_DISK__
237 #ifdef __NVRAM_PSEUDO_MERGE__
238 #error "cannot open with pseudo merge"
239 #endif
240#endif
241
242//***************************************************************************
243// -- Backup Disk configuration --
244// __NVRAM_SIMULATE_BACKUP_DISK__ : simulate backup disk on MODIS
245//***************************************************************************
246#ifdef __SYSDRV_BACKUP_DISK__
247 #define __NVRAM_BACKUP_DISK__
248
249 #ifdef __SYSDRV_BACKUP_DISK_FAT__
250 #define __NVRAM_BACKUP_DISK_FAT__
251 #endif
252
253 #ifdef __SYSDRV_BACKUP_DISK_RAW__
254 /* We simulate the backup disk on MODIS */
255 #ifndef __MTK_TARGET__
256 #define __NVRAM_SIMULATE_BACKUP_DISK__
257 #endif
258 #define __NVRAM_BACKUP_DISK_RAW__
259 #endif
260
261 #ifdef __NVRAM_PSEUDO_MERGE__
262 #error "cannot open with pseudo merge"
263 #endif
264#endif
265
266//***************************************************************************
267// -- Secure Data Storage configuration --
268// __NVRAM_SIMULATE_SECURE_DATA_STORAGE__ : simulate on SDS MODIS
269//***************************************************************************
270#ifdef __SECURE_DATA_STORAGE__
271 #define __NVRAM_SECURE_DATA_STORAGE__
272 #ifndef __MTK_TARGET__
273 #define __NVRAM_SIMULATE_SECURE_DATA_STORAGE__
274 #endif
275
276 #ifdef __NVRAM_PSEUDO_MERGE__
277 #error "cannot open with pseudo merge"
278 #endif
279#endif
280
281
282//***************************************************************************
283// -- Unit test configuration --
284//***************************************************************************
285#define __NVRAM_INIT_TIME_UT__
286//#define __NVRAM_UNIT_TEST__
287//#define __SLIM__
288//#define __NVRAM_DEBUG_READ_DUMP__
289//#define __NVRAM_DEBUG_WRITE_DUMP__
290#ifdef __NVRAM_DEBUG_READ_DUMP__
291 #define NVRAM_DEBUG_DUMP_OTA KAL_TRUE
292 #define NVRAM_DEBUG_DUMP_OTA_DETAIL KAL_TRUE
293 #define NVRAM_DEBUG_DUMP_OTA_DEBUG KAL_TRUE
294#endif
295
296#define __NVRAM_CREATE_FILE_ON_WRITE__
297#define __NVRAM_MONITOR_ENABLED__
298#define __NVRAM_READ_RESERVED_FILE__
299#if !defined(__CCCIFS_SUPPORT__) && defined(__MTK_TARGET__) && !defined(__FS_RAMDISK__)
300#define __NVRAM_DISK_SIZE_CHECK__
301#endif
302
303#define __NVRAM_MONITOR_ENABLED__
304#define __NVRAM_SEC_CHECK_EN__
305
306#define __NVRAM_CHECK_FILE_AND_RECOVER__
307#define __NVRAM_IMEI_UNLOCK_DISABLE__
308//#define __NVRAM_ACCESS_TIMEOUT_ASSERT__
309#endif
310