blob: d5a8d27f5b487b126f777224d1659e3e8ce0e2e8 [file] [log] [blame]
/*****************************************************************************
* 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:
* ---------
* syscomp_config.c
*
* Project:
* --------
* Maui_Software
*
* Description:
* ------------
* The file contains definition of system component module configuration
* variables, and routines.
*
* Author:
* -------
* -------
*
*============================================================================
* HISTORY
* Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*------------------------------------------------------------------------------
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
* removed!
*------------------------------------------------------------------------------
* Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*============================================================================
****************************************************************************/
/*************************************************************************
* Include Statements
*************************************************************************/
#include "syscomp_config.h"
#include "task_config.h"
#include "kal_general_types.h"
#include "stack_config.h"
#include "kal_public_defs.h"
#include "hisr_config.h"
#include "intrCtrl.h"
#include "ctrl_buff_pool.h"
#include "event_shed.h"
//#include "page.h"
#include "module_hisrid_range.h"
#include "kal_internal_def.h"
#include "module_id_range.h"
#define I_C_C_H_ // Ugly hack. Fix this.
#include "kal_os.h"
#include "kal_debug_common_defs.h"
#include "kal_internal_api.h"
#include "mof_config.h"
#undef TASK_PRIORITY_MACRO
#undef task_name
#undef task_queue_name
#undef task_priority
#undef task_stack_size
#undef null_task_create_entry
#undef compatible_code
#undef task_create_function
#undef task_stack_internalRAM
#undef task_external_queue_size
#undef task_internal_queue_size
#undef task_boot_mode
#undef task_affinity_group
#undef task_affinity_group_id
#undef MODULE_ID_MAP_TO_NULL_TASK_CAN_ALLOCATE_ILM
#undef MODULE_ID_FOR_PRINT_TRACE
#undef task_index
#undef task_module_map
/*Reset the macro in case of side effect*/
#define task_name(p1)
#define task_queue_name(p1)
#define task_priority(p1, p2)
#define task_stack_size(p1)
#define null_task_create_entry(p1)
#define compatible_code(p1)
#define task_stack_internalRAM(p1)
#define task_external_queue_size(p1)
#define task_internal_queue_size(p1)
#define task_boot_mode(p1)
#define task_affinity_group(p1)
#define task_affinity_group_id(p1)
#define MODULE_ID_MAP_TO_NULL_TASK_CAN_ALLOCATE_ILM(p1)
#define MODULE_ID_FOR_PRINT_TRACE(p1)
#define task_index(p1)
#define task_module_map(p1, p2)
#define task_create_function(task_create_entry) \
extern kal_bool task_create_entry(comptask_handler_struct **);
#include "srv_task_config.h"
#include "modem_2g3g_task_config.h"
#include "modem_4g_task_config.h"
#include "modem_5g_task_config.h"
#include "middleWare_task_config.h"
#include "drv_task_config.h"
#undef task_create_function
/*************************************************************************
* define global variables to replace config internal macro
* **********************************************************************/
const kal_uint32 total_stack_tasks = RPS_TOTAL_STACK_TASKS;
#if !defined(KTEST_RTOS_TEST)
const kal_uint32 total_stack_modules = RPS_TOTAL_STACK_MODULES;
#endif /*#if !defined(KTEST_RTOS_TEST) */
const kal_uint32 last_of_module_id = LAST_MOD_ID;
const kal_uint32 end_of_module_id = END_OF_MOD_ID;
/***********************************************************************/
#undef task_name
#undef task_queue_name
#undef task_priority
#undef task_stack_size
#undef null_task_create_entry
#undef compatible_code
#undef task_create_function
#undef task_stack_internalRAM
#undef task_external_queue_size
#undef task_internal_queue_size
#undef task_boot_mode
#undef task_affinity_group
#undef task_affinity_group_id
#undef MODULE_ID_MAP_TO_NULL_TASK_CAN_ALLOCATE_ILM
#undef MODULE_ID_FOR_PRINT_TRACE
#undef task_index
#undef task_module_map
#define task_name(p1)
#define task_queue_name(p1)
#define task_priority(p1, p2)
#define task_stack_size(p1)
#define null_task_create_entry(p1)
#define compatible_code(p1)
#define task_create_function(p1)
#define task_stack_internalRAM(p1)
#define task_external_queue_size(p1)
#define task_internal_queue_size(p1)
#define task_boot_mode(p1)
#define task_affinity_group(p1)
#define task_affinity_group_id(p1)
#define task_index(p1)
#define task_module_map(task, mod) task,
#define MODULE_ID_MAP_TO_NULL_TASK_CAN_ALLOCATE_ILM(p1) INDX_NIL,
#define MODULE_ID_FOR_PRINT_TRACE(p1) INDX_NIL,
#if !defined(KTEST_RTOS_TEST)
/**RPS_TOTAL_STACK_MODULES: boundary check when access mod_task_g*/
kal_uint32 mod_task_g[RPS_TOTAL_STACK_MODULES] = {
#include "srv_task_config.h"
#include "modem_2g3g_task_config.h"
#include "modem_4g_task_config.h"
#include "modem_5g_task_config.h"
#include "middleWare_task_config.h"
#include "drv_task_config.h"
};
#endif /*#if !defined(KTEST_RTOS_TEST) */
/*************************************************************************
* Total HISR number boundary check
* Don't use this array in your code
*************************************************************************/
/* if you change KAL_MAX_NUM_HISRS, please also modify INDX_NIL number in mod_task_g[]*/
/* if you change KAL_MAX_NUM_HISRS, please also modify MOD_ID_HISR_CODE_TAIL in MODULE_ID_TYPE*/
/* if you change KAL_MAX_NUM_HISRS, please also modify HISR_ID_CODE_MAX in HISR_ID_CODE_BEGIN*/
#define HISR_MOD_NUMBER (MOD_ID_HISR_CODE_TAIL - MOD_ID_HISR_CODE_BEGIN - 1)
typedef unsigned int hisr_mod_max_num_check1[HISR_MOD_NUMBER - KAL_MAX_NUM_HISRS
#if !defined(__MTK_TARGET__)
+ 1
#endif
];
typedef unsigned int hisr_mod_max_num_check2[KAL_MAX_NUM_HISRS - HISR_MOD_NUMBER
#if !defined(__MTK_TARGET__)
+ 1
#endif
];
#undef task_name
#undef task_queue_name
#undef task_priority
#undef task_stack_size
#undef task_create_function
#undef compatible_code
#undef null_task_create_entry
#undef task_stack_internalRAM
#undef task_external_queue_size
#undef task_internal_queue_size
#undef task_boot_mode
#undef task_affinity_group
#undef task_affinity_group_id
#undef MODULE_ID_MAP_TO_NULL_TASK_CAN_ALLOCATE_ILM
#undef MODULE_ID_FOR_PRINT_TRACE
#undef task_index
#undef task_module_map
#define task_index(p1)
#define task_module_map(p1, p2)
#define compatible_code(p1)
#define MODULE_ID_MAP_TO_NULL_TASK_CAN_ALLOCATE_ILM(p1)
#define MODULE_ID_FOR_PRINT_TRACE(p1)
/* clang-format off */
#define task_name(p1) {p1,
#define task_queue_name(p1) p1,
#define task_priority(p1, p2) ((p1<<16) | (p2 & 0x0000ffff)),
#define task_stack_size(p1) KAL_STACK_ALIGN(p1 + TASK_STACK_COMMON_PLUS),
#define null_task_create_entry(p1) (kal_create_func_ptr)TASK_NO_CREATE_PATTERN,
#define task_create_function(p1) p1,
#define task_stack_internalRAM(p1) p1,
#define task_external_queue_size(p1) p1,
#define task_internal_queue_size(p1) p1,
#define task_boot_mode(p1) p1,
#define task_affinity_group(p1) (p1)&(~AFFINITY_DYNAMIC), ((p1)&AFFINITY_DYNAMIC ? KAL_TRUE : KAL_FALSE),
#define task_affinity_group_id(p1) p1},
const comptask_info_struct sys_comp_config_tbl[] = {
#include "srv_task_config.h"
#include "modem_2g3g_task_config.h"
#include "modem_4g_task_config.h"
#include "modem_5g_task_config.h"
#include "middleWare_task_config.h"
#include "drv_task_config.h"
};
#define X_HISR_MOD(a,h)
#define X_HISR_CONST_WITH_AFFINITY(index, hisr_index, name, priority, stack, entry, option, affinity, queue_size) \
{index, priority, option, queue_size, KAL_STACK_ALIGN(stack + HISR_STACK_COMMON_PLUS), entry, name, (affinity)&(~AFFINITY_DYNAMIC), ((affinity)&AFFINITY_DYNAMIC ? KAL_TRUE : KAL_FALSE)},
const hisr_parameter_s hisr_info[] = {
#include "hisr_config_internal.h"
};
#undef X_HISR_CONST_WITH_AFFINITY
#undef X_HISR_MOD
/*for mof config */
#undef MOF_ID_MAP
#define MOF_ID_MAP(a,b) {a},
const mof_info_struct mof_array[]= {
#include "modem_mof_config.h"
};
#undef MOF_ID_MAP
/*to move kal_init_hisr from config folder ,we difine totol_hisr to avoid */
const kal_uint32 total_hisr_g = sizeof(hisr_info) / sizeof(hisr_parameter_s);
const kal_uint32 cfg_hisr_priority_max =
#if defined(KAL_ON_MERTOS)
3;
#else
0;
#endif
/* clang-format on */
#ifdef __MTK_TARGET__
#define X_TASK_CLEAN_CONST(index, handler, option) extern void handler(void);
#include "modem_task_clean_config.h"
#undef X_TASK_CLEAN_CONST
#define X_TASK_CLEAN_CONST(index, handler, option) \
{index, handler, option, KAL_FALSE},
task_clean_s task_clean[] = {
#include "modem_task_clean_config.h"
};
#undef X_TASK_CLEAN_CONST
const kal_uint32 total_task_clean_hdlrs = sizeof(task_clean) / sizeof(task_clean_s);
#else
const kal_uint32 total_task_clean_hdlrs = 0;
#endif
/*
*The following code is for sys_mem_gen.pl and should never be linked
*into the final bin. The following code is actually usefull for
*sys_mem_gen.pl
*/
typedef struct {
kal_uint32 buf_size;
kal_uint16 buf_num;
} buffer_size_s;
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
const buffer_size_s cfg_ctrl_buff[] = {
{CTRL_BUFF_POOL_SIZE32,
(NUM_CTRL_BUFF_POOL_SIZE32 + NUM_CUSTOM_CTRL_BUFF_POOL_SIZE32)},
{CTRL_BUFF_POOL_SIZE64,
(NUM_CTRL_BUFF_POOL_SIZE64 + NUM_CUSTOM_CTRL_BUFF_POOL_SIZE64)},
{CTRL_BUFF_POOL_SIZE128,
(NUM_CTRL_BUFF_POOL_SIZE128 + NUM_CUSTOM_CTRL_BUFF_POOL_SIZE128)},
{CTRL_BUFF_POOL_SIZE256,
(NUM_CTRL_BUFF_POOL_SIZE256 + NUM_CUSTOM_CTRL_BUFF_POOL_SIZE256)},
{CTRL_BUFF_POOL_SIZE512,
(NUM_CTRL_BUFF_POOL_SIZE512 + NUM_CUSTOM_CTRL_BUFF_POOL_SIZE512)},
{CTRL_BUFF_POOL_SIZE1024,
(NUM_CTRL_BUFF_POOL_SIZE1024 + NUM_CUSTOM_CTRL_BUFF_POOL_SIZE1024)},
{CTRL_BUFF_POOL_SIZE2048,
(NUM_CTRL_BUFF_POOL_SIZE2048 + NUM_CUSTOM_CTRL_BUFF_POOL_SIZE2048)},
{CTRL_BUFF_POOL_SIZE4096,
(NUM_CTRL_BUFF_POOL_SIZE4096 + NUM_CUSTOM_CTRL_BUFF_POOL_SIZE4096)},
#if defined(__UMTS_RAT__) || defined(__LTE_RAT__)
{CTRL_BUFF_POOL_SIZE8192,
(NUM_CTRL_BUFF_POOL_SIZE8192 + NUM_CUSTOM_CTRL_BUFF_POOL_SIZE8192)},
{CTRL_BUFF_POOL_SIZE16384,
(NUM_CTRL_BUFF_POOL_SIZE16384 + NUM_CUSTOM_CTRL_BUFF_POOL_SIZE16384)},
{CTRL_BUFF_POOL_SIZE32768,
(NUM_CTRL_BUFF_POOL_SIZE32768 + NUM_CUSTOM_CTRL_BUFF_POOL_SIZE32768)},
{CTRL_BUFF_POOL_SIZE65536,
(NUM_CTRL_BUFF_POOL_SIZE65536 + NUM_CUSTOM_CTRL_BUFF_POOL_SIZE65536)},
{CTRL_BUFF_POOL_SIZE100000,
(NUM_CTRL_BUFF_POOL_SIZE100000 + NUM_CUSTOM_CTRL_BUFF_POOL_SIZE100000)},
#endif
};
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
const kal_uint32 cfg_sys_vpe_num = SYS_MCU_NUM_VPE;
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
#if defined(__CS_SERVICE__) && defined(__PS_SERVICE__)
const buffer_size_s cfg_data_buff[] = {
{0, 0},
};
#else
const buffer_size_s cfg_data_buff[] = {
{0, 0},
};
#endif
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
const kal_uint32 cfg_itc_cb_size = sizeof(kal_itc_lock_s);
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
const kal_uint32 cfg_itc_num_max = KAL_ITC_CORE012_SYNC + 1;
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
const buffer_size_s cfg_event_buff[] = {
{sizeof(struct event), KAL_MIN_EVSHED_BUFF_NUM},
};
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
const buffer_size_s cfg_module_number[] = {
{sizeof(struct ilm_struct), RPS_TOTAL_STACK_MODULES},
};
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
#ifdef __SYS_INTERN_RAM__
const kal_uint32 sys_internal_ram_defined = 1;
#else
const kal_uint32 sys_internal_ram_defined = 0;
#endif
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
#ifdef DEBUG_BUF2
const kal_uint32 debug_buf2 = 1;
#else
const kal_uint32 debug_buf2 = 0;
#endif
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
#if defined(__LOW_COST_SUPPORT_ULC__)
const kal_uint32 cfg_low_cost_support = 2;
#else
const kal_uint32 cfg_low_cost_support = 0;
#endif
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
#if (GEMINI_PLUS >= 4)
const kal_uint32 cfg_gemini = 4;
#elif (GEMINI_PLUS >= 3)
const kal_uint32 cfg_gemini = 3;
#elif (GEMINI_PLUS >= 2)
const kal_uint32 cfg_gemini = 2;
#else
const kal_uint32 cfg_gemini = 1;
#endif
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
//XXX stack isolation
#if defined(__KAL_STACK_ISOLATION__)
const kal_uint32 stack_isolation = 1;
#else
const kal_uint32 stack_isolation = 0;
#endif
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
#if defined(__ARM9_MMU__)
const kal_uint32 page_size = 1024;
#elif defined(__ARM11_MMU__)
const kal_uint32 page_size = 4096;
#else
const kal_uint32 page_size = 4096;
#endif
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
const kal_uint32 task_stack_common_plus = TASK_STACK_COMMON_PLUS;
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
#ifdef __UMTS_RAT__
const kal_uint32 cfg_3G_FSM = 1;
#else
const kal_uint32 cfg_3G_FSM = 0;
#endif
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
const kal_uint32 cfg_task_info_g_size = sizeof(task_info_struct);
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
const kal_uint32 cfg_sys_comp_config_tbl_size = sizeof(comptask_info_struct);
#ifdef __MTK_TARGET__
__attribute__ ((section ("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
const kal_uint32 cfg_affinity_group_size = sizeof( kal_affinity_group );
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
const kal_uint32 cfg_hisr_info_size = sizeof(hisr_parameter_s);
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
const kal_uint32 cfg_task_cb_size = sizeof(kal_task_type);
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
const kal_uint32 cfg_hisr_cb_size = sizeof(kal_hisr_type);
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
const kal_uint32 cfg_ext_queue_head = sizeof(kal_queue_type);
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
const kal_uint32 cfg_ilm_struct = sizeof(ilm_struct);
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
const kal_uint32 cfg_max_custom_tasks = MAX_CUSTOM_TASKS;
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
#if defined(DEBUG_KAL) && defined(DEBUG_ITC)
const kal_uint32 cfg_kal_queue_stat_type =
sizeof(struct kal_int_queue_statistics_struct);
#else
const kal_uint32 cfg_kal_queue_stat_type = 0;
#endif
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
const kal_uint32 cfg_no_create_task = TASK_NO_CREATE_PATTERN;
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
const kal_uint32 cfg_ctrl_buff_overhead = KAL_TOTAL_BUFF_OVERHEAD;
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
const kal_uint32 cfg_pool_cb_size = sizeof(struct kal_int_pool_struct);
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
#if defined(DEBUG_KAL) && (defined(DEBUG_BUF2) || defined(DEBUG_BUF1))
const kal_uint32 cfg_pool_stat_size = sizeof(struct kal_int_pool_statistics_struct);
#else
const kal_uint32 cfg_pool_stat_size = 0;
#endif
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
#if defined(DEBUG_BUF3) && defined(__MTK_TARGET__)
const kal_uint32 cfg_int_buff_callstack = sizeof(struct kal_int_buff_callstack);
#else
const kal_uint32 cfg_int_buff_callstack = 0;
#endif
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
const kal_uint32 cfg_os_buff_overhead = KAL_OS_BUFF_OVERHEAD;
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
const kal_uint32 cfg_normal_mode = NORMAL_M;
const kal_uint32 cfg_factory_mode = FACTORY_M;
#if defined(DEBUG_KAL) && defined(DEBUG_BUF2)
#ifdef KAL_ON_OSCAR
/*Visual C++ have different alignment assumption from RVCT*/
const kal_uint32 cfg_buff_stat = sizeof(struct kal_int_buff_stats) + 20;
#else
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
const kal_uint32 cfg_buff_stat = sizeof(struct kal_int_buff_stats);
#endif
#else
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
const kal_uint32 cfg_buff_stat = 4;
#endif
#if defined(KAL_HISR_STACK_SHARING)
const kal_uint32 cfg_hisr_stack_share = 1;
#else
const kal_uint32 cfg_hisr_stack_share = 0;
#endif
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
const kal_uint8 cfg_irq_priority_list[] = {
#if defined(__MD95__)
0, 0, 0 /*do not use*/
#elif defined(__MD97__)
0, 0, 0 /*do not use*/
#else
INTERRUPT_PRIORITY_LIST
#endif
};
#ifdef __MTK_TARGET__
__attribute__((section("SHOULD_NOT_USED_RODATA")))
#endif /* __MTK_TARGET__ */
const comp_range_s cfg_task_range_check_tbl[] = {
/* task max task tail */
{(TASK_ID_MODEM_2G3G_CODE_BEGIN - 1), TASK_ID_SRV_CODE_TAIL},
{(TASK_ID_MODEM_4G_CODE_BEGIN - 1), TASK_ID_MODEM_2G3G_CODE_TAIL},
{(TASK_ID_MODEM_5G_CODE_BEGIN - 1), TASK_ID_MODEM_4G_CODE_TAIL},
{(TASK_ID_MW_CODE_BEGIN - 1), TASK_ID_MODEM_5G_CODE_TAIL},
{(TASK_ID_DRV_CODE_BEGIN - 1), TASK_ID_MW_CODE_TAIL},
{(TASK_ID_CODE_MAX), TASK_ID_DRV_CODE_TAIL}};
#if defined(__MTK_TARGET__) || defined (__ESL_MASE_GEN97__)
/* for IRQ and IRQ Handler general config */
//void irq_isr_dummy(void){return;}
#undef NULL
#define NULL MDCIRQ_IRQ_Default_LISR
#define SS_ASSIGN 0
#define X_ISR_MTWQ(a,b,c)
#define X_ISR_CONST(irq_id, affinity, irq_type, irq_handler, irq_init_func, sensitivity, option, queue_size, mod_id, description) \
extern void irq_init_func(kal_uint32) DECLARE_WEAK; \
extern void irq_handler(kal_uint32) DECLARE_WEAK;
#include "modem_isr_config.h"
#undef X_ISR_CONST
#undef X_ISR_MTWQ
#define X_ISR_MTWQ(a,b,c)
#define X_ISR_CONST(irq_id, affinity, irq_type, irq_handler, irq_init_func, sensitivity, option, queue_size, mod_id, description) \
{irq_id, affinity, irq_type, irq_handler, irq_init_func, sensitivity, option, queue_size, mod_id, description},
const isr_config_s isr_config_tbl[] = {
#include "modem_isr_config.h"
};
#undef X_ISR_CONST
#undef X_ISR_MTWQ
#undef NULL
#define NULL 0
const kal_uint32 total_isr_config = sizeof(isr_config_tbl) / sizeof(isr_config_s);
#else
const isr_config_s isr_config_tbl[] = {0};
const kal_uint32 total_isr_config = 0;
#endif