FreeCalypso > hg > freecalypso-sw
comparison gsm-fw/gpf/conf/barecomp.c @ 488:e8ed76bbf556
gsm-fw/gpf/conf: bare{comp.c,const.h} configuration created
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sun, 29 Jun 2014 21:59:14 +0000 |
parents | |
children | 8b07fb500d36 |
comparison
equal
deleted
inserted
replaced
487:f612f9c3fe77 | 488:e8ed76bbf556 |
---|---|
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_GSM | |
42 extern SHORT l1_pei_create (T_PEI_INFO const **Info); | |
43 #endif | |
44 | |
45 /*==== VARIABLES ==================================================*/ | |
46 | |
47 //EF For normal Test Definition Language (TDL) TAP usage set newTstHeader = FALSE | |
48 //EF For multiple entity (TCSL) Test Case Script Lang. set newTstHeader = TRUE | |
49 #ifndef _TARGET_ | |
50 | |
51 #ifdef TDL_TAP | |
52 BOOL newTstHeader = FALSE; | |
53 #else | |
54 BOOL newTstHeader = TRUE; | |
55 #endif | |
56 | |
57 #endif | |
58 | |
59 const T_COMPONENT_ADDRESS tstrcv_list[] = | |
60 { | |
61 { tstrcv_pei_create, NULL, ASSIGNED_BY_TI }, | |
62 { NULL, NULL, 0 } | |
63 }; | |
64 | |
65 const T_COMPONENT_ADDRESS tstsnd_list[] = | |
66 { | |
67 { tstsnd_pei_create, NULL, ASSIGNED_BY_TI }, | |
68 { NULL, NULL, 0 } | |
69 }; | |
70 | |
71 #if CONFIG_GSM | |
72 const T_COMPONENT_ADDRESS l1_list[] = | |
73 { | |
74 { l1_pei_create, NULL, ASSIGNED_BY_TI }, | |
75 { NULL, NULL, 0 } | |
76 }; | |
77 #endif | |
78 | |
79 const T_COMPONENT_ADDRESS *ComponentTables[]= | |
80 { | |
81 tstrcv_list, | |
82 tstsnd_list, | |
83 #if CONFIG_GSM | |
84 l1_list, | |
85 #endif | |
86 NULL | |
87 }; | |
88 | |
89 /*==== VERSIONS ===================================================*/ | |
90 #ifndef CTRACE | |
91 char * str2ind_version = "&0"; | |
92 #endif | |
93 | |
94 /*==== MEMORY CONFIGURATION =======================================*/ | |
95 | |
96 /* | |
97 * Partitions pool configuration for primitive communication | |
98 */ | |
99 | |
100 /* | |
101 * Memory extensions for multiplexer | |
102 */ | |
103 #ifdef FF_MUX | |
104 #define PRIMPOOL_0_MUX_ADDITION 30 | |
105 #define PRIMPOOL_2_MUX_ADDITION 10 | |
106 #else /* FF_MUX */ | |
107 #define PRIMPOOL_0_MUX_ADDITION 0 | |
108 #define PRIMPOOL_2_MUX_ADDITION 0 | |
109 #endif /* else FF_MUX */ | |
110 | |
111 /* | |
112 * Memory extensions for multiple PDP contexts | |
113 */ | |
114 #ifdef FF_PKTIO | |
115 #define PRIMPOOL_2_MPDP_ADDITION 30 | |
116 #else /* FF_PKTIO */ | |
117 #define PRIMPOOL_2_MPDP_ADDITION 0 | |
118 #endif /* else FF_PKTIO */ | |
119 #ifdef WIN32 | |
120 /* | |
121 * Required for testing LLC acknowledged mode. | |
122 */ | |
123 #define PRIMPOOL_0_PARTITIONS 200 | |
124 #define PRIMPOOL_1_PARTITIONS 100 | |
125 #define PRIMPOOL_2_PARTITIONS 20 | |
126 #define PRIMPOOL_3_PARTITIONS 20 | |
127 | |
128 #else /*WIN32*/ | |
129 | |
130 #define PRIMPOOL_0_PARTITIONS (190 + PRIMPOOL_0_MUX_ADDITION) | |
131 #define PRIMPOOL_1_PARTITIONS 110 | |
132 #define PRIMPOOL_2_PARTITIONS ( 50 + PRIMPOOL_2_MPDP_ADDITION + PRIMPOOL_2_MUX_ADDITION) | |
133 #define PRIMPOOL_3_PARTITIONS 7 | |
134 | |
135 #endif /*WIN32*/ | |
136 | |
137 #define PRIM_PARTITION_0_SIZE 60 | |
138 #define PRIM_PARTITION_1_SIZE 128 | |
139 #define PRIM_PARTITION_2_SIZE 632 | |
140 #define PRIM_PARTITION_3_SIZE 1600 | |
141 | |
142 #ifndef DATA_INT_RAM | |
143 unsigned int MaxPrimPartSize = PRIM_PARTITION_3_SIZE; | |
144 #endif /* !DATA_INT_RAM */ | |
145 | |
146 char pool10 [ POOL_SIZE(PRIMPOOL_0_PARTITIONS,ALIGN_SIZE(PRIM_PARTITION_0_SIZE)) ] __attribute__ ((section ("int.ram"))); | |
147 | |
148 char pool11 [ POOL_SIZE(PRIMPOOL_1_PARTITIONS,ALIGN_SIZE(PRIM_PARTITION_1_SIZE)) ] __attribute__ ((section ("int.ram"))); | |
149 | |
150 char pool12 [ POOL_SIZE(PRIMPOOL_2_PARTITIONS,ALIGN_SIZE(PRIM_PARTITION_2_SIZE)) ] __attribute__ ((section ("int.ram"))); | |
151 | |
152 char pool13 [ POOL_SIZE(PRIMPOOL_3_PARTITIONS,ALIGN_SIZE(PRIM_PARTITION_3_SIZE)) ] __attribute__ ((section ("int.ram"))); | |
153 | |
154 const T_FRM_PARTITION_POOL_CONFIG prim_grp_config[] = | |
155 { | |
156 { PRIMPOOL_0_PARTITIONS, ALIGN_SIZE(PRIM_PARTITION_0_SIZE), &pool10 }, | |
157 { PRIMPOOL_1_PARTITIONS, ALIGN_SIZE(PRIM_PARTITION_1_SIZE), &pool11 }, | |
158 { PRIMPOOL_2_PARTITIONS, ALIGN_SIZE(PRIM_PARTITION_2_SIZE), &pool12 }, | |
159 { PRIMPOOL_3_PARTITIONS, ALIGN_SIZE(PRIM_PARTITION_3_SIZE), &pool13 }, | |
160 { 0 , 0 , NULL } | |
161 }; | |
162 | |
163 /* | |
164 * Partitions pool configuration for test interface communication | |
165 */ | |
166 #define TESTPOOL_0_PARTITIONS 10 | |
167 #define TESTPOOL_1_PARTITIONS 200 | |
168 #define TESTPOOL_2_PARTITIONS 2 | |
169 | |
170 #define TSTSND_QUEUE_ENTRIES (TESTPOOL_0_PARTITIONS+TESTPOOL_1_PARTITIONS+TESTPOOL_2_PARTITIONS) | |
171 #define TSTRCV_QUEUE_ENTRIES 50 | |
172 | |
173 #define TEST_PARTITION_0_SIZE 80 | |
174 #ifdef _TARGET_ | |
175 #define TEST_PARTITION_1_SIZE 160 | |
176 #else | |
177 #define TEST_PARTITION_1_SIZE 260 | |
178 #endif | |
179 #define TEST_PARTITION_2_SIZE 1600 | |
180 | |
181 #ifndef DATA_INT_RAM | |
182 const USHORT TST_SndQueueEntries = TSTSND_QUEUE_ENTRIES; | |
183 const USHORT TST_RcvQueueEntries = TSTRCV_QUEUE_ENTRIES; | |
184 const USHORT TextTracePartitionSize = TEST_PARTITION_1_SIZE; | |
185 #endif /* !DATA_INT_RAM */ | |
186 | |
187 char pool20 [ POOL_SIZE(TESTPOOL_0_PARTITIONS,ALIGN_SIZE(TEST_PARTITION_0_SIZE)) ] __attribute__ ((section ("ext.ram"))); | |
188 | |
189 char pool21 [ POOL_SIZE(TESTPOOL_1_PARTITIONS,ALIGN_SIZE(TEST_PARTITION_1_SIZE)) ] __attribute__ ((section ("ext.ram"))); | |
190 | |
191 char pool22 [ POOL_SIZE(TESTPOOL_2_PARTITIONS,ALIGN_SIZE(TEST_PARTITION_2_SIZE)) ] __attribute__ ((section ("ext.ram"))); | |
192 | |
193 const T_FRM_PARTITION_POOL_CONFIG test_grp_config[] = | |
194 { | |
195 { TESTPOOL_0_PARTITIONS, ALIGN_SIZE(TEST_PARTITION_0_SIZE), &pool20 }, | |
196 { TESTPOOL_1_PARTITIONS, ALIGN_SIZE(TEST_PARTITION_1_SIZE), &pool21 }, | |
197 { TESTPOOL_2_PARTITIONS, ALIGN_SIZE(TEST_PARTITION_2_SIZE), &pool22 }, | |
198 { 0 , 0 , NULL } | |
199 }; | |
200 | |
201 /* | |
202 * Partitions pool configuration for general purpose allocation | |
203 */ | |
204 | |
205 #define DMEMPOOL_0_PARTITIONS 70 | |
206 #define DMEMPOOL_1_PARTITIONS 2 | |
207 | |
208 #define DMEM_PARTITION_0_SIZE 16 | |
209 #ifdef _TARGET_ | |
210 #define DMEM_PARTITION_1_SIZE 1600 /* for non tracing ccd arm7 */ | |
211 #else | |
212 #define DMEM_PARTITION_1_SIZE 2800 /* for non tracing ccd pc */ | |
213 #endif | |
214 | |
215 char pool30 [ POOL_SIZE(DMEMPOOL_0_PARTITIONS,ALIGN_SIZE(DMEM_PARTITION_0_SIZE)) ] __attribute__ ((section ("ext.ram"))); | |
216 | |
217 char pool31 [ POOL_SIZE(DMEMPOOL_1_PARTITIONS,ALIGN_SIZE(DMEM_PARTITION_1_SIZE)) ] __attribute__ ((section ("ext.ram"))); | |
218 | |
219 const T_FRM_PARTITION_POOL_CONFIG dmem_grp_config[] = | |
220 { | |
221 { DMEMPOOL_0_PARTITIONS, ALIGN_SIZE(DMEM_PARTITION_0_SIZE), &pool30 }, | |
222 { DMEMPOOL_1_PARTITIONS, ALIGN_SIZE(DMEM_PARTITION_1_SIZE), &pool31 }, | |
223 { 0 , 0 , NULL } | |
224 }; | |
225 | |
226 /* | |
227 * Partitions group list | |
228 */ | |
229 | |
230 const T_FRM_PARTITION_GROUP_CONFIG partition_grp_config[MAX_POOL_GROUPS+1] = | |
231 { | |
232 { "PRIM", &prim_grp_config[0] }, | |
233 { "TEST", &test_grp_config[0] }, | |
234 { "DMEM", &dmem_grp_config[0] }, | |
235 { NULL, NULL } | |
236 }; | |
237 | |
238 extern T_HANDLE PrimGroupHandle; | |
239 extern T_HANDLE DmemGroupHandle; | |
240 extern T_HANDLE TestGroupHandle; | |
241 | |
242 T_HANDLE *PoolGroupHandle[MAX_POOL_GROUPS+1] = | |
243 { | |
244 &PrimGroupHandle, | |
245 &TestGroupHandle, | |
246 &DmemGroupHandle, | |
247 NULL | |
248 }; | |
249 | |
250 /* | |
251 * Dynamic Memory Pool Configuration | |
252 */ | |
253 | |
254 #ifdef _TARGET_ | |
255 #ifdef FF_ESIM | |
256 #define EXT_DATA_POOL_PS_BASE_SIZE 45000 | |
257 #else | |
258 #define EXT_DATA_POOL_PS_BASE_SIZE 35000 | |
259 #endif | |
260 #define INT_DATA_POOL_PS_BASE_SIZE 25000 | |
261 #else /* _TARGET_ */ | |
262 #define EXT_DATA_POOL_TCPIP_ADDTIION 120000 | |
263 #define EXT_DATA_POOL_PS_BASE_SIZE 80000 + EXT_DATA_POOL_TCPIP_ADDTIION | |
264 #define INT_DATA_POOL_PS_BASE_SIZE 1000 | |
265 #endif /* _TARGET_ */ | |
266 | |
267 #ifdef MEMORY_SUPERVISION | |
268 #define EXT_DATA_POOL_PPS_ADDITION ((EXT_DATA_POOL_PS_BASE_SIZE>>3)+25000) | |
269 #define INT_DATA_POOL_PPS_ADDITION ((INT_DATA_POOL_PS_BASE_SIZE>>3)) | |
270 #else /* MEMORY_SUPERVISION */ | |
271 #define EXT_DATA_POOL_PPS_ADDITION 0 | |
272 #define INT_DATA_POOL_PPS_ADDITION 0 | |
273 #endif /* MEMORY_SUPERVISION */ | |
274 | |
275 #if defined (FF_WAP) || defined (FF_SAT_E) | |
276 #define EXT_DATA_POOL_WAP_ADDITION 15000 | |
277 #else | |
278 #define EXT_DATA_POOL_WAP_ADDITION 0 | |
279 #endif /* FF_WAP OR SAT E */ | |
280 | |
281 #ifdef GRR_PPC_IF_PRIM | |
282 #define INT_DATA_POOL_GRR_PPC_IF_PRIM_ADDITION 3000 | |
283 #else /* #ifdef GRR_PPC_IF_PRIM */ | |
284 #define INT_DATA_POOL_GRR_PPC_IF_PRIM_ADDITION 0 | |
285 #endif /* #ifdef GRR_PPC_IF_PRIM */ | |
286 | |
287 #define EXT_DATA_POOL_PS_SIZE (EXT_DATA_POOL_PS_BASE_SIZE + EXT_DATA_POOL_WAP_ADDITION + EXT_DATA_POOL_PPS_ADDITION) | |
288 #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) | |
289 | |
290 #define EXT_DATA_POOL_GPF_SIZE (2048 + OS_QUEUE_ENTRY_SIZE(TSTSND_QUEUE_ENTRIES) + OS_QUEUE_ENTRY_SIZE(TSTRCV_QUEUE_ENTRIES)) | |
291 | |
292 #define EXT_DATA_POOL_SIZE (EXT_DATA_POOL_PS_SIZE + EXT_DATA_POOL_GPF_SIZE) | |
293 #define INT_DATA_POOL_SIZE (INT_DATA_POOL_PS_SIZE) | |
294 | |
295 char ext_data_pool [ EXT_DATA_POOL_SIZE ] | |
296 __attribute__ ((section ("ext.ram"))); | |
297 | |
298 char int_data_pool [ INT_DATA_POOL_SIZE ] | |
299 __attribute__ ((section ("int.ram"))); | |
300 | |
301 const T_MEMORY_POOL_CONFIG memory_pool_config[MAX_MEMORY_POOLS+1] = | |
302 { | |
303 { "INTPOOL", INT_DATA_POOL_SIZE, &int_data_pool[0] }, | |
304 { "EXTPOOL", EXT_DATA_POOL_SIZE, &ext_data_pool[0] }, | |
305 { NULL } | |
306 }; | |
307 | |
308 extern T_HANDLE ext_data_pool_handle; | |
309 extern T_HANDLE int_data_pool_handle; | |
310 | |
311 T_HANDLE *MemoryPoolHandle[MAX_MEMORY_POOLS+1] = | |
312 { | |
313 &int_data_pool_handle, | |
314 &ext_data_pool_handle, | |
315 NULL | |
316 }; |