FreeCalypso > hg > tcs211-l1-reconst
diff chipsetsw/layer1/dyn_dwl_cfile/l1_dyn_dwl_afunc.c @ 28:d465d2510d28
TCS211 versions of l1_{dis,en}able_DSP_trace() functions reconstructed
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Thu, 22 Oct 2015 23:34:08 +0000 |
parents | 26666ef41058 |
children | 047d3d74908b |
line wrap: on
line diff
--- a/chipsetsw/layer1/dyn_dwl_cfile/l1_dyn_dwl_afunc.c Thu Oct 22 22:35:35 2015 +0000 +++ b/chipsetsw/layer1/dyn_dwl_cfile/l1_dyn_dwl_afunc.c Thu Oct 22 23:34:08 2015 +0000 @@ -410,6 +410,50 @@ } } +/* + * TCS211 had l1_disable_DSP_trace() and l1_enable_DSP_trace() functions + * implemented here in the l1_dyn_dwl code. The LoCosto version of L1 + * has l1_{dis,en}able_dsp_trace() instead (note the case difference) + * implemented in the l1_trace.c module. The LoCosto versions of these + * functions implement more complex logic with nesting, and use more + * state variables than are provided in TCS211 L1 data structures which + * we cannot change at this early phase of deblobbing. Therefore, + * we are going to recreate the simpler logic of the older + * l1_{dis,en}able_DSP_trace() functions from disassembly. + */ + +void l1_disable_DSP_trace() +{ +#if (CODE_VERSION != SIMULATION) + T_NDB_MCU_DSP* dsp_ndb_ptr = (T_NDB_MCU_DSP *) NDB_ADR; +#else + T_NDB_MCU_DSP* dsp_ndb_ptr = l1s_dsp_com.dsp_ndb_ptr; +#endif + + if (dsp_ndb_ptr->d_debug_trace_type != 0x0000) + { + l1a.dyn_dwnld.dsp_trace_level_copy = dsp_ndb_ptr->d_debug_trace_type; + dsp_ndb_ptr->d_debug_trace_type = (API)0x8000; /* 0x9000 in LoCosto */ + l1a.dyn_dwnld.trace_flag_blocked = TRUE; + } +} + +void l1_enable_DSP_trace() +{ +#if (CODE_VERSION != SIMULATION) + T_NDB_MCU_DSP* dsp_ndb_ptr = (T_NDB_MCU_DSP *) NDB_ADR; +#else + T_NDB_MCU_DSP* dsp_ndb_ptr = l1s_dsp_com.dsp_ndb_ptr; +#endif + + if ((l1a.dyn_dwnld.trace_flag_blocked == TRUE) && (dsp_ndb_ptr->d_debug_trace_type == 0x0000)) + { + l1a.dyn_dwnld.trace_flag_blocked = FALSE; + + dsp_ndb_ptr->d_debug_trace_type = (API)l1a.dyn_dwnld.dsp_trace_level_copy | 0x8000; + l1a.dyn_dwnld.dsp_trace_level_copy = 0x0000; + } +} /*---------------------------------------------------------- */ /* l1_push_Primitive */