annotate gsm-fw/services/dar/dar_emergency.c @ 923:10b4bed10192

gsm-fw/L1: fix for the DSP patch corruption bug The L1 code we got from the LoCosto fw contains a feature for DSP CPU load measurement. This feature is a LoCosto-ism, i.e., not applicable to earlier DBB chips (Calypso) with their respective earlier DSP ROMs. Most of the code dealing with that feature is conditionalized as #if (DSP >= 38), but one spot was missed, and the MCU code was writing into an API word dealing with this feature. In TCS211 this DSP API word happens to be used by the DSP code patch, hence that write was corrupting the patched DSP code.
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Mon, 19 Oct 2015 17:13:56 +0000
parents a2194416fd7c
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_emergency.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 function is called when the DAR entity has detected */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
6 /* an emergency ( Error or exception) */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
7 /* */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
8 /* */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
9 /* Version 0.1 */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
10 /* */
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
11 /* Date Modification */
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
12 /* ------------------------------------ */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
13 /* 17 October 2001 Create */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
14 /* */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
15 /* Author Stephanie Gerthoux */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
16 /* */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
17 /* (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
18 /****************************************************************************/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
19
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
20 #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
21 #ifdef RVM_DAR_SWE
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
22 /* ************************************************ */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
23 /* THE DAR ENTITY IS ENABLED */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
24 /* ************************************************ */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
25
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
26 #include <string.h>
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
27 #include "../../riviera/rvm/rvm_gen.h"
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
28 #include "dar_api.h"
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
29 #include "dar_macro_i.h"
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
30 #include "dar_messages_i.h"
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
31 #include "dar_const_i.h"
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
32 #include "dar_diagnose_i.h"
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
33 #include "dar_msg_ft.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 #ifndef _WINDOWS
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
36 #include "../../bsp/timer.h"
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
37 #endif
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
38
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
39 /**** Global variable ****/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
40 /* index used in the circular buffer*/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
41 extern UINT16 dar_current_index;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
42
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
43 /* Write buffer*/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
44 extern char dar_write_buffer[DAR_MAX_BUFFER_SIZE];
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 dar current status */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
47 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
48
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
49 /* Get the dar exception status */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
50 extern UINT8 dar_exception_status;
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 /* Define a pointer to the Global Environment Control block */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
53 extern T_DAR_ENV_CTRL_BLK *dar_gbl_var_p;
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 /* Define the recovery buffer */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
56 extern UINT8 dar_recovery_buffer[DAR_RECOVERY_DATA_MAX_BUFFER_SIZE];
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
57
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
58 /* Ram buffer that contains the Debug Unit register */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
59 extern UINT32 debug_RAM[DEBUG_UNIT_WORD_SIZE];
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
60
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
61
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
62 /**** Extern functions ****/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
63 extern void * dar_read_mbox (UINT8 mbox);
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
64
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
65
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
66 /***************************************************************************/
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
67 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
68 /* Function Name: dar_process_emergency */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
69 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
70 /* Purpose: This function is called to process emergency data and to */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
71 /* store them in RAM buffer when an emergency has been */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
72 /* detected. */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
73 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
74 /* Input Parameters: */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
75 /* Pointer to the message to store */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
76 /* Data Format, ( the Binary format is not supported) */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
77 /* Data Use Id, */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
78 /* Flags */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
79 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
80 /* Output Parameters: */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
81 /* Validation of the diagnose execution. */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
82 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
83 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
84 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
85 /* Revision History: */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
86 /* None. */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
87 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
88 /***************************************************************************/
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
89 T_RV_RET dar_process_emergency( T_DAR_INFO *buffer_p,
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
90 T_DAR_FORMAT format,
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
91 T_RVM_USE_ID dar_use_id,
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
92 UINT32 flags)
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
93 {
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
94 /* Declare local variables */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
95 UINT32 i = 0;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
96 UINT32 length = 0;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
97 T_RV_HDR *msg_p = ( T_RV_HDR*) dar_read_mbox(DAR_MBOX);
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
98
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
99 /**** Update the DAR recovery status ****/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
100 dar_current_status = DAR_EMERGENCY_SCUTTLING;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
101
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
102 /**** Empty the mail box before the reset of the system ****/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
103 while(msg_p != NULL)
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
104 {
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
105 /* If it's a Write message, store it in the RAM */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
106 /* ( it is not interesting to store filter message ) */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
107 if ((msg_p->msg_id) == DAR_WRITE_REQ)
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
108 {
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
109 /* store the message in the RAM*/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
110 dar_write_data_in_buffer((T_DAR_WRITE_START *)msg_p);
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
111 }
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 /* free the Header of the message */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
114 rvf_free_buf((T_RVF_BUFFER *) msg_p);
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
115
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
116 /* Read the next message */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
117 msg_p = ( T_RV_HDR*) dar_read_mbox(DAR_MBOX);
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
118
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
119 } /* while (msg_p != NULL) */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
120
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
121 /**** Store emergency data in RAM buffer ****/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
122 /* Diagnose string length */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
123 length = (UINT16) strlen(buffer_p);
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
124
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
125 /**** Check if the DAR entity is started ****/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
126 if (dar_gbl_var_p != NULL )
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
127 {
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
128 /* Data format */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
129 dar_gbl_var_p->format = format;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
130 }
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
131
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
132 if ( flags & DAR_NEW_ENTRY )
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
133 {
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
134 /** Circular buffer to store data **/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
135 /* Add 0xFF to separate 2 strings */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
136 dar_write_buffer[dar_current_index] = 0xF;
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
137 DAR_PLUS_PLUS(dar_current_index); /* increment with wraparound */
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
138 dar_write_buffer[dar_current_index] = 0xF;
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
139 DAR_PLUS_PLUS(dar_current_index); /* increment with wraparound */
305
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 /* The group_nb is 16 bit length, and the buffer is an UINT8 length */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
142 /* So the group_nb must be stocked by dividing it in 2 parts */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
143 dar_write_buffer[dar_current_index] = ((dar_use_id>>16)& 0x7FFF)>>8;
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
144 /*add the 8 first bits of the Use id group*/
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
145 DAR_PLUS_PLUS(dar_current_index);
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
146 dar_write_buffer[dar_current_index] = (dar_use_id>>16)& 0x7FFF;
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
147 /*add the 8 last bits of the Use id group*/
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
148 DAR_PLUS_PLUS(dar_current_index);
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
149
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
150 /* The mask is 16 bit length, and the buffer is an UINT8 length */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
151 /* So the mask must be stocked by dividing it in 2 parts */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
152 dar_write_buffer[dar_current_index] = ((dar_use_id)&0xFFFF)>>8;
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
153 /* add the 8 first bits of the Use id mask */
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
154 DAR_PLUS_PLUS(dar_current_index);
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
155 dar_write_buffer[dar_current_index] = (dar_use_id)&0xFFFF;
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
156 /* add the 8 last bits of the Use id mask */
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
157 DAR_PLUS_PLUS(dar_current_index);
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
158
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
159 /* Add the dar_level data */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
160 dar_write_buffer[dar_current_index] = DAR_ERROR;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
161 DAR_PLUS_PLUS(dar_current_index);
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
162 }
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 /* circular buffer to store diagnose data in RAM buffer */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
165 for (i=0; i < length; i++ )
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 /* copy string in the RAM char by char*/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
168 dar_write_buffer[dar_current_index]=buffer_p[i];
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
169
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
170 /* detection of the end of the buffer */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
171 /* When current = DAR_MAX_BUFFER_SIZE , current = 0 */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
172 DAR_PLUS_PLUS(dar_current_index);
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
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
175 /* DAR information is redirected to standard trace */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
176 //DAR_SEND_TRACE("Circular buffer :",RV_TRACE_LEVEL_ERROR);
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
177 //rvf_send_trace(buffer_p, length, NULL_PARAM, RV_TRACE_LEVEL_ERROR, DAR_USE_ID);
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
178
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
179 /* Trace the buffer (used for debug) */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
180 rvf_delay(RVF_MS_TO_TICKS(1000));
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
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
183 /**** Check if the DAR entity is started ****/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
184 if (dar_gbl_var_p != NULL )
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
185 {
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
186 if (dar_gbl_var_p->entity_dar_callback != NULL )
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
187 {
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
188 /* Call the MMI callback function to save some parameters before
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
189 reset */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
190 dar_gbl_var_p->entity_dar_callback(dar_recovery_buffer,
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
191 DAR_RECOVERY_DATA_MAX_BUFFER_SIZE);
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
192 }
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
193 }
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
194
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
195 /* The system is reset if requested */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
196 if ( flags & DAR_EMERGENCY_RESET )
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
197 {
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
198 dar_reset();
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
199 }
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
200 return(RV_OK);
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
201
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
202 } /* dar_process_emergency */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
203
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
204
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
205 /***************************************************************************/
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
206 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
207 /* Function Name: dar_exception_arm_undefined */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
208 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
209 /* Purpose: This function is called to process ARM undefined */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
210 /* instruction exception and to store this exception in the */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
211 /* RAM buffer. */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
212 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
213 /* Input Parameters: */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
214 /* None */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
215 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
216 /* Output Parameters: */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
217 /* Validation of the diagnose execution. */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
218 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
219 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
220 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
221 /* Revision History: */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
222 /* None. */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
223 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
224 /***************************************************************************/
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
225 void dar_exception_arm_undefined(void)
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
226 {
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
227 /* Declare local variables */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
228 T_DAR_INFO *buffer_p= " DAR Emergency exception : ARM undefined ";/*exception data to store*/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
229
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
230 /* Update the DAR recovery status */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
231 dar_current_status = DAR_EMERGENCY_SCUTTLING;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
232
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
233 /* Update the DAR exception status */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
234 dar_exception_status = DAR_EXCEPTION_UNDEFINED;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
235
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
236 /* Empty the mail box and store data in RAM buffer */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
237 dar_empty_mb_and_save_data(buffer_p);
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
238
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
239 /* Check if the DAR entity is started */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
240 if (dar_gbl_var_p != NULL )
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
241 {
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
242 if (dar_gbl_var_p->entity_dar_callback != NULL)
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
243 {
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
244 /* Call the MMI callback function to save some parameters before
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
245 reset */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
246 dar_gbl_var_p->entity_dar_callback(dar_recovery_buffer,
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
247 DAR_RECOVERY_DATA_MAX_BUFFER_SIZE);
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
248 }
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
249 }
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
250
310
083f262b7bbe gsm-fw: disabled DAR links
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 308
diff changeset
251 dar_reset();
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
252
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
253 } /* dar_exception_arm_undefined */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
254
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
255 /***************************************************************************/
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
256 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
257 /* Function Name: dar_exception_arm_swi */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
258 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
259 /* Purpose: This function is called to process ARM SW Interrupt */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
260 /* exception and to store this exception in the RAM buffer. */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
261 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
262 /* Input Parameters: */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
263 /* None */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
264 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
265 /* Output Parameters: */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
266 /* Validation of the diagnose execution. */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
267 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
268 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
269 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
270 /* Revision History: */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
271 /* None. */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
272 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
273 /***************************************************************************/
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
274 void dar_exception_arm_swi(void)
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
275 {
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
276 /* Declare local variables */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
277 T_DAR_INFO *buffer_p= " DAR Emergency exception : ARM SWI ";/*exception data to store*/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
278
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
279 /* Update the DAR recovery status */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
280 dar_current_status = DAR_EMERGENCY_SCUTTLING;
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 /* Update the DAR exception status */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
283 dar_exception_status = DAR_EXCEPTION_SWI;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
284
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
285 /* Empty the mail box and store data in RAM buffer */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
286 dar_empty_mb_and_save_data(buffer_p);
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
287
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
288 /* Check if the DAR entity is started */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
289 if (dar_gbl_var_p != NULL )
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
290 {
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
291 if ( dar_gbl_var_p->entity_dar_callback != NULL)
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
292 {
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
293 /* Call the MMI callback function to save some parameters before
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
294 reset */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
295 dar_gbl_var_p->entity_dar_callback(dar_recovery_buffer,
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
296 DAR_RECOVERY_DATA_MAX_BUFFER_SIZE);
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
297 }
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
298 }
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
299
310
083f262b7bbe gsm-fw: disabled DAR links
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 308
diff changeset
300 dar_reset();
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
301
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
302 } /* dar_exception_arm_swi */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
303
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
304 /***************************************************************************/
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
305 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
306 /* Function Name: dar_exception_arm_abort_prefetch */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
307 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
308 /* Purpose: This function is called to process ARM abort prefetch */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
309 /* exception and to store this exception in the RAM buffer. */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
310 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
311 /* Input Parameters: */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
312 /* None */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
313 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
314 /* Output Parameters: */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
315 /* Validation of the diagnose execution. */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
316 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
317 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
318 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
319 /* Revision History: */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
320 /* None. */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
321 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
322 /***************************************************************************/
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
323 void dar_exception_arm_abort_prefetch(void)
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
324 {
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
325 #ifndef _WINDOWS
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
326 /* Local variable */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
327 UINT8 i;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
328 #endif
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
329
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
330 #if ((CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || \
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
331 (CHIPSET == 11) || (CHIPSET == 12))
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
332 /* Debug unit pointer */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
333 volatile UINT32 *debug_register_p;
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
334 #endif
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
335
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
336 /* Declare local variables */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
337 T_DAR_INFO *buffer_p = " DAR Emergency exception : ARM abort prefetch";/*exception data to store*/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
338
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
339 /* Update the DAR recovery status */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
340 dar_current_status = DAR_EMERGENCY_SCUTTLING;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
341
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
342 /* Update the DAR exception status */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
343 dar_exception_status = DAR_EXCEPTION_PREFETCH_ABORT;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
344
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
345 /* Empty the mail box and store data in RAM buffer */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
346 dar_empty_mb_and_save_data(buffer_p);
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
347
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
348 /* Check if the DAR entity is started */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
349 if (dar_gbl_var_p != NULL )
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
350 {
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
351 if (dar_gbl_var_p->entity_dar_callback != NULL)
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
352 {
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
353 /* Call the MMI callback function to save some parameters before
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
354 reset */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
355 dar_gbl_var_p->entity_dar_callback(dar_recovery_buffer,
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
356 DAR_RECOVERY_DATA_MAX_BUFFER_SIZE);
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
357 }
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
358 }
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
359
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
360 #if ((CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || \
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
361 (CHIPSET == 11) || (CHIPSET == 12))
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
362 /* Initialize the adress of the Debug Unit pointer */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
363 debug_register_p = (volatile UINT32*) DAR_DEBUG_UNIT_REGISTER;
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
364 #endif
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
365
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
366 #ifndef _WINDOWS
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
367 #if ((CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || \
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
368 (CHIPSET == 11) || (CHIPSET == 12))
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
369 /* Save the Debug Unit into the RAM */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
370 for (i=0; i<DEBUG_UNIT_WORD_SIZE; i++ )
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
371 {
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
372 debug_RAM[i] = *debug_register_p;
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
373 debug_register_p++;
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
374 }
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
375 #endif
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
376
310
083f262b7bbe gsm-fw: disabled DAR links
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 308
diff changeset
377 dar_reset();
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
378 #endif
310
083f262b7bbe gsm-fw: disabled DAR links
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 308
diff changeset
379
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
380 } /* dar_exception_arm_abort_prefetch */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
381
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
382 /***************************************************************************/
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
383 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
384 /* Function Name: dar_exception_arm_abort_data */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
385 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
386 /* Purpose: This function is called to process ARM abort data exception*/
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
387 /* and to store this exception in the RAM buffer */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
388 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
389 /* Input Parameters: */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
390 /* None */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
391 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
392 /* Output Parameters: */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
393 /* Validation of the diagnose execution. */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
394 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
395 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
396 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
397 /* Revision History: */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
398 /* None. */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
399 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
400 /***************************************************************************/
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
401 void dar_exception_arm_abort_data(void)
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
402 {
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
403 #ifndef _WINDOWS
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
404 /* Local variable */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
405 UINT8 i;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
406 #endif
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
407
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
408 #if ((CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || \
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
409 (CHIPSET == 11) || (CHIPSET == 12))
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
410 /* Debug unit pointer */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
411 volatile UINT32 *debug_register_p;
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
412 #endif
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
413
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
414 /* Declare local variables */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
415 T_DAR_INFO *buffer_p= " DAR Emergency exception : ARM abort data";/*exception data to store*/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
416
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
417 /* Update the DAR recovery status */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
418 dar_current_status = DAR_EMERGENCY_SCUTTLING;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
419
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
420 /* Update the DAR exception status */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
421 dar_exception_status = DAR_EXCEPTION_DATA_ABORT;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
422
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
423 /* Empty the mail box and store data in RAM buffer */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
424 dar_empty_mb_and_save_data(buffer_p);
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
425
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
426 /* Check if the DAR entity is started */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
427 if (dar_gbl_var_p != NULL )
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
428 {
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
429 if (dar_gbl_var_p->entity_dar_callback != NULL)
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
430 {
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
431
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
432 /* Call the MMI callback function to save some parameters before
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
433 reset */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
434 dar_gbl_var_p->entity_dar_callback(dar_recovery_buffer,
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
435 DAR_RECOVERY_DATA_MAX_BUFFER_SIZE);
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
436 }
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
437 }
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
438
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
439 #if ((CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || \
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
440 (CHIPSET == 11) || (CHIPSET == 12))
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
441 /* Initialize the adress of the Debug Unit pointer */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
442 debug_register_p = (volatile UINT32*) DAR_DEBUG_UNIT_REGISTER;
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
443 #endif
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
444
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
445 #ifndef _WINDOWS
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
446 #if ((CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || \
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
447 (CHIPSET == 11) || (CHIPSET == 12))
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
448 /* Save the Debug Unit into the RAM */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
449 for (i=0; i<DEBUG_UNIT_WORD_SIZE; i++ )
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
450 {
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
451 debug_RAM[i] = *debug_register_p;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
452 debug_register_p++;
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
453 }
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
454 #endif
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
455
310
083f262b7bbe gsm-fw: disabled DAR links
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 308
diff changeset
456 dar_reset();
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
457 #endif
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
458
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
459 } /* dar_exception_arm_abort_data */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
460
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
461 /***************************************************************************/
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
462 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
463 /* Function Name: dar_exception_arm_reserved */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
464 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
465 /* Purpose: This function is called to process ARM exception */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
466 /* and to store this exception in the RAM buffer */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
467 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
468 /* Input Parameters: */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
469 /* None */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
470 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
471 /* Output Parameters: */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
472 /* Validation of the diagnose execution. */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
473 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
474 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
475 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
476 /* Revision History: */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
477 /* None. */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
478 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
479 /***************************************************************************/
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
480 void dar_exception_arm_reserved(void)
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
481 {
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
482 /* Declare local variables */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
483 T_DAR_INFO *buffer_p= " DAR Emergency exception : ARM reserved";/*exception data to store*/
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
484
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
485 /* Update the DAR recovery status */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
486 dar_current_status = DAR_EMERGENCY_SCUTTLING;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
487
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
488 /* Update the DAR exception status */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
489 dar_exception_status = DAR_EXCEPTION_RESERVED;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
490
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
491 /* Empty the mail box and store data in RAM buffer */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
492 dar_empty_mb_and_save_data(buffer_p);
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
493
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
494 /* Check if the DAR entity is started */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
495 if (dar_gbl_var_p != NULL )
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
496 {
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
497 if (dar_gbl_var_p->entity_dar_callback != NULL)
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
498 {
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
499 /* Call the MMI callback function to save some parameters before
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
500 reset */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
501 dar_gbl_var_p->entity_dar_callback(dar_recovery_buffer,
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
502 DAR_RECOVERY_DATA_MAX_BUFFER_SIZE);
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
503 }
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
504 }
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
505
310
083f262b7bbe gsm-fw: disabled DAR links
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 308
diff changeset
506 dar_reset();
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
507
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
508 } /* dar_exception_arm_reserved */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
509
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
510 /****************************************************************************/
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
511 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
512 /* Function Name: dar_exception */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
513 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
514 /* Purpose: This function is called to vector exceptions to the correct */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
515 /* handler */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
516 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
517 /* Input Parameters: */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
518 /* abort type which come from int.s ( -> magic number) */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
519 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
520 /* Output Parameters: */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
521 /* Validation of the diagnose execution. */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
522 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
523 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
524 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
525 /* Revision History: */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
526 /* None. */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
527 /* */
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
528 /****************************************************************************/
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
529 void dar_exception(int abort_type)
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
530 {
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
531 switch (abort_type)
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
532 {
308
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
533 /* magic numbers come from int.s There is no way to make compiler
3c5a17928fda DAR: starting to clean and compile .c files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 305
diff changeset
534 * derived constants out of them
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
535 */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
536 case 1:
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
537 dar_exception_arm_undefined();
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
538 break;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
539 case 2:
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
540 dar_exception_arm_swi();
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
541 break;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
542 case 3:
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
543 dar_exception_arm_abort_prefetch();
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
544 break;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
545 case 4:
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
546 dar_exception_arm_abort_data();
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
547 break;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
548 case 5:
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
549 dar_exception_arm_reserved();
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
550 break;
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
551 }
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
552 } /* dar_exception */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
553
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
554 #else
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
555 /* ************************************************ */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
556 /* THE DAR ENTITY IS DISABLED */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
557 /* ************************************************ */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
558
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
559 void dar_exception(int abort_type)
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
560 {
311
a2194416fd7c gsm-fw: preparations for ARM exception handling (DAR disabled for now)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 310
diff changeset
561 static char msg[] = "*ARM EXCEPTION #?";
a2194416fd7c gsm-fw: preparations for ARM exception handling (DAR disabled for now)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 310
diff changeset
562
a2194416fd7c gsm-fw: preparations for ARM exception handling (DAR disabled for now)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 310
diff changeset
563 if (abort_type >= 0 && abort_type <= 9)
a2194416fd7c gsm-fw: preparations for ARM exception handling (DAR disabled for now)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 310
diff changeset
564 msg[16] = abort_type + '0';
a2194416fd7c gsm-fw: preparations for ARM exception handling (DAR disabled for now)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 310
diff changeset
565 freecalypso_raw_dbgout(msg);
310
083f262b7bbe gsm-fw: disabled DAR links
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 308
diff changeset
566 while (1)
083f262b7bbe gsm-fw: disabled DAR links
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 308
diff changeset
567 ;
305
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
568 } /* dar_exception */
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
569
4dccc9d3305f gsm-fw: checking in DAR from Leonardo source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
570 #endif /* #ifdef RVM_DAR_SWE */