comparison gpf/conf/barecomp.c @ 0:75a11d740a02

initial import of gsm-fw from freecalypso-sw rev 1033:5ab737ac3ad7
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 09 Jun 2016 00:02:41 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:75a11d740a02
1 /*
2 * If we are building a configuration with just "bare" GPF, plus maybe L1,
3 * but no GSM or GPRS L23 stack, then this bare{comp.c,const.h} config
4 * takes the place of gsm* or gprs*.
5 *
6 * This barecomp.c configuration has been made from gprscomp.c, the
7 * one actually used in the working leo2moko reference.
8 */
9
10 #include "../../include/config.h"
11 #include "gpfconf.h"
12
13 #define CONFIG_MODULE 1
14
15 #ifndef _TARGET_
16 #define NEW_ENTITY
17 #endif
18
19 /*==== INCLUDES ===================================================*/
20
21 #include "../../nucleus/nucleus.h"
22 #include "typedefs.h"
23 #include "os.h"
24 #include "vsi.h"
25 #include "pei.h"
26 #include "bareconst.h"
27 #include "frm_defs.h"
28 #include "frm_types.h"
29 #include "frm_glob.h"
30 #include "os_types.h"
31 #include "os_glob.h"
32
33 /*==== CONSTANTS ==================================================*/
34
35
36 /*==== EXTERNALS ==================================================*/
37
38 extern SHORT tstrcv_pei_create(T_PEI_INFO const **Info);
39 extern SHORT tstsnd_pei_create(T_PEI_INFO const **Info);
40
41 #if CONFIG_L1_STANDALONE
42 extern SHORT l1_pei_create (T_PEI_INFO const **Info);
43 extern SHORT l1stand_fwd_pei_create (T_PEI_INFO const **info);
44 #endif
45
46 /*==== VARIABLES ==================================================*/
47
48 //EF For normal Test Definition Language (TDL) TAP usage set newTstHeader = FALSE
49 //EF For multiple entity (TCSL) Test Case Script Lang. set newTstHeader = TRUE
50 #ifndef _TARGET_
51
52 #ifdef TDL_TAP
53 BOOL newTstHeader = FALSE;
54 #else
55 BOOL newTstHeader = TRUE;
56 #endif
57
58 #endif
59
60 const T_COMPONENT_ADDRESS tstrcv_list[] =
61 {
62 { tstrcv_pei_create, NULL, ASSIGNED_BY_TI },
63 { NULL, NULL, 0 }
64 };
65
66 const T_COMPONENT_ADDRESS tstsnd_list[] =
67 {
68 { tstsnd_pei_create, NULL, ASSIGNED_BY_TI },
69 { NULL, NULL, 0 }
70 };
71
72 #if CONFIG_L1_STANDALONE
73 const T_COMPONENT_ADDRESS l1fwd_list[] =
74 {
75 { l1stand_fwd_pei_create, NULL, ASSIGNED_BY_TI },
76 { NULL, NULL, 0 }
77 };
78
79 const T_COMPONENT_ADDRESS l1_list[] =
80 {
81 { l1_pei_create, NULL, ASSIGNED_BY_TI },
82 { NULL, NULL, 0 }
83 };
84 #endif
85
86 const T_COMPONENT_ADDRESS *ComponentTables[]=
87 {
88 tstrcv_list,
89 tstsnd_list,
90 #if CONFIG_L1_STANDALONE
91 l1fwd_list,
92 l1_list,
93 #endif
94 NULL
95 };
96
97 /*==== VERSIONS ===================================================*/
98 #ifndef CTRACE
99 char * str2ind_version = "&0";
100 #endif
101
102 /*==== MEMORY CONFIGURATION =======================================*/
103
104 /*
105 * Partitions pool configuration for primitive communication
106 */
107
108 /*
109 * Memory extensions for multiplexer
110 */
111 #ifdef FF_MUX
112 #define PRIMPOOL_0_MUX_ADDITION 30
113 #define PRIMPOOL_2_MUX_ADDITION 10
114 #else /* FF_MUX */
115 #define PRIMPOOL_0_MUX_ADDITION 0
116 #define PRIMPOOL_2_MUX_ADDITION 0
117 #endif /* else FF_MUX */
118
119 /*
120 * Memory extensions for multiple PDP contexts
121 */
122 #ifdef FF_PKTIO
123 #define PRIMPOOL_2_MPDP_ADDITION 30
124 #else /* FF_PKTIO */
125 #define PRIMPOOL_2_MPDP_ADDITION 0
126 #endif /* else FF_PKTIO */
127 #ifdef WIN32
128 /*
129 * Required for testing LLC acknowledged mode.
130 */
131 #define PRIMPOOL_0_PARTITIONS 200
132 #define PRIMPOOL_1_PARTITIONS 100
133 #define PRIMPOOL_2_PARTITIONS 20
134 #define PRIMPOOL_3_PARTITIONS 20
135
136 #else /*WIN32*/
137
138 #define PRIMPOOL_0_PARTITIONS (190 + PRIMPOOL_0_MUX_ADDITION)
139 #define PRIMPOOL_1_PARTITIONS 110
140 #define PRIMPOOL_2_PARTITIONS ( 50 + PRIMPOOL_2_MPDP_ADDITION + PRIMPOOL_2_MUX_ADDITION)
141 #define PRIMPOOL_3_PARTITIONS 7
142
143 #endif /*WIN32*/
144
145 #define PRIM_PARTITION_0_SIZE 60
146 #define PRIM_PARTITION_1_SIZE 128
147 #define PRIM_PARTITION_2_SIZE 632
148 #define PRIM_PARTITION_3_SIZE 1600
149
150 #ifndef DATA_INT_RAM
151 unsigned int MaxPrimPartSize = PRIM_PARTITION_3_SIZE;
152 #endif /* !DATA_INT_RAM */
153
154 char pool10 [ POOL_SIZE(PRIMPOOL_0_PARTITIONS,ALIGN_SIZE(PRIM_PARTITION_0_SIZE)) ] __attribute__ ((section ("int.ram")));
155
156 char pool11 [ POOL_SIZE(PRIMPOOL_1_PARTITIONS,ALIGN_SIZE(PRIM_PARTITION_1_SIZE)) ] __attribute__ ((section ("int.ram")));
157
158 char pool12 [ POOL_SIZE(PRIMPOOL_2_PARTITIONS,ALIGN_SIZE(PRIM_PARTITION_2_SIZE)) ] __attribute__ ((section ("int.ram")));
159
160 char pool13 [ POOL_SIZE(PRIMPOOL_3_PARTITIONS,ALIGN_SIZE(PRIM_PARTITION_3_SIZE)) ] __attribute__ ((section ("int.ram")));
161
162 const T_FRM_PARTITION_POOL_CONFIG prim_grp_config[] =
163 {
164 { PRIMPOOL_0_PARTITIONS, ALIGN_SIZE(PRIM_PARTITION_0_SIZE), &pool10 },
165 { PRIMPOOL_1_PARTITIONS, ALIGN_SIZE(PRIM_PARTITION_1_SIZE), &pool11 },
166 { PRIMPOOL_2_PARTITIONS, ALIGN_SIZE(PRIM_PARTITION_2_SIZE), &pool12 },
167 { PRIMPOOL_3_PARTITIONS, ALIGN_SIZE(PRIM_PARTITION_3_SIZE), &pool13 },
168 { 0 , 0 , NULL }
169 };
170
171 /*
172 * Partitions pool configuration for test interface communication
173 */
174 #define TESTPOOL_0_PARTITIONS 10
175 #define TESTPOOL_1_PARTITIONS 200
176 #define TESTPOOL_2_PARTITIONS 2
177
178 #define TSTSND_QUEUE_ENTRIES (TESTPOOL_0_PARTITIONS+TESTPOOL_1_PARTITIONS+TESTPOOL_2_PARTITIONS)
179 #define TSTRCV_QUEUE_ENTRIES 50
180
181 #define TEST_PARTITION_0_SIZE 80
182 #ifdef _TARGET_
183 #define TEST_PARTITION_1_SIZE 160
184 #else
185 #define TEST_PARTITION_1_SIZE 260
186 #endif
187 #define TEST_PARTITION_2_SIZE 1600
188
189 #ifndef DATA_INT_RAM
190 const USHORT TST_SndQueueEntries = TSTSND_QUEUE_ENTRIES;
191 const USHORT TST_RcvQueueEntries = TSTRCV_QUEUE_ENTRIES;
192 const USHORT TextTracePartitionSize = TEST_PARTITION_1_SIZE;
193 #endif /* !DATA_INT_RAM */
194
195 char pool20 [ POOL_SIZE(TESTPOOL_0_PARTITIONS,ALIGN_SIZE(TEST_PARTITION_0_SIZE)) ] __attribute__ ((section ("ext.ram")));
196
197 char pool21 [ POOL_SIZE(TESTPOOL_1_PARTITIONS,ALIGN_SIZE(TEST_PARTITION_1_SIZE)) ] __attribute__ ((section ("ext.ram")));
198
199 char pool22 [ POOL_SIZE(TESTPOOL_2_PARTITIONS,ALIGN_SIZE(TEST_PARTITION_2_SIZE)) ] __attribute__ ((section ("ext.ram")));
200
201 const T_FRM_PARTITION_POOL_CONFIG test_grp_config[] =
202 {
203 { TESTPOOL_0_PARTITIONS, ALIGN_SIZE(TEST_PARTITION_0_SIZE), &pool20 },
204 { TESTPOOL_1_PARTITIONS, ALIGN_SIZE(TEST_PARTITION_1_SIZE), &pool21 },
205 { TESTPOOL_2_PARTITIONS, ALIGN_SIZE(TEST_PARTITION_2_SIZE), &pool22 },
206 { 0 , 0 , NULL }
207 };
208
209 /*
210 * Partitions pool configuration for general purpose allocation
211 */
212
213 #define DMEMPOOL_0_PARTITIONS 70
214 #define DMEMPOOL_1_PARTITIONS 2
215
216 #define DMEM_PARTITION_0_SIZE 16
217 #ifdef _TARGET_
218 #define DMEM_PARTITION_1_SIZE 1600 /* for non tracing ccd arm7 */
219 #else
220 #define DMEM_PARTITION_1_SIZE 2800 /* for non tracing ccd pc */
221 #endif
222
223 char pool30 [ POOL_SIZE(DMEMPOOL_0_PARTITIONS,ALIGN_SIZE(DMEM_PARTITION_0_SIZE)) ] __attribute__ ((section ("ext.ram")));
224
225 char pool31 [ POOL_SIZE(DMEMPOOL_1_PARTITIONS,ALIGN_SIZE(DMEM_PARTITION_1_SIZE)) ] __attribute__ ((section ("ext.ram")));
226
227 const T_FRM_PARTITION_POOL_CONFIG dmem_grp_config[] =
228 {
229 { DMEMPOOL_0_PARTITIONS, ALIGN_SIZE(DMEM_PARTITION_0_SIZE), &pool30 },
230 { DMEMPOOL_1_PARTITIONS, ALIGN_SIZE(DMEM_PARTITION_1_SIZE), &pool31 },
231 { 0 , 0 , NULL }
232 };
233
234 /*
235 * Partitions group list
236 */
237
238 const T_FRM_PARTITION_GROUP_CONFIG partition_grp_config[MAX_POOL_GROUPS+1] =
239 {
240 { "PRIM", &prim_grp_config[0] },
241 { "TEST", &test_grp_config[0] },
242 { "DMEM", &dmem_grp_config[0] },
243 { NULL, NULL }
244 };
245
246 extern T_HANDLE PrimGroupHandle;
247 extern T_HANDLE DmemGroupHandle;
248 extern T_HANDLE TestGroupHandle;
249
250 T_HANDLE *PoolGroupHandle[MAX_POOL_GROUPS+1] =
251 {
252 &PrimGroupHandle,
253 &TestGroupHandle,
254 &DmemGroupHandle,
255 NULL
256 };
257
258 /*
259 * Dynamic Memory Pool Configuration
260 */
261
262 #ifdef _TARGET_
263 #ifdef FF_ESIM
264 #define EXT_DATA_POOL_PS_BASE_SIZE 45000
265 #else
266 #define EXT_DATA_POOL_PS_BASE_SIZE 35000
267 #endif
268 #define INT_DATA_POOL_PS_BASE_SIZE 25000
269 #else /* _TARGET_ */
270 #define EXT_DATA_POOL_TCPIP_ADDTIION 120000
271 #define EXT_DATA_POOL_PS_BASE_SIZE 80000 + EXT_DATA_POOL_TCPIP_ADDTIION
272 #define INT_DATA_POOL_PS_BASE_SIZE 1000
273 #endif /* _TARGET_ */
274
275 #ifdef MEMORY_SUPERVISION
276 #define EXT_DATA_POOL_PPS_ADDITION ((EXT_DATA_POOL_PS_BASE_SIZE>>3)+25000)
277 #define INT_DATA_POOL_PPS_ADDITION ((INT_DATA_POOL_PS_BASE_SIZE>>3))
278 #else /* MEMORY_SUPERVISION */
279 #define EXT_DATA_POOL_PPS_ADDITION 0
280 #define INT_DATA_POOL_PPS_ADDITION 0
281 #endif /* MEMORY_SUPERVISION */
282
283 #if defined (FF_WAP) || defined (FF_SAT_E)
284 #define EXT_DATA_POOL_WAP_ADDITION 15000
285 #else
286 #define EXT_DATA_POOL_WAP_ADDITION 0
287 #endif /* FF_WAP OR SAT E */
288
289 #ifdef GRR_PPC_IF_PRIM
290 #define INT_DATA_POOL_GRR_PPC_IF_PRIM_ADDITION 3000
291 #else /* #ifdef GRR_PPC_IF_PRIM */
292 #define INT_DATA_POOL_GRR_PPC_IF_PRIM_ADDITION 0
293 #endif /* #ifdef GRR_PPC_IF_PRIM */
294
295 #define EXT_DATA_POOL_PS_SIZE (EXT_DATA_POOL_PS_BASE_SIZE + EXT_DATA_POOL_WAP_ADDITION + EXT_DATA_POOL_PPS_ADDITION)
296 #define INT_DATA_POOL_PS_SIZE (INT_DATA_POOL_PS_BASE_SIZE + INT_DATA_POOL_GRR_PPC_IF_PRIM_ADDITION + INT_DATA_POOL_PPS_ADDITION)
297
298 #define EXT_DATA_POOL_GPF_SIZE (2048 + OS_QUEUE_ENTRY_SIZE(TSTSND_QUEUE_ENTRIES) + OS_QUEUE_ENTRY_SIZE(TSTRCV_QUEUE_ENTRIES))
299
300 #define EXT_DATA_POOL_SIZE (EXT_DATA_POOL_PS_SIZE + EXT_DATA_POOL_GPF_SIZE)
301 #define INT_DATA_POOL_SIZE (INT_DATA_POOL_PS_SIZE)
302
303 char ext_data_pool [ EXT_DATA_POOL_SIZE ]
304 __attribute__ ((section ("ext.ram")));
305
306 char int_data_pool [ INT_DATA_POOL_SIZE ]
307 __attribute__ ((section ("int.ram")));
308
309 const T_MEMORY_POOL_CONFIG memory_pool_config[MAX_MEMORY_POOLS+1] =
310 {
311 { "INTPOOL", INT_DATA_POOL_SIZE, &int_data_pool[0] },
312 { "EXTPOOL", EXT_DATA_POOL_SIZE, &ext_data_pool[0] },
313 { NULL }
314 };
315
316 extern T_HANDLE ext_data_pool_handle;
317 extern T_HANDLE int_data_pool_handle;
318
319 T_HANDLE *MemoryPoolHandle[MAX_MEMORY_POOLS+1] =
320 {
321 &int_data_pool_handle,
322 &ext_data_pool_handle,
323 NULL
324 };