# HG changeset patch # User Mychaela Falconia # Date 1465549193 0 # Node ID dfc7b0bc468ad92457fbb4c949c3dc1e93489803 # Parent 5fd4e7669c93ea5c6bc4620df1b41cd8a18c5705 L1/dyn_dwl_cfile/*.c: initial import from tcs211-l1-reconst diff -r 5fd4e7669c93 -r dfc7b0bc468a L1/dyn_dwl_cfile/l1_dyn_dwl_afunc.c --- a/L1/dyn_dwl_cfile/l1_dyn_dwl_afunc.c Fri Jun 10 08:56:53 2016 +0000 +++ b/L1/dyn_dwl_cfile/l1_dyn_dwl_afunc.c Fri Jun 10 08:59:53 2016 +0000 @@ -7,11 +7,10 @@ * ************* Revision Controle System Header *************/ -#include "config.h" #include "l1_confg.h" #include "l1_types.h" #include "sys_types.h" -#include "../../gpf/inc/cust_os.h" +#include "cust_os.h" #include "l1_macro.h" #include "l1_const.h" #if TESTMODE @@ -188,7 +187,7 @@ { UWORD16 j; UWORD16 counter=0; - UWORD16 msg_code_id=0 ;//omaps00090550 + UWORD16 msg_code_id; // Check if one of the messages belongs to the set of primitves which triggers a dynamic download and saves its index @@ -411,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 */ diff -r 5fd4e7669c93 -r dfc7b0bc468a L1/dyn_dwl_cfile/l1_dyn_dwl_apihisr.c --- a/L1/dyn_dwl_cfile/l1_dyn_dwl_apihisr.c Fri Jun 10 08:56:53 2016 +0000 +++ b/L1/dyn_dwl_cfile/l1_dyn_dwl_apihisr.c Fri Jun 10 08:59:53 2016 +0000 @@ -9,11 +9,9 @@ #include #include -#include "config.h" +#include "nucleus.h" #include "l1_confg.h" #include "sys_types.h" -#include "../../riviera/rv/rv_general.h" -#include "../../nucleus/nucleus.h" #include "l1_types.h" #include "l1audio_cust.h" #include "l1audio_defty.h" @@ -43,7 +41,7 @@ #endif #include "l1_defty.h" -#include "../../gpf/inc/cust_os.h" +#include "cust_os.h" /* #include "nu_main.h" */ #include "l1audio_signa.h" #include "l1audio_cust.h" diff -r 5fd4e7669c93 -r dfc7b0bc468a L1/dyn_dwl_cfile/l1_dyn_dwl_async.c --- a/L1/dyn_dwl_cfile/l1_dyn_dwl_async.c Fri Jun 10 08:56:53 2016 +0000 +++ b/L1/dyn_dwl_cfile/l1_dyn_dwl_async.c Fri Jun 10 08:59:53 2016 +0000 @@ -8,13 +8,11 @@ ************* Revision Controle System Header *************/ #include #include -#include "config.h" +#include "nucleus.h" #include "l1_confg.h" +#include "l1_types.h" #include "sys_types.h" -#include "../../riviera/rv/rv_general.h" -#include "../../nucleus/nucleus.h" -#include "l1_types.h" -#include "../../gpf/inc/cust_os.h" +#include "cust_os.h" #include "l1audio_signa.h" #include "l1audio_const.h" #include "l1audio_cust.h" @@ -46,7 +44,11 @@ #include "l1_defty.h" #include "l1_varex.h" #include "l1_trace.h" -/* #include "sys_dma.h" */ +#include "sys_dma.h" + +#if (OP_RIV_AUDIO == 1) + #include "rv/rv_general.h" +#endif #if (L1_DYN_DSP_DWNLD == 1) @@ -177,7 +179,7 @@ UWORD16 i; UWORD16 patch_id_uninstall_vect[MAX_NUM_OF_PATCH_IDS]; UWORD16 patch_id; - UWORD16 temp_patch_id[MAX_NUM_OF_PATCH_IDS]= {0}; //omaps00090550 + UWORD16 temp_patch_id[MAX_NUM_OF_PATCH_IDS]; BOOL return_flag = FALSE; // Primitive is processed only if it triggers a dynamic download or there is a delay @@ -263,7 +265,7 @@ #if ((TRACE_TYPE == 1) || (TRACE_TYPE == 4) || (TRACE_TYPE == 5)) if((trace_info.current_config->l1_dyn_trace) & (1<l1_dyn_trace) & (1< #include -#include "config.h" #include "l1_confg.h" #include "l1_types.h" #include "l1_const.h" @@ -131,6 +130,62 @@ *pp_src_mcu = (UWORD16 *) l1_apihisr.dyn_dwnld.running_source_pointer; } +/*--------------------------------------------------------*/ +/* l1_memcpy_16bit() */ +/*--------------------------------------------------------*/ +/* */ +/* Description: */ +/* ------------ */ +/* This function is equivalemt of memcopy. Thid function */ +/* does only 8/16 bit accessed to both source and */ +/* destination */ +/* */ +/* Input parameter: */ +/* --------------- */ +/* "src" - input pointer */ +/* "len" - number of bytes to copy */ +/* */ +/* Output parameter: */ +/* ---------------- */ +/* "dst" - output pointer */ +/* */ +/*--------------------------------------------------------*/ +void l1_memcpy_16bit(void *dst,void* src,unsigned int len) +{ + unsigned int i; + unsigned int tempLen; + unsigned char *cdst,*csrc; + unsigned short *ssrc,*sdst; + + cdst=dst; + csrc=src; + sdst=dst; + ssrc=src; + + if(((unsigned int)src&0x01) || ((unsigned int)dst&0x01)){ + // if either source or destination is not 16-bit aligned do the entire memcopy + // in 8-bit + for(i=0;i>1; + for(i=0;id_max_background=(API)(C_BGD_DSP_DYN_DWNLD+1); dyn_dwnld_copy_MCU_vect[0] = gprs_patch_array; + l1_set_dyn_dwnld_install_vect(size_vect,dyn_dwnld_address_vect,dyn_dwnld_crc_vect, gprs_patch_array, 0); + dyn_dwnld_copy_MCU_vect[1] = amr_sch_patch_array; + l1_set_dyn_dwnld_install_vect(size_vect,dyn_dwnld_address_vect,dyn_dwnld_crc_vect, amr_sch_patch_array, 1); + #if (L1_GTT == 1) dyn_dwnld_copy_MCU_vect[2] = tty_patch_array; + l1_set_dyn_dwnld_install_vect(size_vect,dyn_dwnld_address_vect,dyn_dwnld_crc_vect, tty_patch_array, 2); #endif + #if (MELODY_E2 == 1) dyn_dwnld_copy_MCU_vect[3] = amr_mms_patch_array; + l1_set_dyn_dwnld_install_vect(size_vect,dyn_dwnld_address_vect,dyn_dwnld_crc_vect, amr_mms_patch_array, 3); dyn_dwnld_copy_MCU_vect[4] = e2_patch_array; + l1_set_dyn_dwnld_install_vect(size_vect,dyn_dwnld_address_vect,dyn_dwnld_crc_vect, e2_patch_array, 4); #endif - for(i=0;i #include -#include "config.h" +#include "nucleus.h" #include "l1_confg.h" +#include "l1_types.h" #include "sys_types.h" -#include "../../riviera/rv/rv_general.h" -#include "../../nucleus/nucleus.h" -#include "l1_types.h" -#include "../../gpf/inc/cust_os.h" +#include "cust_os.h" #include "l1audio_signa.h" #include "l1audio_const.h" #include "l1audio_cust.h" @@ -48,7 +46,7 @@ #include "l1_defty.h" #include "l1_varex.h" #include "l1_trace.h" -/* #include "sys_dma.h" */ +#include "sys_dma.h" #if (L1_DYN_DSP_DWNLD == 1)