yu.dong | c33b307 | 2024-08-21 23:14:49 -0700 | [diff] [blame^] | 1 | /***************************************************************************** |
| 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_defs.h |
| 40 | * |
| 41 | * Project: |
| 42 | * -------- |
| 43 | * UMOLYA |
| 44 | * |
| 45 | * Description: |
| 46 | * ------------ |
| 47 | * MD Configuration Framework internal configuration and data structure definition. |
| 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 | * removed! |
| 72 | * |
| 73 | * removed! |
| 74 | * removed! |
| 75 | * removed! |
| 76 | * removed! |
| 77 | * |
| 78 | * removed! |
| 79 | * removed! |
| 80 | * removed! |
| 81 | * |
| 82 | * removed! |
| 83 | * removed! |
| 84 | * removed! |
| 85 | * removed! |
| 86 | * |
| 87 | * removed! |
| 88 | * removed! |
| 89 | * removed! |
| 90 | * removed! |
| 91 | * |
| 92 | * removed! |
| 93 | * removed! |
| 94 | * removed! |
| 95 | * removed! |
| 96 | * |
| 97 | * removed! |
| 98 | * removed! |
| 99 | * removed! |
| 100 | * |
| 101 | * removed! |
| 102 | * removed! |
| 103 | * removed! |
| 104 | * |
| 105 | * removed! |
| 106 | * removed! |
| 107 | * removed! |
| 108 | * |
| 109 | * removed! |
| 110 | * removed! |
| 111 | * removed! |
| 112 | * removed! |
| 113 | * |
| 114 | * removed! |
| 115 | * removed! |
| 116 | * removed! |
| 117 | * removed! |
| 118 | * removed! |
| 119 | * removed! |
| 120 | * |
| 121 | * removed! |
| 122 | * removed! |
| 123 | * removed! |
| 124 | * |
| 125 | * removed! |
| 126 | * removed! |
| 127 | * removed! |
| 128 | * |
| 129 | * removed! |
| 130 | * removed! |
| 131 | * removed! |
| 132 | * |
| 133 | * removed! |
| 134 | * removed! |
| 135 | * removed! |
| 136 | * |
| 137 | * removed! |
| 138 | * removed! |
| 139 | * removed! |
| 140 | * removed! |
| 141 | * removed! |
| 142 | * removed! |
| 143 | * |
| 144 | * removed! |
| 145 | * removed! |
| 146 | * removed! |
| 147 | * removed! |
| 148 | * |
| 149 | * removed! |
| 150 | * removed! |
| 151 | * |
| 152 | * removed! |
| 153 | * removed! |
| 154 | * removed! |
| 155 | * |
| 156 | * removed! |
| 157 | * removed! |
| 158 | * removed! |
| 159 | * |
| 160 | * removed! |
| 161 | * removed! |
| 162 | * removed! |
| 163 | * |
| 164 | * removed! |
| 165 | * removed! |
| 166 | * removed! |
| 167 | * |
| 168 | * removed! |
| 169 | * removed! |
| 170 | * removed! |
| 171 | * |
| 172 | *------------------------------------------------------------------------------ |
| 173 | * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! |
| 174 | *============================================================================== |
| 175 | *******************************************************************************/ |
| 176 | #ifndef __INC_MCF_DEFS_H |
| 177 | #define __INC_MCF_DEFS_H |
| 178 | |
| 179 | #include "kal_public_api.h" |
| 180 | |
| 181 | #include "mcf_ut.h" |
| 182 | #include "mcf_utfwk.h" |
| 183 | |
| 184 | /*------------------------------------------------------------------------------ |
| 185 | * Configuration. |
| 186 | *----------------------------------------------------------------------------*/ |
| 187 | |
| 188 | /*------------------------------------------------------------------------------ |
| 189 | * Helper Macro. |
| 190 | *----------------------------------------------------------------------------*/ |
| 191 | |
| 192 | |
| 193 | /*------------------------------------------------------------------------------ |
| 194 | * Constant definition. |
| 195 | *----------------------------------------------------------------------------*/ |
| 196 | #define MCF_MAX_TAG_LEN 32 |
| 197 | |
| 198 | /* OTA/TLV-OTA file related definition */ |
| 199 | #define MCF_FILE_TYPE_OTA "OTA" |
| 200 | #define MCF_FILE_TYPE_TLVOTA "TLV-OTA" |
| 201 | #define MCF_FILE_TYPE_INI "INI" |
| 202 | #define MCF_FILE_MAX_TAG_LEN 256 |
| 203 | #define MCF_FILE_MAX_ARRAY_TAG_LEN 64 |
| 204 | |
| 205 | /* CCCIFS related definition */ |
| 206 | #if defined(__MTK_TARGET__) |
| 207 | #define MCF_FS_DEFAULT_FOLDER_PATH "T:" // AP: "/vendor/etc/mdota" |
| 208 | #else |
| 209 | #define MCF_FS_DEFAULT_FOLDER_PATH "..\\..\\WIN32FS\\mdota" // MoDIS: "WIN32FS\\mdota" |
| 210 | #endif |
| 211 | #define MCF_FS_DEFAULT_OTA_FILE_NAME "MTK_OTA.mcfota" |
| 212 | #define MCF_FS_DEFAULT_TLVOTA_FILE_NAME "MTK_OPOTA.mcfopota" |
| 213 | #define MCF_FS_CUSTOM_FOLDER_PATH "S:\\mdota" // AP: "/vendor/nvcfg/mdota" |
| 214 | #define MCF_FS_GENERAL_TLVOTA_FILE_NAME "MTK_OPOTA_GENERAL.mcfopota" |
| 215 | #define MCF_FS_TLVOTA_FILE_PREFIX "MTK_OPOTA_SBPID" |
| 216 | #define MCF_FS_DEFAULT_INI_FILE_NAME "MTK_MD_OTA_CONFIG.ini" |
| 217 | #define MCF_FS_DEFAULT_DUMP_FOLDER_NAME "MTK_LAST_DUMP_FOLDER_NAME.txt" |
| 218 | #define MCF_FS_DEFAULT_AT_CMD_RESULT "MTK_READ_WRITE_RESULT.txt" |
| 219 | #define MCF_FS_DEFAULT_OTA_MERGED_FILE_NAME "MTK_OTA_MERGED.mcfota" |
| 220 | #define MCF_FS_DEFAULT_TLVOTA_MERGED_FILE_NAME "MTK_OPOTA_MERGED.mcfopota" |
| 221 | #define MCF_FS_GENERAL_TLVOTA_MERGED_FILE_NAME "MTK_OPOTA_GENERAL_MERGED.mcfopota" |
| 222 | #define MCF_FS_DEFAULT_TLVOTA_MERGED_FILE_PREFIX "MTK_OPOTA_MERGED" |
| 223 | |
| 224 | /* MCF_BOOT_TRACE_F_XXXX is used in init stage trace */ |
| 225 | #define MCF_BOOT_TRACE_F_FULL_OTA_SUCCESS 0x00000001UL |
| 226 | #define MCF_BOOT_TRACE_F_FULL_OTA_FAIL 0x00000002UL |
| 227 | #define MCF_BOOT_TRACE_F_CUSTOM_FOLDER_EXIST 0x00000004UL |
| 228 | #define MCF_BOOT_TRACE_F_CREATE_CUSTOM_FOLDER_FAIL 0x00000008UL |
| 229 | #define MCF_BOOT_TRACE_F_READ_OTA_FILE_FAIL 0x00000010UL |
| 230 | #define MCF_BOOT_TRACE_F_OTA_FILE_OVERSIZE 0x00000020UL |
| 231 | #define MCF_BOOT_TRACE_F_READ_TLVOTA_FILE_FAIL 0x00000040UL |
| 232 | #define MCF_BOOT_TRACE_F_TLVOTA_FILE_OVERSIZE 0x00000080UL |
| 233 | #define MCF_BOOT_TRACE_F_READ_FILE_LID_FAIL 0x00000100UL |
| 234 | #define MCF_BOOT_TRACE_F_WRITE_FILE_LID_FAIL 0x00000200UL |
| 235 | #define MCF_BOOT_TRACE_F_READ_ITEM_LID_FAIL 0x00000400UL |
| 236 | #define MCF_BOOT_TRACE_F_WRITE_ITEM_LID_FAIL 0x00000800UL |
| 237 | #define MCF_BOOT_TRACE_F_READ_SW_INFO_LID_FAIL 0x00001000UL |
| 238 | #define MCF_BOOT_TRACE_F_WRITE_SW_INFO_LID_FAIL 0x00002000UL |
| 239 | #define MCF_BOOT_TRACE_F_NO_NEED 0x00004000UL |
| 240 | #define MCF_BOOT_TRACE_F_INVALID_FILE 0x00008000UL |
| 241 | #define MCF_BOOT_TRACE_F_TAKE_READ_LOCK_FAIL 0x00010000UL |
| 242 | #define MCF_BOOT_TRACE_F_TAKE_WRITE_LOCK_FAIL 0x00020000UL |
| 243 | #define MCF_BOOT_TRACE_F_DECRYPTION_FAIL 0x00040000UL |
| 244 | #define MCF_BOOT_TRACE_F_DIGEST_FAIL 0x00400000UL |
| 245 | #define MCF_BOOT_TRACE_F_CHECKSUM_ERROR 0x00080000UL |
| 246 | #define MCF_BOOT_TRACE_F_READ_INT_INFO_LID_FAIL 0x00100000UL |
| 247 | #define MCF_BOOT_TRACE_F_WRITE_INT_INFO_LID_FAIL 0x00200000UL |
| 248 | #define MCF_BOOT_TRACE_F_OPERATION_MASK_FAIL 0x00800000UL |
| 249 | |
| 250 | /* MCF object related definition */ |
| 251 | #define MCF_W_LOCK_OBJECT_SLEEP_TICKS KAL_TICKS_10_MSEC_REAL |
| 252 | #define MCF_DEL_OBJECT_SLEEP_TICKS KAL_TICKS_10_MSEC_REAL |
| 253 | #define MCF_LOCK_NAME "MCF_LOCK" |
| 254 | #define MCF_UTFWK_LOCK_NAME "MCF_UTFWK_LOCK" |
| 255 | |
| 256 | /* MCF dump related definition */ |
| 257 | #define MCF_DUMP_FOLDER_PREFIX "MCF_DUMP" |
| 258 | #define MCF_DUMP_FILE_PREFIX "MCF_DUMP_LID" |
| 259 | #define MCF_DUMP_FILE_POSTFIX ".dump" |
| 260 | #define MCF_DUMP_LID_HEADER_SIZE 32 // MUST lager than sizeof(mcf_dump_lid_header_struct) |
| 261 | #define MCF_DUMP_LID_SYNC_TOKEN "NV_RAW" |
| 262 | #define MCF_DUMP_LID_HEADER_VERSION 2 |
| 263 | |
| 264 | /*------------------------------------------------------------------------------ |
| 265 | * Internal data structure defintion. |
| 266 | *----------------------------------------------------------------------------*/ |
| 267 | |
| 268 | /*------------------------------------------------------------------------------ |
| 269 | * Global variables. |
| 270 | *----------------------------------------------------------------------------*/ |
| 271 | |
| 272 | /*------------------------------------------------------------------------------ |
| 273 | * Internal function prototype. |
| 274 | *----------------------------------------------------------------------------*/ |
| 275 | |
| 276 | #endif /* __INC_MCF_DEFS_H */ |
| 277 | |