blob: 38a38bca848803636a0c2c7752af944ed3a0acfb [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) 2018
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 * mcf_if.h
40 *
41 * Project:
42 * --------
43 * UMOLYA
44 *
45 * Description:
46 * ------------
47 * MD Configuration Framework public interface implementation.
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 * removed!
67 *
68 * removed!
69 * removed!
70 * removed!
71 *
72 * removed!
73 * removed!
74 * removed!
75 * removed!
76 *
77 * removed!
78 * removed!
79 * removed!
80 *
81 * removed!
82 * removed!
83 * removed!
84 *
85 * removed!
86 * removed!
87 * removed!
88 *
89 * removed!
90 * removed!
91 * removed!
92 *
93 * removed!
94 * removed!
95 * removed!
96 *
97 * removed!
98 * removed!
99 * removed!
100 * removed!
101 *
102 * removed!
103 * removed!
104 * removed!
105 * removed!
106 *
107 * removed!
108 * removed!
109 * removed!
110 *
111 *------------------------------------------------------------------------------
112 * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
113 *==============================================================================
114 *******************************************************************************/
115#ifndef __MCF_IF_H
116#define __MCF_IF_H
117
118#include "ps_public_struct.h"
119#include "nvram_defs.h"
120#include "nvram_enums.h"
121
122#include "mcf_enum.h"
123#include "mcf_struct.h"
124
125#ifndef GEN_FOR_PC
126
127#ifndef __MCF_SUPPORT__
128#define mcf_on_ilm mcf_dummy_on_ilm
129#define mcf_do_ota_full mcf_dummy_do_ota_full
130#define mcf_do_ota_by_lid mcf_dummy_do_ota_by_lid
131#define mcf_read_ota_buffer mcf_dummy_read_ota_buffer
132#define mcf_read_tlvota_buffer mcf_dummy_read_tlvota_buffer
133#define mcf_read_tlvota_buffer_sbp_tag mcf_dummy_read_tlvota_buffer_sbp_tag
134#define mcf_read_nvram_and_tlvota_buffer_sbp_tag mcf_dummy_read_nvram_and_tlvota_buffer_sbp_tag
135#define mcf_check_lid_need_reset mcf_dummy_check_lid_need_reset
136#define mcf_check_ota_need_reset mcf_dummy_check_ota_need_update
137#define mcf_check_lid_need_reset_by_psid mcf_dummy_check_lid_need_reset_by_psid
138#define mcf_check_reset_and_tlvota_buffer_sbp_tag mcf_dummy_check_reset_and_tlvota_buffer_sbp_tag
139#define mcf_get_tlvota_file_result mcf_dummy_get_tlvota_file_result
140
141static __inline void mcf_dummy_on_ilm(ilm_struct *ilm)
142{
143 return;
144}
145
146static __inline mcf_ota_result_e mcf_dummy_do_ota_full(void)
147{
148 return MCF_OTA_R_MCF_NOT_SUPPORT;
149}
150
151static __inline mcf_ota_result_e mcf_dummy_do_ota_by_lid(nvram_lid_enum lid, kal_uint16 record_idx, kal_uint16 record_amount, nvram_ltable_entry_struct *lid_info)
152{
153 return MCF_OTA_R_MCF_NOT_SUPPORT;
154}
155
156static __inline mcf_ota_result_e mcf_dummy_read_ota_buffer(nvram_lid_enum lid, kal_uint16 record_idx, kal_uint8 *buffer, kal_uint32 size)
157{
158 return MCF_OTA_R_MCF_NOT_SUPPORT;
159}
160
161static __inline mcf_ota_result_e mcf_dummy_read_tlvota_buffer(kal_uint8 ps_id, mcf_tlvota_tag_t tag, nvram_lid_enum lid, kal_uint8 *buffer, kal_uint32 size)
162{
163 return MCF_OTA_R_MCF_NOT_SUPPORT;
164}
165
166static __inline mcf_ota_result_e mcf_dummy_read_tlvota_buffer_sbp_tag(kal_uint8 ps_id, mcf_tlvota_sbp_tag_t sbp_tag, nvram_lid_enum lid, kal_uint8 *buffer, kal_uint32 size)
167{
168 return MCF_OTA_R_MCF_NOT_SUPPORT;
169}
170
171static __inline mcf_ota_result_e mcf_dummy_read_nvram_and_tlvota_buffer_sbp_tag(kal_uint8 ps_id, mcf_tlvota_sbp_tag_t sbp_tag, nvram_lid_enum lid, kal_uint16 record_idx, kal_uint8 *buffer, kal_uint32 size)
172{
173 return MCF_OTA_R_MCF_NOT_SUPPORT;
174}
175
176static __inline kal_bool mcf_dummy_check_lid_need_reset(nvram_lid_enum lid)
177{
178 return KAL_FALSE;
179}
180
181static __inline kal_bool mcf_dummy_check_ota_need_update(protocol_id_enum ps_id, mcf_tlvota_sbp_tag_t sbp_tag, kal_uint8* iccid)
182{
183 return KAL_FALSE;
184}
185
186static __inline kal_bool mcf_dummy_check_lid_need_reset_by_psid(nvram_lid_enum lid, kal_uint8 ps_id)
187{
188 return KAL_FALSE;
189}
190
191static __inline mcf_ota_result_e mcf_dummy_check_reset_and_tlvota_buffer_sbp_tag(kal_uint8 ps_id, mcf_tlvota_sbp_tag_t sbp_tag, nvram_lid_enum lid , kal_uint8 *buffer, kal_uint32 size, kal_uint16 record_idx)
192{
193 return MCF_OTA_R_MCF_NOT_SUPPORT;
194}
195
196static __inline mcf_ota_result_e mcf_dummy_get_tlvota_file_result(protocol_id_enum ps_id)
197{
198 return MCF_OTA_R_MCF_NOT_SUPPORT;
199}
200#else
201
202/*****************************************************************************
203 * FUNCTION
204 * mcf_on_ilm
205 * DESCRIPTION
206 * This function is used to process ilm.
207 * PARAMETERS
208 * ilm_struct [IN] ilm structure
209 *****************************************************************************/
210void mcf_on_ilm(ilm_struct *ilm);
211
212/*----------------------------------------------------------------------------------------
213 * OTA fucntions.
214 *--------------------------------------------------------------------------------------*/
215/*****************************************************************************
216 * FUNCTION
217 * mcf_do_ota_full
218 * DESCRIPTION
219 * This function is used to do NVRAM OTA according to whole OTA file.
220 * PARAMETERS
221 *
222 * RETURNS
223 * MCF_OTA_R_SUCCESS : process successfully
224 * MCF_OTA_R_MCF_NOT_SUPPORT : MCF is not supported
225 * MCF_OTA_R_VERSION_NOT_MATCH : LID version of OTA file is different from LID version in device
226 * MCF_OTA_R_WRONG_BUFFER_SIZE : given buffer size is different from LID record size
227 * MCF_OTA_R_INVALID_PARAMETER : invalid parameter
228 * MCF_OTA_R_READ_NVRAM_FAIL : fail to read NVRAM
229 * MCF_OTA_R_WRITE_NVRAM_FAIL : fail to write NVRAM
230 * MCF_OTA_R_READ_OTA_FILE_FAIL : fail to read OTA/TLV_OTA file
231 * MCF_OTA_R_INVALID_SBP_TAG : invalid SBP tag
232 * MCF_OTA_R_INVALID_FILE : invalid OTA/TLV-OTA file
233 * MCF_OTA_R_INVALID_ATTR : invalid NVRAM attribute
234 * MCF_OTA_R_TAKE_READ_LOCK_FAIL : fail to take read lock for OTA/TLV-OTA file
235 *****************************************************************************/
236mcf_ota_result_e mcf_do_ota_full(void);
237
238/*****************************************************************************
239 * FUNCTION
240 * mcf_do_ota_by_lid
241 * DESCRIPTION
242 * This function is used to do NVRAM OTA according to OTA file and specific LID.
243 * PARAMETERS
244 * lid [IN] NVRAM LID
245 * record_idx [IN] Start record index
246 * record_amount [IN] Record amount
247 * lid_info [IN] LID information
248 *
249 * RETURNS
250 * MCF_OTA_R_SUCCESS : process successfully
251 * MCF_OTA_R_MCF_NOT_SUPPORT : MCF is not supported
252 * MCF_OTA_R_VERSION_NOT_MATCH : LID version of OTA file is different from LID version in device
253 * MCF_OTA_R_WRONG_BUFFER_SIZE : given buffer size is different from LID record size
254 * MCF_OTA_R_INVALID_PARAMETER : invalid parameter
255 * MCF_OTA_R_READ_NVRAM_FAIL : fail to read NVRAM
256 * MCF_OTA_R_WRITE_NVRAM_FAIL : fail to write NVRAM
257 * MCF_OTA_R_READ_OTA_FILE_FAIL : fail to read OTA/TLV_OTA file
258 * MCF_OTA_R_INVALID_SBP_TAG : invalid SBP tag
259 * MCF_OTA_R_INVALID_FILE : invalid OTA/TLV-OTA file
260 * MCF_OTA_R_INVALID_ATTR : invalid NVRAM attribute
261 * MCF_OTA_R_TAKE_READ_LOCK_FAIL : fail to take read lock for OTA/TLV-OTA file
262 *****************************************************************************/
263mcf_ota_result_e mcf_do_ota_by_lid(nvram_lid_enum lid, kal_uint16 record_idx, kal_uint16 record_amount, nvram_ltable_entry_struct *lid_info);
264
265/*****************************************************************************
266 * FUNCTION
267 * mcf_read_ota_buffer
268 * DESCRIPTION
269 * This function is used to query OTA file and get all data items with given LID.
270 * PARAMETERS
271 * lid [IN] NVRAM LID
272 * record_idx [IN] NVRAM LID record index
273 * buffer [IN] destination buffer
274 * size [IN] buffer size
275 *
276 * RETURNS
277 * MCF_OTA_R_SUCCESS : process successfully
278 * MCF_OTA_R_MCF_NOT_SUPPORT : MCF is not supported
279 * MCF_OTA_R_VERSION_NOT_MATCH : LID version of OTA file is different from LID version in device
280 * MCF_OTA_R_WRONG_BUFFER_SIZE : given buffer size is different from LID record size
281 * MCF_OTA_R_INVALID_PARAMETER : invalid parameter
282 * MCF_OTA_R_READ_NVRAM_FAIL : fail to read NVRAM
283 * MCF_OTA_R_WRITE_NVRAM_FAIL : fail to write NVRAM
284 * MCF_OTA_R_READ_OTA_FILE_FAIL : fail to read OTA/TLV_OTA file
285 * MCF_OTA_R_INVALID_SBP_TAG : invalid SBP tag
286 * MCF_OTA_R_INVALID_FILE : invalid OTA/TLV-OTA file
287 * MCF_OTA_R_INVALID_ATTR : invalid NVRAM attribute
288 * MCF_OTA_R_TAKE_READ_LOCK_FAIL : fail to take read lock for OTA/TLV-OTA file
289 *****************************************************************************/
290mcf_ota_result_e mcf_read_ota_buffer(nvram_lid_enum lid, kal_uint16 record_idx, kal_uint8 *buffer, kal_uint32 size);
291
292/*----------------------------------------------------------------------------------------
293 * OTA by operator (TLV-OTA) fucntions.
294 *--------------------------------------------------------------------------------------*/
295/*****************************************************************************
296 * FUNCTION
297 * mcf_read_tlvota_buffer
298 * DESCRIPTION
299 * This function is used to query TLV-OTA file and get all data items with given LID and tag.
300 * PARAMETERS
301 * tag [IN] ps_id
302 * tag [IN] TLV-OTA tag
303 * lid [IN] NVRAM LID
304 * buffer [IN] destination buffer
305 * size [IN] buffer size
306 *
307 * RETURNS
308 * MCF_OTA_R_SUCCESS : process successfully
309 * MCF_OTA_R_MCF_NOT_SUPPORT : MCF is not supported
310 * MCF_OTA_R_VERSION_NOT_MATCH : LID version of OTA file is different from LID version in device
311 * MCF_OTA_R_WRONG_BUFFER_SIZE : given buffer size is different from LID record size
312 * MCF_OTA_R_INVALID_PARAMETER : invalid parameter
313 * MCF_OTA_R_READ_NVRAM_FAIL : fail to read NVRAM
314 * MCF_OTA_R_WRITE_NVRAM_FAIL : fail to write NVRAM
315 * MCF_OTA_R_READ_OTA_FILE_FAIL : fail to read OTA/TLV_OTA file
316 * MCF_OTA_R_INVALID_SBP_TAG : invalid SBP tag
317 * MCF_OTA_R_INVALID_FILE : invalid OTA/TLV-OTA file
318 * MCF_OTA_R_INVALID_ATTR : invalid NVRAM attribute
319 * MCF_OTA_R_TAKE_READ_LOCK_FAIL : fail to take read lock for OTA/TLV-OTA file
320 *****************************************************************************/
321mcf_ota_result_e mcf_read_tlvota_buffer(kal_uint8 ps_id, mcf_tlvota_tag_t tag, nvram_lid_enum lid, kal_uint8 *buffer, kal_uint32 size);
322
323/*****************************************************************************
324 * FUNCTION
325 * mcf_read_tlvota_buffer_sbp_tag
326 * DESCRIPTION
327 * This function is used to query TLV-OTA file and get all data items with given LID and SBP tag.
328 * PARAMETERS
329 * tag [IN] ps_id
330 * sbp_tag [IN] SBP information
331 * lid [IN] NVRAM LID
332 * buffer [IN] destination buffer
333 * size [IN] buffer size
334 *
335 * RETURNS
336 * MCF_OTA_R_SUCCESS : process successfully
337 * MCF_OTA_R_MCF_NOT_SUPPORT : MCF is not supported
338 * MCF_OTA_R_VERSION_NOT_MATCH : LID version of OTA file is different from LID version in device
339 * MCF_OTA_R_WRONG_BUFFER_SIZE : given buffer size is different from LID record size
340 * MCF_OTA_R_INVALID_PARAMETER : invalid parameter
341 * MCF_OTA_R_READ_NVRAM_FAIL : fail to read NVRAM
342 * MCF_OTA_R_WRITE_NVRAM_FAIL : fail to write NVRAM
343 * MCF_OTA_R_READ_OTA_FILE_FAIL : fail to read OTA/TLV_OTA file
344 * MCF_OTA_R_INVALID_SBP_TAG : invalid SBP tag
345 * MCF_OTA_R_INVALID_FILE : invalid OTA/TLV-OTA file
346 * MCF_OTA_R_INVALID_ATTR : invalid NVRAM attribute
347 * MCF_OTA_R_TAKE_READ_LOCK_FAIL : fail to take read lock for OTA/TLV-OTA file
348 *****************************************************************************/
349mcf_ota_result_e mcf_read_tlvota_buffer_sbp_tag(kal_uint8 ps_id, mcf_tlvota_sbp_tag_t sbp_tag, nvram_lid_enum lid, kal_uint8 *buffer, kal_uint32 size);
350
351/*****************************************************************************
352 * FUNCTION
353 * mcf_read_nvram_and_tlvota_buffer_sbp_tag
354 * DESCRIPTION
355 * This function is used to read NVRAM LID, query TLV-OTA file and get all data items with given LID and SBP tag.
356 * PARAMETERS
357 * tag [IN] ps_id
358 * sbp_tag [IN] SBP information
359 * lid [IN] NVRAM LID
360 * record_idx [IN] NVRAM LID record index
361 * buffer [IN] destination buffer
362 * size [IN] buffer size
363 *
364 * RETURNS
365 * MCF_OTA_R_SUCCESS : process successfully
366 * MCF_OTA_R_MCF_NOT_SUPPORT : MCF is not supported
367 * MCF_OTA_R_VERSION_NOT_MATCH : LID version of OTA file is different from LID version in device
368 * MCF_OTA_R_WRONG_BUFFER_SIZE : given buffer size is different from LID record size
369 * MCF_OTA_R_INVALID_PARAMETER : invalid parameter
370 * MCF_OTA_R_READ_NVRAM_FAIL : fail to read NVRAM
371 * MCF_OTA_R_WRITE_NVRAM_FAIL : fail to write NVRAM
372 * MCF_OTA_R_READ_OTA_FILE_FAIL : fail to read OTA/TLV_OTA file
373 * MCF_OTA_R_INVALID_SBP_TAG : invalid SBP tag
374 * MCF_OTA_R_INVALID_FILE : invalid OTA/TLV-OTA file
375 * MCF_OTA_R_INVALID_ATTR : invalid NVRAM attribute
376 * MCF_OTA_R_TAKE_READ_LOCK_FAIL : fail to take read lock for OTA/TLV-OTA file
377 *****************************************************************************/
378mcf_ota_result_e mcf_read_nvram_and_tlvota_buffer_sbp_tag(kal_uint8 ps_id, mcf_tlvota_sbp_tag_t sbp_tag, nvram_lid_enum lid, kal_uint16 record_idx, kal_uint8 *buffer, kal_uint32 size);
379
380/*****************************************************************************
381 * FUNCTION
382 * mcf_auto_select_tlvota_file
383 * DESCRIPTION
384 * This function is used to read TLV-OTA file according to given sbp information.
385 * PARAMETERS
386 * param_ptr [IN] sbp parameter
387 *
388 * RETURNS
389 * KAL_TRUE : Success
390 * KAL_FALSE : Fail
391 *****************************************************************************/
392kal_bool mcf_auto_select_tlvota_file(sbp_reconfig_custom_param_struct *param_ptr);
393
394/*****************************************************************************
395 * FUNCTION
396 * mcf_check_lid_need_reset
397 * DESCRIPTION
398 * This function is used to query if LID is needed to be reset. If LID attribute is set to (NVRAM_ATTR_MCF_OTA or NVRAM_ATTR_MCF_OTA_FOR_QUERY)
399 * with NVRAM_ATTR_OTA_RESET and OTA file is updated, it will be stored in modified LID list.
400 * PARAMETERS
401 * param_ptr [IN] lid
402 *
403 * RETURNS
404 * KAL_TRUE : Success
405 * KAL_FALSE : Fail
406 *****************************************************************************/
407kal_bool mcf_check_lid_need_reset(nvram_lid_enum lid);
408
409/*****************************************************************************
410 * FUNCTION
411 * mcf_check_ota_need_update
412 * DESCRIPTION
413 * This function is used to check OTA file need update when same SIM insert. This detemine whether trigger dsbp.
414 * PARAMETERS
415 * ps_id [IN] protocol ID
416 * sbp_tag [IN] sbp parameter
417 * iccid [IN] iccid
418 *
419 * RETURNS
420 * KAL_TRUE : Success
421 * KAL_FALSE : Fail
422 *****************************************************************************/
423kal_bool mcf_check_ota_need_update(protocol_id_enum ps_id, mcf_tlvota_sbp_tag_t sbp_tag, kal_uint8* iccid);
424
425/*****************************************************************************
426 * FUNCTION
427 * mcf_set_config_after_dsbp
428 * DESCRIPTION
429 * This is called after dsbp user callback. This function is used to store mcf info into NVRAM.
430 * PARAMETERS
431 * ps_id [IN] protocol ID
432 *
433 *
434 * RETURNS
435 * KAL_TRUE : Success
436 * KAL_FALSE : Fail
437 *****************************************************************************/
438kal_bool mcf_set_config_after_dsbp(protocol_id_enum ps_id);
439
440/*****************************************************************************
441 * FUNCTION
442 * mcf_check_lid_need_reset_by_psid
443 * DESCRIPTION
444 * This function is used to query if LID is needed to be reset. If LID attribute is set to NVRAM_ATTR_MCF_OTA_BY_OP
445 * with NVRAM_ATTR_OTA_RESET and TLVOTA file is updated, it will be stored in modified LID list.
446 * PARAMETERS
447 * lid [IN] lid
448 * ps_id [IN] protocol id
449 *
450 * RETURNS
451 * KAL_TRUE : Success
452 * KAL_FALSE : Fail
453 *****************************************************************************/
454kal_bool mcf_check_lid_need_reset_by_psid (nvram_lid_enum lid, kal_uint8 ps_id);
455
456/*****************************************************************************
457 * FUNCTION
458 * mcf_check_reset_and_tlvota_buffer_sbp_tag
459 * DESCRIPTION
460 * This function is used to check LID needed to be reset, and query TLV-OTA file and get all data items with given LID and SBP tag.
461 * PARAMETERS
462 * ps_id [IN] ps_id
463 * sbp_tag [IN] SBP information
464 * lid [IN] NVRAM LID
465 * record_idx [IN] NVRAM LID record index
466 * buffer [IN] destination buffer
467 * size [IN] buffer size
468 * record_idx [IN] NVRAM LID record index
469 *
470 * RETURNS
471 * MCF_OTA_R_SUCCESS : process successfully
472 * MCF_OTA_R_MCF_NOT_SUPPORT : MCF is not supported
473 * MCF_OTA_R_VERSION_NOT_MATCH : LID version of OTA file is different from LID version in device
474 * MCF_OTA_R_WRONG_BUFFER_SIZE : given buffer size is different from LID record size
475 * MCF_OTA_R_INVALID_PARAMETER : invalid parameter
476 * MCF_OTA_R_READ_NVRAM_FAIL : fail to read NVRAM
477 * MCF_OTA_R_WRITE_NVRAM_FAIL : fail to write NVRAM
478 * MCF_OTA_R_READ_OTA_FILE_FAIL : fail to read OTA/TLV_OTA file
479 * MCF_OTA_R_INVALID_SBP_TAG : invalid SBP tag
480 * MCF_OTA_R_INVALID_FILE : invalid OTA/TLV-OTA file
481 * MCF_OTA_R_INVALID_ATTR : invalid NVRAM attribute
482 * MCF_OTA_R_TAKE_READ_LOCK_FAIL : fail to take read lock for OTA/TLV-OTA file
483 *****************************************************************************/
484mcf_ota_result_e mcf_check_reset_and_tlvota_buffer_sbp_tag (kal_uint8 ps_id, mcf_tlvota_sbp_tag_t sbp_tag, nvram_lid_enum lid , kal_uint8 *buffer, kal_uint32 size, kal_uint16 record_idx);
485
486/*****************************************************************************
487 * FUNCTION
488 * mcf_get_tlvota_file_result
489 * DESCRIPTION
490 * This function is used to check OTA file need update when same SIM insert. This detemine whether trigger dsbp.
491 * PARAMETERS
492 * ps_id [IN] protocol ID
493 *
494 * RETURNS
495 * MCF_OTA_R_SUCCESS : process successfully
496 * MCF_OTA_R_MCF_NOT_SUPPORT : MCF is not supported
497 * MCF_OTA_R_VERSION_NOT_MATCH : LID version of OTA file is different from LID version in device
498 * MCF_OTA_R_WRONG_BUFFER_SIZE : given buffer size is different from LID record size
499 * MCF_OTA_R_INVALID_PARAMETER : invalid parameter
500 * MCF_OTA_R_READ_NVRAM_FAIL : fail to read NVRAM
501 * MCF_OTA_R_WRITE_NVRAM_FAIL : fail to write NVRAM
502 * MCF_OTA_R_READ_OTA_FILE_FAIL : fail to read OTA/TLV_OTA file
503 * MCF_OTA_R_INVALID_SBP_TAG : invalid SBP tag
504 * MCF_OTA_R_INVALID_FILE : invalid OTA/TLV-OTA file
505 * MCF_OTA_R_INVALID_ATTR : invalid NVRAM attribute
506 * MCF_OTA_R_TAKE_READ_LOCK_FAIL : fail to take read lock for OTA/TLV-OTA file
507 *****************************************************************************/
508mcf_ota_result_e mcf_get_tlvota_file_result(protocol_id_enum ps_id);
509
510#endif /* __MCF_SUPPORT__ */
511#endif /* !GEN_FOR_PC */
512#endif /* !__MCF_IF_H */
513