| /***************************************************************************** |
| * 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: |
| * --------- |
| * |
| * |
| * Project: |
| * -------- |
| * MAUI |
| * |
| * Description: |
| * ------------ |
| * |
| * |
| * Author: |
| * ------- |
| * |
| * |
| *============================================================================ |
| ****************************************************************************/ |
| #ifndef __SIM_NVRAM_DEF_H__ |
| #define __SIM_NVRAM_DEF_H__ |
| |
| #ifdef __cplusplus |
| extern "C" |
| { |
| #endif /* __cplusplus */ |
| |
| |
| #include "nvram_defs.h" |
| #include "nvram_enums.h" |
| #include "ps_public_enum.h" |
| #include "device.h" |
| #include "sim_public_enum.h" |
| |
| // LID Enums |
| |
| typedef enum |
| { |
| NVRAM_EF_SIM_ASSERT_LID = NVRAM_LID_GRP_SIM(0), // __REL10__: t3346 |
| NVRAM_EF_TEST_SIM_LID = NVRAM_LID_GRP_SIM(1), |
| NVRAM_EF_REGISTRATION_MODE_LID = NVRAM_LID_GRP_SIM(2), /* ERMODE */ |
| NVRAM_EF_SIM_PROFILE_LID = NVRAM_LID_GRP_SIM(3), |
| NVRAM_EF_SIM_DISABLE_SLOT_BITMASK_LID = NVRAM_LID_GRP_SIM(4), |
| NVRAM_EF_SIM_DISABLE_ICCID_LIST_LID = NVRAM_LID_GRP_SIM(5), |
| NVRAM_EF_SIM_FAKE_IMSI_LID = NVRAM_LID_GRP_SIM(6), |
| #ifdef __SIM_TERMINAL_CAP__ |
| NVRAM_EF_SIM_TERMINAL_CAPABILITY_LID = NVRAM_LID_GRP_SIM(7), |
| #endif |
| #ifdef __SIM_RECOVERY_SWITCH__ |
| NVRAM_EF_SIM_HOTSWAPOFF_RECOVEROFF_LID = NVRAM_LID_GRP_SIM(9), |
| #endif |
| NVRAM_EF_SIM_RESTRICT_CARD_TYPE_LID = NVRAM_LID_GRP_SIM(11), |
| NVRAM_EF_SIM_FAKE_GID1_LID = NVRAM_LID_GRP_SIM(12), |
| #if defined(__ECALL_SUPPORT__) || defined(__NG_ECALL_SUPPORT__) |
| NVRAM_EF_SIM_ECALL_MODE_SWITCH_LID = NVRAM_LID_GRP_SIM(14), |
| #endif |
| NVRAM_EF_SIM_LAST_LID = NVRAM_LID_GRP_SIM(63) |
| }nvram_lid_sim_enum; |
| |
| /* NVRAM_EF_SIM_ASSERT_LID */ |
| #define NVRAM_EF_SIM_ASSERT_LID_VERNO "000" |
| #define NVRAM_EF_SIM_ASSERT_LID_HASH 0xF18F3E9C |
| |
| /* NVRAM_EF_TEST_SIM_LID */ |
| #define NVRAM_EF_TEST_SIM_LID_VERNO "001" |
| #define NVRAM_EF_TEST_SIM_LID_HASH 0x29F3CB9C |
| |
| /* NVRAM_EF_REGISTRATION_MODE_LID, for SBP_KOR_CUSTOMIZATION */ |
| #define NVRAM_EF_REGISTRATION_MODE_LID_VERNO "000" |
| #define NVRAM_EF_REGISTRATION_MODE_LID_HASH 0x7871C9B3 |
| |
| /* NVRAM_EF_SIM_PROFILE_LID */ |
| #define NVRAM_EF_SIM_PROFILE_LID_VERNO "003" |
| #define NVRAM_EF_SIM_PROFILE_LID_HASH 0x47EF6F87 |
| |
| /* NVRAM_EF_SIM_DISABLE_SLOT_BITMASK_LID */ |
| #define NVRAM_EF_SIM_DISABLE_ICCID_LIST_LID_VERNO "000" |
| #define NVRAM_EF_SIM_DISABLE_SLOT_BITMASK_LID_HASH 0xC1F0B496 |
| |
| /* NVRAM_EF_SIM_DISABLE_ICCID_LIST_LID */ |
| #define NVRAM_EF_SIM_DISABLE_SLOT_BITMASK_LID_VERNO "000" |
| #define NVRAM_EF_SIM_DISABLE_ICCID_LIST_LID_HASH 0x2D1F758B |
| |
| #ifdef __FAKEID_SUPPORT__ |
| /* NVRAM_EF_SIM_FAKE_IMSI_LID */ |
| #define NVRAM_EF_SIM_FAKE_IMSI_LID_VERNO "000" |
| #define NVRAM_EF_SIM_FAKE_IMSI_LID_HASH 0xB62EE911 |
| #endif |
| |
| #ifdef __SIM_TERMINAL_CAP__ |
| // Size and Total |
| /* NVRAM_EF_SIM_TERMINAL_CAPABILITY_LID */ |
| #define NVRAM_EF_SIM_TERMINAL_CAPABILITY_LID_VERNO "000" |
| #define NVRAM_EF_SIM_TERMINAL_CAPABILITY_LID_HASH 0xB9055DE6 |
| #endif |
| |
| #ifdef __SIM_RECOVERY_SWITCH__ |
| // Size and Total |
| /* NVRAM_EF_SIM_HOTSWAPOFF_RECOVEROFF_LID */ |
| #define NVRAM_EF_SIM_HOTSWAPOFF_RECOVEROFF_LID_VERNO "000" |
| #define NVRAM_EF_SIM_HOTSWAPOFF_RECOVEROFF_LID_HASH 0x599F4618 |
| #endif |
| |
| #ifdef __FAKEID_SUPPORT__ |
| /* NVRAM_EF_SIM_FAKE_GID1_LID */ |
| #define NVRAM_EF_SIM_FAKE_GID1_LID_VERNO "000" |
| #define NVRAM_EF_SIM_FAKE_GID1_LID_HASH 0x9AAEC05E |
| #endif |
| |
| // Size and Total |
| #define NVRAM_EF_SIM_RESTRICT_CARD_TYPE_LID_VERNO "000" |
| #define NVRAM_EF_SIM_RESTRICT_CARD_TYPE_LID_HASH 0x8730A2AC |
| |
| #if defined(__ECALL_SUPPORT__) || defined(__NG_ECALL_SUPPORT__) |
| // Size and Total |
| /* NVRAM_EF_SIM_ECALL_MODE_SWITCH_LID, for SBP_ECALL_MODE_SWITCH */ |
| #define NVRAM_EF_SIM_ECALL_MODE_SWITCH_LID_VERNO "000" |
| #define NVRAM_EF_SIM_ECALL_MODE_SWITCH_LID_HASH 0x0B89E19F |
| #endif |
| |
| /* |
| * SIM log |
| */ |
| #define NVRAM_EF_SIM_ASSERT_SIZE 16 |
| #define NVRAM_EF_SIM_ASSERT_TOTAL 80 |
| |
| |
| typedef struct{ |
| kal_uint8 test_sim; |
| }nvram_test_sim_struct; |
| |
| #define NVRAM_EF_TEST_SIM_TOTAL 1 |
| #define NVRAM_EF_TEST_SIM_SIZE sizeof(nvram_test_sim_struct) |
| |
| |
| typedef struct{ |
| kal_uint8 nvram_sim_profile[MAX_SIM_PROFILE_LEN]; |
| }nvram_ef_sim_profile_struct; |
| |
| #define NVRAM_EF_SIM_PROFILE_TOTAL (1 * NVRAM_DUAL_RECORD) |
| #define NVRAM_EF_SIM_PROFILE_SIZE sizeof(nvram_ef_sim_profile_struct) |
| |
| |
| /* ERMODE */ |
| typedef struct |
| { |
| kal_uint8 registration_mode; |
| }nvram_ef_registration_mode_struct; |
| #define NVRAM_EF_REGISTRATION_MODE_TOTAL (1 * NVRAM_DUAL_RECORD) |
| #define NVRAM_EF_REGISTRATION_MODE_SIZE sizeof(nvram_ef_registration_mode_struct) |
| |
| |
| typedef struct{ |
| kal_uint8 off_slot_bitmask; |
| }nvram_disable_slot_bitmask_struct; |
| |
| #define NVRAM_EF_SIM_DISABLE_SLOT_BITMASK_TOTAL 1 |
| #define NVRAM_EF_SIM_DISABLE_SLOT_BITMASK_SIZE sizeof(nvram_disable_slot_bitmask_struct) |
| |
| #define SIM_MAX_DISABLED_ICCID_REC_NUM 20 |
| |
| |
| typedef struct{ |
| kal_uint8 iccid_list[10*SIM_MAX_DISABLED_ICCID_REC_NUM]; /* ciphered ICCID */ |
| } nvram_disable_iccid_list_struct; |
| |
| #define NVRAM_EF_SIM_DISABLE_ICCID_LIST_TOTAL 1 |
| #define NVRAM_EF_SIM_DISABLE_ICCID_LIST_SIZE sizeof(nvram_disable_iccid_list_struct) |
| |
| |
| #ifdef __FAKEID_SUPPORT__ |
| typedef struct |
| { |
| kal_uint8 fake_mnc_length; |
| kal_uint8 fake_imsi[9]; |
| } nvram_fake_imsi_struct; |
| |
| #define NVRAM_EF_FAKE_IMSI_TOTAL (1 * NVRAM_DUAL_RECORD) |
| #define NVRAM_EF_FAKE_IMSI_SIZE sizeof(nvram_fake_imsi_struct) |
| #endif |
| #ifdef __SIM_TERMINAL_CAP__ |
| typedef struct{ |
| kal_uint8 tlv_list_length; |
| kal_uint8 tlv_objects[255]; |
| }nvram_terminal_capability_objects_struct; |
| |
| #define NVRAM_EF_SIM_TERMINAL_CAPABILITY_TOTAL (1 * NVRAM_DUAL_RECORD) |
| #define NVRAM_EF_SIM_TERMINAL_CAPABILITY_SIZE sizeof(nvram_terminal_capability_objects_struct) |
| #endif |
| |
| #ifdef __SIM_RECOVERY_SWITCH__ |
| typedef struct{ |
| kal_uint8 sim_hotswapoff; |
| kal_uint8 sim_recoveroff; |
| }nvram_hotswapoff_recoveroff_objects_struct; |
| |
| #define NVRAM_EF_SIM_HOTSWAPOFF_RECOVEROFF_TOTAL (1 * NVRAM_DUAL_RECORD) |
| #define NVRAM_EF_SIM_HOTSWAPOFF_RECOVEROFF_SIZE sizeof(nvram_hotswapoff_recoveroff_objects_struct) |
| #endif |
| |
| typedef struct |
| { |
| kal_uint8 control; |
| sim_restrict_card_type_enum card_type; |
| } nvram_sim_restrict_card_type_object_struct; |
| |
| #define NVRAM_EF_SIM_RESTRICT_CARD_TYPE_TOTAL 1 |
| #define NVRAM_EF_SIM_RESTRICT_CARD_TYPE_SIZE sizeof(nvram_sim_restrict_card_type_object_struct) |
| |
| #ifdef __FAKEID_SUPPORT__ |
| typedef struct |
| { |
| kal_uint8 fake_gid1_length; |
| kal_uint8 fake_gid1[20]; |
| } nvram_fake_gid1_struct; |
| |
| #define NVRAM_EF_FAKE_GID1_TOTAL (1 * NVRAM_DUAL_RECORD) |
| #define NVRAM_EF_FAKE_GID1_SIZE sizeof(nvram_fake_gid1_struct) |
| #endif |
| |
| #if defined(__ECALL_SUPPORT__) || defined(__NG_ECALL_SUPPORT__) |
| typedef struct |
| { |
| sim_ecall_mode_enum ecall_mode; |
| } nvram_sim_ecall_mode_switch_object_struct; |
| |
| #define NVRAM_EF_SIM_ECALL_MODE_SWITCH_TOTAL (1 * NVRAM_DUAL_RECORD) |
| #define NVRAM_EF_SIM_ECALL_MODE_SWITCH_SIZE sizeof(nvram_sim_ecall_mode_switch_object_struct) |
| #endif |
| |
| #ifdef __cplusplus |
| } |
| #endif |
| |
| #endif /* __SIM_NVRAM_DEF_H__ */ |