blob: a766c0cb1b248c44bb449cd5e672c5112147f049 [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/*****************************************************************************
37 *
38 * Filename:
39 * ---------
40 * syscomp_config.h
41 *
42 * Project:
43 * --------
44 * Maui_Software
45 *
46 * Description:
47 * ------------
48 * The file contains declarations of system component module configuration
49 * variables, and routines.
50 *
51 * Author:
52 * -------
53 * -------
54 *
55 *============================================================================
56 * HISTORY
57 * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
58 *------------------------------------------------------------------------------
59 * removed!
60 * removed!
61 * removed!
62 *
63 * removed!
64 * removed!
65 * removed!
66 *
67 * removed!
68 * removed!
69 * removed!
70 *
71 * removed!
72 * removed!
73 * removed!
74 *
75 * removed!
76 * removed!
77 * removed!
78 *
79 * removed!
80 * removed!
81 * removed!
82 *
83 * removed!
84 * removed!
85 * removed!
86 *
87 * removed!
88 * removed!
89 * removed!
90 *
91 * removed!
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 * removed!
124 * removed!
125 * removed!
126 * removed!
127 * removed!
128 * removed!
129 * removed!
130 * removed!
131 *
132 * removed!
133 * removed!
134 * removed!
135 * removed!
136 * removed!
137 * removed!
138 *------------------------------------------------------------------------------
139 * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
140 *============================================================================
141 ****************************************************************************/
142
143#ifndef _SYSCOMP_CONFIG_H
144#define _SYSCOMP_CONFIG_H
145
146/*************************************************************************
147 * Include Header Files
148 *************************************************************************/
149
150#include "kal_general_types.h"
151#include "kal_public_defs.h"
152
153#include "stack_config.h"
154#include "stack_types.h"
155
156#include "hisr_config.h"
157
158#define TASK_NO_CREATE_PATTERN 0xF0F0F0F0
159// For FPU enable, we need extra 144 byte stack size for storing FPU context
160#ifdef __ARM_FPUV2__
161#define VFP_CONTEXT_SAVE_SPACE 144
162#else
163#define VFP_CONTEXT_SAVE_SPACE 0
164#endif
165/*On demand page will run some functions on task's stack*/
166#if defined(__ESL_COSIM_LTE__)
167#define VSPRINTF_STACK_SPACE 0x1000
168#define TASK_STACK_COMMON_PLUS (VFP_CONTEXT_SAVE_SPACE + VSPRINTF_STACK_SPACE)
169#define HISR_STACK_COMMON_PLUS (VFP_CONTEXT_SAVE_SPACE + VSPRINTF_STACK_SPACE)
170#else /* __ESL_COSIM_LTE__ */
171#define TASK_STACK_COMMON_PLUS (VFP_CONTEXT_SAVE_SPACE)
172#define HISR_STACK_COMMON_PLUS (VFP_CONTEXT_SAVE_SPACE)
173#endif /* __ESL_COSIM_LTE__ */
174
175/*************************************************************************
176* STRUCT
177* syscomp_info_struct
178*
179* DESCRIPTION
180* The structure defines component task configuration information
181*
182* FIELDS
183* comp_entry_func - component task's entry function
184* comp_cfg_func - component task's configurantion handler
185* comp_init_func - component task's initialization handler
186* comp_reset_func - component task's reset handler
187* comp_end_func - component task's termination handler
188* comp_modmain_func - component task's module main handler
189*
190* GLOBALS AFFECTED
191*
192*************************************************************************/
193typedef struct {
194 kal_task_func_ptr comp_entry_func;
195 task_init_func_ptr comp_init_func;
196 task_reset_func_ptr comp_reset_func;
197} comptask_handler_struct;
198
199typedef kal_bool (*kal_create_func_ptr)(comptask_handler_struct **);
200
201/*************************************************************************
202* STRUCT
203* comptask_info_struct
204*
205* DESCRIPTION
206* The structure defines component task configuration information
207*
208* FIELDS
209* comp_name_ptr - pointer to component task name
210* comp_qname_ptr - pointer to component task's external queue name
211* comp_priority - component task's priority
212* comp_stack_size - component task's stack size
213* comp_ext_qsize - component task's external queue size
214* comp_int_qsize - component task's internal queue size
215* comp_create_func- component entity's create function
216*
217* GLOBALS AFFECTED
218*
219*************************************************************************/
220typedef struct {
221 kal_char * comp_name_ptr;
222 kal_char * comp_qname_ptr;
223 kal_uint32 comp_priority;
224 kal_uint32 comp_stack_size;
225 kal_create_func_ptr comp_create_func;
226 kal_bool comp_internal_ram_stack;
227 kal_uint8 comp_ext_qsize;
228 kal_uint8 comp_int_qsize;
229 kal_uint8 comp_boot_mode;
230 kal_affinity_group comp_affinity_attribute;
231 kal_bool comp_affinity_dynamic;
232 kal_task_group_id comp_affinity_group_id;
233} comptask_info_struct;
234
235
236typedef struct {
237 kal_hisr index;
238 kal_uint8 priority;
239 kal_uint8 options;
240 kal_uint8 qsize;
241 kal_uint32 stack_size;
242 kal_hisr_func_ptr entry_func;
243 kal_char * hisr_name;
244 kal_affinity_group affinity_attribute;
245 kal_bool affinity_dynamic;
246} hisr_parameter_s;
247
248typedef struct {
249 kal_char * mof_name;
250} mof_info_struct;
251typedef enum {
252 INT_GROUP_0,
253 INT_GROUP_1,
254 INT_GROUP_2,
255 INT_GROUP_3,
256 INT_GROUP_4,
257 INT_GROUP_5,
258 INT_GROUP_6,
259 INT_GROUP_7,
260 INT_GROUP_8,
261 INT_GROUP_9,
262 INT_GROUP_10,
263 INT_GROUP_11,
264 INT_GROUP_12,
265 INT_GROUP_13,
266 INT_GROUP_14,
267 INT_GROUP_15,
268#if defined(__MD97__)
269 INT_GROUP_16,
270 INT_GROUP_17,
271 INT_GROUP_18,
272 INT_GROUP_19,
273 INT_GROUP_20,
274 INT_GROUP_21,
275 INT_GROUP_22,
276 INT_GROUP_23,
277 INT_GROUP_24,
278 INT_GROUP_25,
279 INT_GROUP_26,
280 INT_GROUP_27,
281 INT_GROUP_28,
282 INT_GROUP_29,
283 INT_GROUP_30,
284 INT_GROUP_31,
285#endif
286} irq_int_group_e;
287
288typedef enum {
289 DYNAMIC_TYPE,
290 BROADCAST_TYPE,
291} irq_type_e;
292
293typedef struct {
294 kal_uint32 irq_id;
295 irq_int_group_e irq_group;
296 irq_type_e irq_type;
297 irq_isr_hdlr_ptr irq_hdlr;
298 irq_init_func_ptr irq_init_func;
299 kal_bool irq_sensitivity;
300 kal_bool irq_unmask;
301 kal_uint8 isr_q_size;
302 kal_uint32 isr_mod_id;
303 kal_char * description;
304} isr_config_s;
305
306
307typedef struct {
308 kal_uint32 irq_id;
309 kal_uint8 wq_size;
310 void * wq_name;
311} isr_mtwq_s;
312
313
314typedef struct {
315 kal_uint32 task_index;
316 kal_task_clean_hdlr_ptr clean_hdlr;
317 kal_bool option;
318 kal_bool executed;
319} task_clean_s;
320
321
322/*************************************************************************
323* STRUCT
324* comp_range_s
325*
326* DESCRIPTION
327* The structure defines component task/MSG/SAP index max number and tail information
328*
329* FIELDS
330* comp_max - max number of task/MSG/SAP
331* comp_tail - tail of task/MSG/SAP
332*
333*************************************************************************/
334typedef struct {
335 kal_uint32 comp_max;
336 kal_uint32 comp_tail;
337} comp_range_s;
338
339
340#endif /* _SYSCOMP_CONFIG_H */