annotate gsm-fw/services/dar/dar_env.c @ 662:a712c95b60c1

gsm-fw/include/condat: import of TI's g23m/condat/com/include custom.h, pwr.h and rtc.h taken from TCS211 version, the others are the versions from LoCosto
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 28 Sep 2014 01:14:48 +0000
parents a7087f91c752
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1 /****************************************************************************/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
2 /* */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
3 /* File Name: dar_env.c */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
4 /* */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
5 /* Purpose: This file contains routines that will be called in order to: */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
6 /* - notify the Environment of the diagnose's Memory Banks */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
7 /* requirements, */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
8 /* - set diagnose's addr and memory banks IDs */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
9 /* - initialize all the diagnose's data structures, */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
10 /* - start the diagnose's task */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
11 /* - stop the diagnose's task */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
12 /* - kill the diagnose's task */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
13 /* */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
14 /* Version 0.1 */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
15 /* */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
16 /* Date Modification */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
17 /* ------------------------------------ */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
18 /* 26 September 2001 Create */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
19 /* */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
20 /* Author Stephanie Gerthoux */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
21 /* */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
22 /* (C) Copyright 2001 by Texas Instruments Incorporated, All Rights Reserved*/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
23 /****************************************************************************/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
24
309
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
25 #include "../../riviera/rv/rv_defined_swe.h"
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
26 #ifdef RVM_DAR_SWE
309
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
27 #include "../../riviera/rv/rv_general.h"
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
28 #include "../../riviera/rvm/rvm_gen.h"
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
29 #include "../../riviera/rvm/rvm_priorities.h"
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
30 #include "../../riviera/rvm/rvm_use_id_list.h"
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
31 #include "dar_api.h"
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
32 #include "dar_env.h"
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
33 #include "dar_macro_i.h"
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
34
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
35 #include <string.h>
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
36
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
37 extern T_RV_RET dar_core(void);
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
38
309
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
39 /* Initialisation of the pointer to the Global Environment Control block */
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
40 T_DAR_ENV_CTRL_BLK *dar_gbl_var_p = NULL;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
41
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
42 /**** Define extern variables ****/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
43 /* Get the last status of the system */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
44 extern T_DAR_RECOVERY_STATUS dar_current_status;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
45
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
46 /* Get the last exception of the system */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
47 extern UINT8 dar_exception_status;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
48
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
49 /* Define the recovery buffer */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
50 extern UINT32 dar_recovery_buffer;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
51
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
52 /* DAR previous status */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
53 extern T_DAR_RECOVERY_STATUS dar_previous_status;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
54
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
55 /* DAR previous status */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
56 extern UINT8 dar_previous_exception;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
57
309
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
58 /***************************************************************************/
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
59 /* Function : dar_get_info */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
60 /* */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
61 /* Description : This function is called by the RV Environment to learn */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
62 /* diagnose requirements in terms of memory, SWEs... */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
63 /* */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
64 /* Parameters : T_RVM_INFO_SWE * swe_info: pointer to the structure to */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
65 /* fill containing infos related to the diagnose SWE. */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
66 /* */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
67 /* Return : T_RV_RETURN */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
68 /* */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
69 /* History : 0.1 (26-September-2001) */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
70 /* */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
71 /* */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
72 /***************************************************************************/
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
73 T_RVM_RETURN dar_get_info(T_RVM_INFO_SWE *infoSWEnt)
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
74 {
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
75 /* SWE info */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
76 infoSWEnt->swe_type = RVM_SWE_TYPE_4;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
77 infoSWEnt->type_info.type4.swe_use_id = DAR_USE_ID;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
78
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
79 memcpy( infoSWEnt->type_info.type4.swe_name, "DAR", sizeof("DAR") );
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
80
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
81 infoSWEnt->type_info.type4.stack_size = DAR_STACK_SIZE;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
82 infoSWEnt->type_info.type4.priority = RVM_DAR_TASK_PRIORITY;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
83
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
84
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
85 /* Set the return path */
309
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
86 infoSWEnt->type_info.type4.return_path.callback_func = NULL;
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
87 infoSWEnt->type_info.type4.return_path.addr_id = 0;
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
88
309
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
89
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
90 /* memory bank info */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
91 infoSWEnt->type_info.type4.nb_mem_bank = 0x01;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
92
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
93 /* Memory bank used to receive/send the message to/from the entity */
309
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
94 memcpy ((UINT8 *) infoSWEnt->type_info.type4.mem_bank[0].bank_name, "DAR_MB", sizeof("DAR_MB"));
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
95 infoSWEnt->type_info.type4.mem_bank[0].initial_params.size = DAR_MB_SIZE;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
96 infoSWEnt->type_info.type4.mem_bank[0].initial_params.watermark = DAR_MB_WATERMARK;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
97
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
98 /* linked SWE info */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
99 /* this SWE requires the FFS SWE to run */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
100
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
101 infoSWEnt->type_info.type4.nb_linked_swe = 0x01;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
102 infoSWEnt->type_info.type4.linked_swe_id[0]= FFS_USE_ID;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
103
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
104 /* generic functions */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
105 infoSWEnt->type_info.type4.set_info = dar_set_info;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
106 infoSWEnt->type_info.type4.init = dar_init;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
107 infoSWEnt->type_info.type4.core = dar_core;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
108 infoSWEnt->type_info.type4.stop = dar_stop;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
109 infoSWEnt->type_info.type4.kill = dar_kill;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
110
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
111 return RVM_OK;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
112 }
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
113
309
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
114 /**************** End of dar_get_info function *****************************/
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
115
309
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
116 /***************************************************************************/
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
117 /* Function : dar_set_info */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
118 /* */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
119 /* Description : This function is called by the RV Environment to inform */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
120 /* the diagnose SWE about addr_id, mb_id and error function. */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
121 /* */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
122 /* Parameters : - T_RVF_ADDR_ID addrId: address Id */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
123 /* - T_RVF_MB_ID mb_id[]: array of memory bank ids. */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
124 /* - callback function to call in case of unrecoverable error*/
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
125 /* */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
126 /* Return : T_RVM_RETURN */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
127 /* */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
128 /* History : 0.1 (27-September-2001 ) */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
129 /* */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
130 /* */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
131 /***************************************************************************/
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
132 T_RVM_RETURN dar_set_info(T_RVF_ADDR_ID addrId,
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
133 T_RV_RETURN return_path[],
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
134 T_RVF_MB_ID mbId[],
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
135 T_RVM_RETURN (*callBackFctError) ( T_RVM_NAME SWEntName,
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
136 T_RVM_RETURN errorCause,
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
137 T_RVM_ERROR_TYPE errorType,
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
138 T_RVM_STRING errorMsg) )
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
139 {
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
140
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
141 /* Declare local variable.*/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
142 T_RVF_MB_STATUS mb_status = RVF_GREEN;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
143
309
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
144 /* Allocate memory required to store the Global Environment control
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
145 Block. */
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
146 mb_status = rvf_get_buf(mbId[0],
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
147 sizeof(T_DAR_ENV_CTRL_BLK),
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
148 (T_RVF_BUFFER **) & dar_gbl_var_p);
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
149
309
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
150 /* If insufficient resources to properly run the DAR's task,
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
151 then abort. */
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
152 switch (mb_status)
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
153 {
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
154 case RVF_GREEN:
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
155 {
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
156 /* Initialize the Global Environment Control Block */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
157 memset((UINT8 *) dar_gbl_var_p,
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
158 0x00,
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
159 sizeof (T_DAR_ENV_CTRL_BLK));
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
160
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
161 /* Store the memory bank IDs assigned to the DAR */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
162 dar_gbl_var_p->mb_dar = mbId[0];
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
163
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
164 /* Store the addr ID assigned to the DAR */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
165 dar_gbl_var_p->addrId = addrId;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
166
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
167 /* Store the function to be called whenever any unrecoverable */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
168 /* error occurs. */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
169 dar_gbl_var_p->callBackFctError = callBackFctError;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
170 DAR_SEND_TRACE(" Diagnose And Recovery (env). DAR's information set ",
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
171 RV_TRACE_LEVEL_DEBUG_LOW);
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
172 break;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
173 }
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
174 case RVF_YELLOW:
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
175 {
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
176 rvf_free_buf((T_RVF_BUFFER *) dar_gbl_var_p);
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
177 DAR_TRACE_WARNING(" DAR memory warning (orange memory)");
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
178 return (RV_MEMORY_ERR);
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
179 }
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
180 default:
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
181 {
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
182 DAR_TRACE_WARNING(" DAR memory warning (red memory)");
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
183 return (RV_MEMORY_ERR);
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
184 }
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
185 } /* switch (mb_status) */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
186
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
187 return (RV_OK);
309
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
188 } /*************** End of dar_set_info function ****************************/
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
189
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
190
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
191
309
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
192 /***************************************************************************/
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
193 /* Function : dar_init */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
194 /* */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
195 /* Description : This function is called by the RV Environment to init the */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
196 /* diagnose SWE before creating the task and calling */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
197 /* dar_start. */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
198 /* */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
199 /* Parameters : None */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
200 /* */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
201 /* Return : T_RVM_RETURN */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
202 /* */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
203 /* History : 0.1 (27-September-2001) */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
204 /* */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
205 /* */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
206 /***************************************************************************/
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
207 T_RVM_RETURN dar_init(void)
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
208 {
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
209 /*** Declare local variables ***/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
210 UINT16 i = 0;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
211
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
212 /*** Initialization of the DAR global structure ***/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
213
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
214 /* Initialization of the dar_filter_array */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
215 for (i=0;i<DAR_MAX_GROUP_NB;i++)
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
216 {
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
217 dar_gbl_var_p ->dar_filter_array[i].group_nb = DAR_INITIALIZATION_VALUE;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
218 dar_gbl_var_p ->dar_filter_array[i].mask_warning = DAR_INITIALIZATION_VALUE;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
219 dar_gbl_var_p ->dar_filter_array[i].mask_debug = DAR_INITIALIZATION_VALUE;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
220 }
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
221
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
222 /*Initialization of the index and the free index */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
223 dar_gbl_var_p ->index = DAR_INVALID_VALUE;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
224 dar_gbl_var_p ->free_index = DAR_INVALID_VALUE;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
225
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
226 /*** Value of the DAR recovery status ***/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
227 dar_previous_status = dar_current_status;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
228
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
229 /* erase the dar_current_status value */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
230 dar_current_status = DAR_POWER_ON_OFF;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
231
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
232 /*** Value of the DAR exception status ***/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
233 dar_previous_exception = dar_exception_status;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
234
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
235 /* erase the dar_exception_status value */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
236 dar_exception_status = DAR_NO_ABORT_EXCEPTION;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
237
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
238 return RV_OK;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
239 }
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
240
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
241
309
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
242 /***************************************************************************/
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
243 /* Function : dar_stop */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
244 /* */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
245 /* Description : This function is called by the RV Environment to stop the */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
246 /* diagnose SWE. */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
247 /* */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
248 /* Parameters : None */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
249 /* */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
250 /* Return : T_RVM_RETURN */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
251 /* */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
252 /* History : 0.1 (27-September-2001) */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
253 /* */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
254 /* */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
255 /***************************************************************************/
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
256 T_RVM_RETURN dar_stop(void)
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
257 {
309
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
258 /* other SWEs have not been killed yet, DAR can send messages to other
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
259 SWEs */
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
260
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
261 return RV_OK;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
262 }
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
263
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
264
309
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
265 /***************************************************************************/
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
266 /* Function : dar_kill */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
267 /* */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
268 /* Description : This function is called by the RV Environment to kill the */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
269 /* diagnose SWE, after the diagnose_stop function has been */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
270 /* called. */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
271 /* */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
272 /* Parameters : None */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
273 /* */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
274 /* Return : T_RVM_RETURN */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
275 /* */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
276 /* History : 0.1 (27-September-2001) */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
277 /* */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
278 /* */
a7087f91c752 DAR: all C modules compile without RVM_DAR_SWE
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
279 /***************************************************************************/
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
280 T_RVM_RETURN dar_kill (void)
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
281 {
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
282 /* free all memory buffer previously allocated */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
283 rvf_free_buf ((T_RVF_BUFFER *) dar_gbl_var_p);
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
284 return RV_OK;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
285 }
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
286
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
287 #endif /* #ifdef RVM_DAR_SWE */