# HG changeset patch # User Space Falcon # Date 1430000108 0 # Node ID eebafd9f4275de090861a254cfd725abf5b9e007 # Parent 21247e7d0b8df848677354030fa3dacdd196c733 cst_pei.c compiles diff -r 21247e7d0b8d -r eebafd9f4275 gsm-fw/g23m-glue/cst/Makefile --- a/gsm-fw/g23m-glue/cst/Makefile Sat Apr 25 21:36:27 2015 +0000 +++ b/gsm-fw/g23m-glue/cst/Makefile Sat Apr 25 22:15:08 2015 +0000 @@ -5,7 +5,7 @@ CPPFLAGS=-I. -I../../include -I../../include/condat -I../../gpf/inc \ -I../../cdginc -OBJS= cst_csf.o cst_exts.o +OBJS= cst_csf.o cst_exts.o cst_pei.o all: ${OBJS} diff -r 21247e7d0b8d -r eebafd9f4275 gsm-fw/g23m-glue/cst/cst_pei.c --- a/gsm-fw/g23m-glue/cst/cst_pei.c Sat Apr 25 21:36:27 2015 +0000 +++ b/gsm-fw/g23m-glue/cst/cst_pei.c Sat Apr 25 22:15:08 2015 +0000 @@ -27,9 +27,9 @@ #define CST_PEI_C #endif -#include "config/swconfig.cfg" -#include "config/chipset.cfg" - +#include "config.h" +#include "fixedconf.h" +#include "condat-features.h" #define ENTITY_CST @@ -43,12 +43,12 @@ #include "custom.h" #include "gsm.h" #include "prim.h" -#include "cst/cnf_cst.h" -#include "cst/cus_cst.h" -#include "cst/mon_cst.h" +#include "cnf_cst.h" +#include "cus_cst.h" +#include "mon_cst.h" #include "tok.h" #include "p_cst.h" -#include "cst/cst.h" +#include "cst.h" #include "rx.h" #include "audio.h" @@ -80,7 +80,7 @@ EXTERN UBYTE audio_is_free; /*==== PRIVATE ====================================================*/ -LOCAL const void pei_not_supported (void *data); +LOCAL void pei_not_supported (void *data); #ifdef OPTION_RELATIVE LOCAL ULONG offset; @@ -101,7 +101,7 @@ /*==== PROTOTYPES==================================================*/ -#if defined (_TMS470) +#if 1 //defined (_TMS470) static SHORT cst_tok_gettok (TOK_DCB *dcb, char ** token); static SHORT cst_tok_value (TOK_DCB *dcb, char * value []); @@ -183,7 +183,7 @@ PURPOSE : This function handles an unsupported primitive. */ -LOCAL const void pei_not_supported (void *data) +LOCAL void pei_not_supported (void *data) { TRACE_FUNCTION ("pei_not_supported()"); @@ -227,7 +227,7 @@ vsi_t_start (VSI_CALLER CST_ADC_TIMER, 230); // equal to 50 TDMA frames -#if defined (_TMS470) +#if 1 //defined (_TMS470) // Set the sleep mode authorized for the layer1 synchronous. // Possible modes are : // for CHIPSET = 0 : NO_SLEEP, SMALL_SLEEP, BIG_SLEEP. @@ -284,10 +284,10 @@ // The user has to implement it by himself in the MMI. // The parameters are : tx_flag, traffic_period, idle_period. // Please refer to the ADC specification for details. - - // WCS Patch : Schedule ADC on RX and TX + + // WCS Patch : Schedule ADC on RX and TX #if (OP_WCP == 1) - csf_adc_start(1, 10, 1); + csf_adc_start(1, 10, 1); #else csf_adc_start(0, 10, 1); #endif @@ -863,21 +863,21 @@ // GET CONTROL ID if ((id = cst_getbyte(dcb)) == -1) { - // vsi_o_trace("CST", 0x08, "gsm_parameters() parser error: out of bytes"); + vsi_o_trace("CST", 0x08, "gsm_parameters() parser error: out of bytes"); return (0); } // STACK TRACE else if (id == '1') { - CST_stack_trace(); + CST_stack_trace(); } //end else if (id == '1') // Crash Me else if (id == '2') { // No instruction before setting the reset vector - void (*reset_vector)() = (void (*)()) 0x3000000; + void (*reset_vector)() = (void (*)()) 0; (*reset_vector)(); } //end else if (id == '2') #if defined (ALR) @@ -891,70 +891,70 @@ // displays the 16 User mode 32bits registers saved on exception // vsi_o_trace("CST", 0x08, "User mode registers [r0-r15] = ..."); for (i=0; i<4; i++) - { - sprintf(str, "%08x %08x %08x %08x", *(xp++), *(xp++), + { + sprintf(str, "%08x %08x %08x %08x", *(xp++), *(xp++), *(xp++), *(xp++)); - // vsi_o_trace("CST", 0x08, str); - } + vsi_o_trace("CST", 0x08, str); + } // displays the User mode CPSR saved on exception - sprintf(str, "User mode CPSR = %08x", *(xp++)); - // vsi_o_trace("CST", 0x08, str); + sprintf(str, "User mode CPSR = %08x", *(xp++)); + vsi_o_trace("CST", 0x08, str); // displays the magic word and the index of vector taken magic_word = *(xp++); sprintf(str, "Magic Word + Index of Vector = %08x", magic_word); - // vsi_o_trace("CST", 0x08, str); + vsi_o_trace("CST", 0x08, str); // displays the cause of the exception - magic_word &= 0x000F; + magic_word &= 0x000F; switch (magic_word) { case 1: - // vsi_o_trace("CST", 0x08, "Exception: Undefined Instruction"); - break; + vsi_o_trace("CST", 0x08, "Exception: Undefined Instruction"); + break; case 2: - // vsi_o_trace("CST", 0x08, "Exception: Unexpected Software Interrupt"); - break; + vsi_o_trace("CST", 0x08, "Exception: Unexpected Software Interrupt"); + break; case 3: - // vsi_o_trace("CST", 0x08, "Exception: Abort Prefetch"); - break; + vsi_o_trace("CST", 0x08, "Exception: Abort Prefetch"); + break; case 4: - // vsi_o_trace("CST", 0x08, "Exception: Abort Data"); - break; + vsi_o_trace("CST", 0x08, "Exception: Abort Data"); + break; case 5: - // vsi_o_trace("CST", 0x08, "Exception: Reserved"); - break; + vsi_o_trace("CST", 0x08, "Exception: Reserved"); + break; default: - break; - } + break; + } // displays the bottom 20 words of user mode stack saved on exception // vsi_o_trace("CST", 0x08, "Bottom 20 words of User mode stack = ..."); for (i=0; i<5; i++) - { - sprintf(str, "%08x %08x %08x %08x", *(xp++), *(xp++), + { + sprintf(str, "%08x %08x %08x %08x", *(xp++), *(xp++), *(xp++), *(xp++)); - // vsi_o_trace("CST", 0x08, str); - } + vsi_o_trace("CST", 0x08, str); + } } //end else if (id == '3') // Clear Reg Copy else if (id == '4') { extern int xdump_buffer; - int *xp = &xdump_buffer; + int *xp = &xdump_buffer; // Clears the 38 32bits registers saved on exception for (i=0; i<38; i++) - { + { *(xp+i) = 0; - } + } // vsi_o_trace("CST", 0x08, "Registers Copy cleared ..."); } //end else if (id == '4') #endif