blob: aa6712ea6211244d7b09a366fa2bf42d2a9fde2e [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 * Copyright Statement:
37 * --------------------
38 * This software is protected by Copyright and the information contained
39 * herein is confidential. The software may not be copied and the information
40 * contained herein may not be used or disclosed except with the written
41 * permission of MediaTek Inc. (C) 2001
42 *
43 *******************************************************************************/
44
45 /*******************************************************************************
46 * Filename:
47 * ---------
48 * nvram.sap
49 *
50 * Project:
51 * --------
52 * MAUI
53 *
54 * Description:
55 * ------------
56 * NVRAM related message identity definition
57 *
58 * Author:
59 * -------
60 * -------
61 *
62 *==============================================================================
63 * HISTORY
64 * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
65 *------------------------------------------------------------------------------
66 * removed!
67 * removed!
68 * removed!
69 *
70 * removed!
71 * removed!
72 *
73 * removed!
74 * removed!
75 *
76 * removed!
77 * removed!
78 * removed!
79 *
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 *
96 * removed!
97 * removed!
98 * removed!
99 *
100 * removed!
101 * removed!
102 * removed!
103 *
104 * removed!
105 * removed!
106 * removed!
107 *
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 * removed!
123 *
124 * removed!
125 * removed!
126 * removed!
127 *
128 * removed!
129 * removed!
130 * removed!
131 *
132 * removed!
133 * removed!
134 * removed!
135 *
136 * removed!
137 * removed!
138 * removed!
139 * removed!
140 * removed!
141 * removed!
142 * removed!
143 * removed!
144 * removed!
145 * removed!
146 * removed!
147 * removed!
148 * removed!
149 * removed!
150 * removed!
151 * removed!
152 * removed!
153 * removed!
154 * removed!
155 * removed!
156 * removed!
157 * removed!
158 * removed!
159 * removed!
160 * removed!
161 * removed!
162 * removed!
163 * removed!
164 *------------------------------------------------------------------------------
165 * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
166 *==============================================================================
167 *******************************************************************************/
168#include "module_msg_range.h"
169
170#ifndef _NVRAM_MSG_H
171#define _NVRAM_MSG_H
172
173MODULE_MSG_BEGIN( MSG_ID_NVRAM_CODE_BEGIN )
174#ifdef __BUILD_DOM__
175/**************************************************************************************
176 * Description
177 * <pre>
178 * This message is used to get NVRAM state so that L4C could go on the protocol
179 * startup procedure.
180 * </pre>
181 * Note
182 * L4C -> NVRAM
183 * See Also
184 * Local Parameter: nvram_startup_req_struct
185 **************************************************************************************/
186#define MSG_ID_NVRAM_STARTUP_REQ
187
188/**************************************************************************************
189 * Description
190 * <pre>
191 * If initialization failed, NVRAM will response NVRAM_STARTUP_CNF primitive
192 * along with an error number described the reason. Otherwise, NVRAM keeps silent.
193 * </pre>
194 * Note
195 * NVRAM -> L4C
196 * See Also
197 * Local Parameter: nvram_startup_cnf_struct
198 **************************************************************************************/
199#define MSG_ID_NVRAM_STARTUP_CNF
200
201/**************************************************************************************
202 * Description
203 * <pre>
204 * NVRAM_RESET_REQ should be sent to NVRAM task to reset data items, i.e., logical data items,
205 * could be a single data item or a certain category of data item.
206 * </pre>
207 * Note
208 * APP -> NVRAM
209 * See Also
210 * Local Parameter: nvram_reset_req_struct
211 **************************************************************************************/
212#define MSG_ID_NVRAM_RESET_REQ
213
214/**************************************************************************************
215 * Description
216 * <pre>
217 * NVRAM_RESET_CNF returns the result of NVRAM_RESET_REQ. The return status is encoded in errno.
218 * </pre>
219 * Note
220 * NVRAM -> App
221 * See Also
222 * Local Parameter: nvram_reset_cnf_struct
223 **************************************************************************************/
224#define MSG_ID_NVRAM_RESET_CNF
225
226/**************************************************************************************
227 * Description
228 * <pre>
229 * Reads a data item given by its logical data item ID. For linear fixed EF, a valid
230 * record index must be provided.
231 * PS. The index of first record is 1
232 * </pre>
233 * Note
234 * APP -> NVRAM
235 * See Also
236 * Local Parameter: nvram_read_req_struct
237 **************************************************************************************/
238#define MSG_ID_NVRAM_READ_REQ
239
240/**************************************************************************************
241 * Description
242 * <pre>
243 * Returns actual content of the specified data item. Result of the corresponding
244 * read primitive is also returned in errno.
245 * </pre>
246 * Note
247 * NVRAM -> App
248 * See Also
249 * Local Parameter: nvram_read_cnf_struct
250 **************************************************************************************/
251#define MSG_ID_NVRAM_READ_CNF
252
253/**************************************************************************************
254 * Description
255 * <pre>
256 * Writes a transparent EF given by its logical data item ID. For linear fixed EF,
257 * a valid record index must be provided.
258 * 1. For linear fixed EF, the index of first record is 1.
259 * 2. NVRAM Layer frees the buffer immediately after written.
260 * </pre>
261 * Note
262 * APP -> NVRAM
263 * See Also
264 * Local Parameter: nvram_write_req_struct
265 **************************************************************************************/
266#define MSG_ID_NVRAM_WRITE_REQ
267
268/**************************************************************************************
269 * Description
270 * <pre>
271 * Returns the result of the corresponding write primitive. Return status is encoded in errno.
272 * </pre>
273 * Note
274 * NVRAM -> App
275 * See Also
276 * Local Parameter: nvram_write_cnf_struct
277 **************************************************************************************/
278#define MSG_ID_NVRAM_WRITE_CNF
279
280/**************************************************************************************
281 * Description
282 * <pre>
283 * </pre>
284 * Note
285 * APP -> NVRAM
286 * See Also
287 * Local Parameter: nvram_write_imei_req_struct
288 **************************************************************************************/
289#define MSG_ID_NVRAM_WRITE_IMEI_REQ
290
291/**************************************************************************************
292 * Description
293 * <pre>
294 * </pre>
295 * Note
296 * NVRAM -> App
297 * See Also
298 * Local Parameter: nvram_write_imei_cnf_struct
299 **************************************************************************************/
300#define MSG_ID_NVRAM_WRITE_IMEI_CNF
301
302/**************************************************************************************
303 * Description
304 * <pre>
305 * </pre>
306 * Note
307 * APP -> NVRAM
308 * See Also
309 * Local Parameter: nvram_read_sm_req_struct
310 **************************************************************************************/
311#define MSG_ID_NVRAM_READ_SM_REQ
312
313/**************************************************************************************
314 * Description
315 * <pre>
316 * </pre>
317 * Note
318 * NVRAM -> App
319 * See Also
320 * Local Parameter: nvram_read_sm_cnf_struct
321 **************************************************************************************/
322#define MSG_ID_NVRAM_READ_SM_CNF
323
324/**************************************************************************************
325 * Description
326 * <pre>
327 * </pre>
328 * Note
329 * APP -> NVRAM
330 * See Also
331 * Local Parameter: nvram_write_sm_req_struct
332 **************************************************************************************/
333#define MSG_ID_NVRAM_WRITE_SM_REQ
334
335/**************************************************************************************
336 * Description
337 * <pre>
338 * </pre>
339 * Note
340 * NVRAM -> App
341 * See Also
342 * Local Parameter: nvram_write_sm_cnf_struct
343 **************************************************************************************/
344#define MSG_ID_NVRAM_WRITE_SM_CNF
345
346/**************************************************************************************
347 * Description
348 * <pre>
349 * Turn on or turn off the NVRAM software lock.
350 * </pre>
351 * Note
352 * APP -> NVRAM
353 * See Also
354 * Local Parameter: nvram_set_lock_req_struct
355 **************************************************************************************/
356#define MSG_ID_NVRAM_SET_LOCK_REQ
357
358/**************************************************************************************
359 * Description
360 * <pre>
361 * Returns the result of the corresponding SET LOCK primitive. Return status is encoded
362 * in following ENUM
363 * </pre>
364 * Note
365 * NVRAM -> App
366 * See Also
367 * Local Parameter: nvram_set_lock_cnf_struct
368 **************************************************************************************/
369#define MSG_ID_NVRAM_SET_LOCK_CNF
370
371/**************************************************************************************
372 * Description
373 * <pre>
374 * 1. Create a backup image of nvram into backup partition
375 * 2. Clear the data in backup partition
376 * </pre>
377 * Note
378 * App -> NVRAM
379 * See Also
380 * Local Parameter: nvram_create_image_req_struct
381 **************************************************************************************/
382#define MSG_ID_NVRAM_CREATE_IMAGE_REQ
383
384/**************************************************************************************
385 * Description
386 * <pre>
387 * Returns the result of the corresponding CREATE IMAGE primitive.
388 * </pre>
389 * Note
390 * NVRAM -> App
391 * See Also
392 * Local Parameter: nvram_create_image_cnf_struct
393 **************************************************************************************/
394#define MSG_ID_NVRAM_CREATE_IMAGE_CNF
395
396/**************************************************************************************
397 * Description
398 * <pre>
399 * Recover the data in backup partition back to NVRAM
400 * </pre>
401 * Note
402 * App -> NVRAM
403 * See Also
404 * Local Parameter: nvram_recover_image_req_struct
405 **************************************************************************************/
406#define MSG_ID_NVRAM_RECOVER_IMAGE_REQ
407
408/**************************************************************************************
409 * Description
410 * <pre>
411 * Returns the result of the corresponding RECOVER IMAGE primitive.
412 * </pre>
413 * Note
414 * NVRAM -> App
415 * See Also
416 * Local Parameter: nvram_recover_image_cnf_struct
417 **************************************************************************************/
418#define MSG_ID_NVRAM_RECOVER_IMAGE_CNF
419
420/**************************************************************************************
421 * Description
422 * <pre>
423 * Verify the data in backup partition to check the data integrity.
424 * There are three steps.
425 * 1. Check the status of image (close or broken)
426 * 2. Check the checksum of image.
427 * 3. Compare the value with NVRAM's
428 * NVRAM also provides a fast mode to execute the step 1 only.
429 * </pre>
430 * Note
431 * App -> NVRAM
432 * See Also
433 * Local Parameter: nvram_verify_image_req_struct
434 **************************************************************************************/
435#define MSG_ID_NVRAM_VERIFY_IMAGE_REQ
436
437/**************************************************************************************
438 * Description
439 * <pre>
440 * Returns the result of the corresponding VERIFY IMAGE primitive.
441 * </pre>
442 * Note
443 * NVRAM -> App
444 * See Also
445 * Local Parameter: nvram_verify_image_cnf_struct
446 **************************************************************************************/
447#define MSG_ID_NVRAM_VERIFY_IMAGE_CNF
448
449/**************************************************************************************
450 * Description
451 * <pre>
452 * Suspend the NVRAM task, you can assign the time in structure
453 * ex:
454 * </pre>
455 * Note
456 * NVRAM -> App
457 * See Also
458 * Local Parameter: nvram_suspend_req_struct
459 **************************************************************************************/
460#define MSG_ID_NVRAM_SUSPEND_REQ
461
462/**************************************************************************************
463 * Description
464 * <pre>
465 * Returns the result of the suspend request.
466 * </pre>
467 * Note
468 * NVRAM -> App
469 * See Also
470 * Local Parameter: nvram_suspend_cnf_struct
471 **************************************************************************************/
472#define MSG_ID_NVRAM_SUSPEND_CNF
473
474/**************************************************************************************
475* Description
476* <pre>
477* Backup FAT data items to SDS
478* </pre>
479* Note
480* App -> NVRAM
481* See Also
482* Local Parameter: nvram_sds_req_struct
483**************************************************************************************/
484#define MSG_ID_NVRAM_SDS_REQ
485
486
487/**************************************************************************************
488* Description
489* <pre>
490* Returns the result of the backup to SDS request.
491* </pre>
492* Note
493* NVRAM -> App
494* See Also
495* Local Parameter: nvram_sds_cnf_struct
496**************************************************************************************/
497#define MSG_ID_NVRAM_SDS_CNF
498
499/**************************************************************************************
500* Description
501* <pre>
502* Backup FAT data items to SDS
503* </pre>
504* Note
505* App -> NVRAM
506* See Also
507* Local Parameter: nvram_bin_region_req_struct
508**************************************************************************************/
509#define MSG_ID_NVRAM_BIN_REGION_REQ
510
511/**************************************************************************************
512* Description
513* <pre>
514* Returns the result of the backup to AP BIN region request.
515* </pre>
516* Note
517* NVRAM -> App
518* See Also
519* Local Parameter: nvram_bin_region_cnf_struct
520**************************************************************************************/
521#define MSG_ID_NVRAM_BIN_REGION_CNF
522
523/**************************************************************************************
524* Description
525* <pre>
526* Dummy message just for wakeup nvram task if nvram task is waiting for extq msg
527* </pre>
528* Note
529* App -> NVRAM
530* See Also
531* Local Parameter: nvram_callback_req_struct
532**************************************************************************************/
533#define MSG_ID_NVRAM_CALLBACK_REQ
534
535/**************************************************************************************
536* Description
537* <pre>
538* Register the NVRAM monitor function of a LID for C2K
539* </pre>
540* Note
541* App -> NVRAM
542* See Also
543* Local Parameter: nvram_read_req_struct
544**************************************************************************************/
545#define MSG_ID_NVRAM_REG_NOTIFY_REQ
546
547/**************************************************************************************
548* Description
549* <pre>
550* Deregister the NVRAM monitor function of a LID for C2K
551* </pre>
552* Note
553* App -> NVRAM
554* See Also
555* Local Parameter: nvram_read_req_struct
556**************************************************************************************/
557#define MSG_ID_NVRAM_DEREG_NOTIFY_REQ
558
559#else
560
561 MSG_ID_NVRAM_STARTUP_REQ = MSG_ID_NVRAM_CODE_BEGIN,
562 MSG_ID_NVRAM_STARTUP_CNF,
563 MSG_ID_NVRAM_RESET_REQ,
564 MSG_ID_NVRAM_RESET_CNF,
565 MSG_ID_NVRAM_READ_REQ,
566 MSG_ID_NVRAM_READ_CNF,
567 MSG_ID_NVRAM_WRITE_REQ,
568 MSG_ID_NVRAM_WRITE_CNF,
569 MSG_ID_NVRAM_WRITE_IMEI_REQ,
570 MSG_ID_NVRAM_WRITE_IMEI_CNF,
571 MSG_ID_NVRAM_READ_SM_REQ,
572 MSG_ID_NVRAM_READ_SM_CNF,
573 MSG_ID_NVRAM_WRITE_SM_REQ,
574 MSG_ID_NVRAM_WRITE_SM_CNF,
575 MSG_ID_NVRAM_SET_LOCK_REQ,
576 MSG_ID_NVRAM_SET_LOCK_CNF,
577 MSG_ID_NVRAM_CREATE_IMAGE_REQ,
578 MSG_ID_NVRAM_CREATE_IMAGE_CNF,
579 MSG_ID_NVRAM_RECOVER_IMAGE_REQ,
580 MSG_ID_NVRAM_RECOVER_IMAGE_CNF,
581 MSG_ID_NVRAM_VERIFY_IMAGE_REQ,
582 MSG_ID_NVRAM_VERIFY_IMAGE_CNF,
583 MSG_ID_NVRAM_SUSPEND_REQ,
584 MSG_ID_NVRAM_SUSPEND_CNF,
585 MSG_ID_NVRAM_SDS_REQ,
586 MSG_ID_NVRAM_SDS_CNF,
587 MSG_ID_NVRAM_BIN_REGION_REQ,
588 MSG_ID_NVRAM_BIN_REGION_CNF,
589 MSG_ID_NVRAM_CALLBACK_REQ,
590 MSG_ID_NVRAM_REG_NOTIFY_REQ,
591 MSG_ID_NVRAM_DEREG_NOTIFY_REQ,
592 MSG_ID_NVRAM_READ_DEFAULT_REQ,
593 MSG_ID_NVRAM_READ_DEFAULT_CNF,
594 MSG_ID_NVRAM_RESERVED_4,
595 MSG_ID_NVRAM_RESERVED_5,
596 MSG_ID_NVRAM_RESERVED_6,
597 MSG_ID_NVRAM_MAX,
598 MSG_ID_NVRAM_CODE_END = MSG_ID_NVRAM_MAX,
599
600#endif
601MODULE_MSG_END( MSG_ID_NVRAM_CODE_TAIL )
602
603#if defined (__NVRAM_UT_TEST__)
604
605MODULE_MSG_BEGIN( MSG_ID_NVRAM_TEST_CODE_BEGIN )
606#ifdef __BUILD_DOM__
607/**************************************************************************************
608 This is used to ELT send test case and start flag to Ttask1
609 **************************************************************************************/
610#define MSG_ID_NVRAM_TEST_REQ
611
612/**************************************************************************************
613 This is used to Ttask1 send SMP stress test1 to Ttask2~Ttask4
614 **************************************************************************************/
615#define MSG_ID_NVRAM_STRESS_TEST1_REQ
616
617/**************************************************************************************
618 This is used to Ttask2~Ttask4 to return test result to Ttask1
619 **************************************************************************************/
620#define MSG_ID_NVRAM_STRESS_TEST1_CNF
621
622#else
623
624 MSG_ID_NVRAM_TEST_REQ = MSG_ID_NVRAM_TEST_CODE_BEGIN,
625 MSG_ID_NVRAM_STRESS_TEST1_REQ,
626 MSG_ID_NVRAM_STRESS_TEST1_CNF,
627
628
629#endif
630MODULE_MSG_END( MSG_ID_NVRAM_TEST_CODE_TAIL )
631
632#endif /*#if defined (__NVRAM_UT_TEST__)*/
633
634
635#endif //_NVRAM_MSG_H