Changeset ca7858bb in rtems


Ignore:
Timestamp:
Jul 26, 2000, 7:28:11 PM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
8c3c1763
Parents:
17508d02
Message:

Port of RTEMS to the Texas Instruments C3x/C4x DSP families including
a BSP (c4xsim) supporting the simulator included with gdb. This port
was done by Joel Sherrill and Jennifer Averett of OAR Corporation.
Also included with this port is a space/time optimization to eliminate
FP context switch management on CPUs without hardware or software FP.

An issue with this port was that sizeof(unsigned32) = sizeof(unsigned8)
on this CPU. This required addressing alignment checks and assumptions
as well as fixing code that assumed sizeof(unsigned32) == 4.

Files:
2 added
26 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/c4x/c4xsim/tools/.cvsignore

    r17508d02 rca7858bb  
    11Makefile
    22Makefile.in
     3configure
     4aclocal.m4
  • c/src/lib/libbsp/shared/main.c

    r17508d02 rca7858bb  
    2121char *rtems_progname;
    2222
    23 rtems_interrupt_level bsp_isr_level;
     23extern rtems_interrupt_level bsp_isr_level;
    2424
    2525int main(int argc, char **argv)
  • c/src/lib/libc/malloc.c

    r17508d02 rca7858bb  
    8383    }
    8484
    85     if (u32_address & (CPU_ALIGNMENT-1)) {
     85    if (u32_address & (CPU_HEAP_ALIGNMENT-1)) {
    8686      old_address = u32_address;
    87       u32_address = (u32_address + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
     87      u32_address = (u32_address + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1);
    8888
    8989       /*
  • c/src/libmisc/monitor/mon-monitor.c

    r17508d02 rca7858bb  
    526526        debugee = _Thread_Executing;
    527527        rp = &debugee->Registers;
     528#if (CPU_HARDWARE_FP == TRUE) || (CPU_SOFTWARE_FP == TRUE)
    528529        fp = (rtems_context_fp *) debugee->fp_context;  /* possibly 0 */
     530#else
     531        fp = 0;
     532#endif
    529533
    530534        if (0 == rtems_monitor_command_read(command_buffer, &argc, argv))
  • c/src/libnetworking/pppd/fsm.c

    r17508d02 rca7858bb  
    3737
    3838static void fsm_timeout __P((void *));
    39 static void fsm_rconfreq __P((fsm *, int, u_char *, int));
     39static void fsm_rconfreq __P((fsm *, u_char, u_char *, int));
    4040static void fsm_rconfack __P((fsm *, int, u_char *, int));
    4141static void fsm_rconfnakrej __P((fsm *, int, int, u_char *, int));
  • c/src/libnetworking/pppd/fsm.h

    r17508d02 rca7858bb  
    136136void fsm_input __P((fsm *, u_char *, int));
    137137void fsm_protreject __P((fsm *));
    138 void fsm_sdata __P((fsm *, int, int, u_char *, int));
     138void fsm_sdata __P((fsm *, u_char, u_char, u_char *, int));
    139139
    140140
  • c/src/libnetworking/pppd/upap.c

    r17508d02 rca7858bb  
    7373static void upap_rauthnak __P((upap_state *, u_char *, int, int));
    7474static void upap_sauthreq __P((upap_state *));
    75 static void upap_sresp __P((upap_state *, int, int, char *, int));
     75static void upap_sresp __P((upap_state *, u_char, u_char, char *, int));
    7676
    7777
  • c/src/librpc/Makefile.am

    r17508d02 rca7858bb  
    66ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
    77
     8if rpc_not_supported
     9SUBDIRS =
     10else
    811SUBDIRS = include src
     12endif
    913
    1014EXTRA_DIST = README_RTEMS
  • c/src/librpc/configure.in

    r17508d02 rca7858bb  
    2727
    2828AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")
     29AM_CONDITIONAL(rpc_not_supported, test "$RTEMS_CPU" = "c4x")
    2930
    3031RTEMS_PROJECT_ROOT
  • c/src/tests/sptests/spsize/size.c

    r17508d02 rca7858bb  
    357357                (sizeof _Thread_Executing)                +
    358358                (sizeof _Thread_Heir)                     +
     359#if (CPU_HARDWARE_FP == 1) || (CPU_SOFTWARE_FP == 1)
    359360                (sizeof _Thread_Allocated_fp)             +
     361#endif
    360362                (sizeof _Thread_Internal_information)     +
    361363                (sizeof _Thread_Idle)                     +
  • c/src/tests/tmtests/tm26/task1.c

    r17508d02 rca7858bb  
    282282
    283283  Timer_initialize();
     284#if (CPU_HARDWARE_FP == 1) || (CPU_SOFTWARE_FP == 1)
    284285    _Context_Restore_fp( &_Thread_Executing->fp_context );
     286#endif
    285287    _Context_Switch( &executing->Registers, &_Thread_Executing->Registers );
    286288}
     
    307309
    308310  Timer_initialize();
     311#if (CPU_HARDWARE_FP == 1) || (CPU_SOFTWARE_FP == 1)
    309312    _Context_Save_fp( &executing->fp_context );
    310313    _Context_Restore_fp( &_Thread_Executing->fp_context );
     314#endif
    311315    _Context_Switch( &executing->Registers, &_Thread_Executing->Registers );
    312316  /* switch to Floating_point_task_2 */
     
    328332
    329333  Timer_initialize();
     334#if (CPU_HARDWARE_FP == 1) || (CPU_SOFTWARE_FP == 1)
    330335    _Context_Save_fp( &executing->fp_context );
    331336    _Context_Restore_fp( &_Thread_Executing->fp_context );
     337#endif
    332338    _Context_Switch( &executing->Registers, &_Thread_Executing->Registers );
    333339  /* switch to Floating_point_task_2 */
     
    357363
    358364  Timer_initialize();
     365#if (CPU_HARDWARE_FP == 1) || (CPU_SOFTWARE_FP == 1)
    359366    _Context_Save_fp( &executing->fp_context );
    360367    _Context_Restore_fp( &_Thread_Executing->fp_context );
     368#endif
    361369    _Context_Switch( &executing->Registers, &_Thread_Executing->Registers );
    362370  /* switch to Floating_point_task_1 */
     
    494502  );
    495503
     504#if (CPU_HARDWARE_FP == 1) || (CPU_SOFTWARE_FP == 1)
    496505  put_time(
    497506    "fp context switch: restore 1st FP task",
     
    525534    0
    526535  );
     536#else
     537    puts( "fp context switch: restore 1st FP task - NA" );
     538    puts( "fp context switch: save idle, restore initialized - NA" );
     539    puts( "fp context switch: save idle, restore idle - NA" );
     540    puts( "fp context switch: save initialized, restore initialized - NA" );
     541#endif
    527542
    528543  put_time(
  • c/src/wrapup/Makefile.am

    r17508d02 rca7858bb  
    1414if HAS_NETWORKING
    1515LIBNETWORKING = $(PROJECT_RELEASE)/lib/libnetworking$(LIB_VARIANT).a \
    16     $(PROJECT_RELEASE)/lib/librpc$(LIB_VARIANT).a \
    17     $(PROJECT_RELEASE)/lib/libxdr$(LIB_VARIANT).a
     16    $(wildcard $(PROJECT_RELEASE)/lib/librpc$(LIB_VARIANT).a) \
     17    $(wildcard $(PROJECT_RELEASE)/lib/libxdr$(LIB_VARIANT).a)
    1818endif
    1919
  • cpukit/libcsupport/src/malloc.c

    r17508d02 rca7858bb  
    8383    }
    8484
    85     if (u32_address & (CPU_ALIGNMENT-1)) {
     85    if (u32_address & (CPU_HEAP_ALIGNMENT-1)) {
    8686      old_address = u32_address;
    87       u32_address = (u32_address + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
     87      u32_address = (u32_address + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1);
    8888
    8989       /*
  • cpukit/libmisc/monitor/mon-monitor.c

    r17508d02 rca7858bb  
    526526        debugee = _Thread_Executing;
    527527        rp = &debugee->Registers;
     528#if (CPU_HARDWARE_FP == TRUE) || (CPU_SOFTWARE_FP == TRUE)
    528529        fp = (rtems_context_fp *) debugee->fp_context;  /* possibly 0 */
     530#else
     531        fp = 0;
     532#endif
    529533
    530534        if (0 == rtems_monitor_command_read(command_buffer, &argc, argv))
  • cpukit/librpc/Makefile.am

    r17508d02 rca7858bb  
    66ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
    77
     8if rpc_not_supported
     9SUBDIRS =
     10else
    811SUBDIRS = include src
     12endif
    913
    1014EXTRA_DIST = README_RTEMS
  • cpukit/pppd/fsm.c

    r17508d02 rca7858bb  
    3737
    3838static void fsm_timeout __P((void *));
    39 static void fsm_rconfreq __P((fsm *, int, u_char *, int));
     39static void fsm_rconfreq __P((fsm *, u_char, u_char *, int));
    4040static void fsm_rconfack __P((fsm *, int, u_char *, int));
    4141static void fsm_rconfnakrej __P((fsm *, int, int, u_char *, int));
  • cpukit/pppd/fsm.h

    r17508d02 rca7858bb  
    136136void fsm_input __P((fsm *, u_char *, int));
    137137void fsm_protreject __P((fsm *));
    138 void fsm_sdata __P((fsm *, int, int, u_char *, int));
     138void fsm_sdata __P((fsm *, u_char, u_char, u_char *, int));
    139139
    140140
  • cpukit/pppd/upap.c

    r17508d02 rca7858bb  
    7373static void upap_rauthnak __P((upap_state *, u_char *, int, int));
    7474static void upap_sauthreq __P((upap_state *));
    75 static void upap_sresp __P((upap_state *, int, int, char *, int));
     75static void upap_sresp __P((upap_state *, u_char, u_char, char *, int));
    7676
    7777
  • cpukit/score/src/thread.c

    r17508d02 rca7858bb  
    6464  _Thread_Executing         = NULL;
    6565  _Thread_Heir              = NULL;
     66#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
    6667  _Thread_Allocated_fp      = NULL;
     68#endif
    6769
    6870  _Thread_Do_post_task_switch_extension = 0;
  • cpukit/score/src/threadclose.c

    r17508d02 rca7858bb  
    5454  _User_extensions_Thread_delete( the_thread );
    5555 
     56#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
    5657#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
    5758  if ( _Thread_Is_allocated_fp( the_thread ) )
     
    6162
    6263  if ( the_thread->Start.fp_context )
    63   (void) _Workspace_Free( the_thread->Start.fp_context );
     64    (void) _Workspace_Free( the_thread->Start.fp_context );
     65#endif
    6466
    6567  _Thread_Stack_Free( the_thread );
  • cpukit/score/src/threaddispatch.c

    r17508d02 rca7858bb  
    9393     */
    9494
    95 #if ( CPU_HARDWARE_FP == TRUE )
     95#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
    9696#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
    9797    if ( (heir->fp_context != NULL) && !_Thread_Is_allocated_fp( heir ) ) {
  • cpukit/score/src/threadinitialize.c

    r17508d02 rca7858bb  
    9696   */
    9797 
     98#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
    9899  if ( is_fp ) {
    99100
     
    110111  the_thread->fp_context       = fp_area;
    111112  the_thread->Start.fp_context = fp_area;
     113#endif
    112114
    113115  /*
  • cpukit/score/src/threadloadenv.c

    r17508d02 rca7858bb  
    4646  boolean is_fp = FALSE;
    4747
     48#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
    4849  if ( the_thread->Start.fp_context ) {
    4950    the_thread->fp_context = the_thread->Start.fp_context;
     
    5152    is_fp = TRUE;
    5253  }
     54#endif
    5355
    5456  the_thread->do_post_task_switch_extension = FALSE;
  • make/custom/c4xsim.cfg

    r17508d02 rca7858bb  
    5151
    5252define make-exe
    53         $(CC) $(CPPFLAGS) $(CFLAGS) -o $(basename $@).exe \
     53        $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
     54            $(LDLIBS) -o $@ \
    5455            $(LINK_OBJS) $(LINK_LIBS)
    5556        $(NM) -g -n $@ > $(basename $@).num
  • testsuites/sptests/spsize/size.c

    r17508d02 rca7858bb  
    357357                (sizeof _Thread_Executing)                +
    358358                (sizeof _Thread_Heir)                     +
     359#if (CPU_HARDWARE_FP == 1) || (CPU_SOFTWARE_FP == 1)
    359360                (sizeof _Thread_Allocated_fp)             +
     361#endif
    360362                (sizeof _Thread_Internal_information)     +
    361363                (sizeof _Thread_Idle)                     +
  • testsuites/tmtests/tm26/task1.c

    r17508d02 rca7858bb  
    282282
    283283  Timer_initialize();
     284#if (CPU_HARDWARE_FP == 1) || (CPU_SOFTWARE_FP == 1)
    284285    _Context_Restore_fp( &_Thread_Executing->fp_context );
     286#endif
    285287    _Context_Switch( &executing->Registers, &_Thread_Executing->Registers );
    286288}
     
    307309
    308310  Timer_initialize();
     311#if (CPU_HARDWARE_FP == 1) || (CPU_SOFTWARE_FP == 1)
    309312    _Context_Save_fp( &executing->fp_context );
    310313    _Context_Restore_fp( &_Thread_Executing->fp_context );
     314#endif
    311315    _Context_Switch( &executing->Registers, &_Thread_Executing->Registers );
    312316  /* switch to Floating_point_task_2 */
     
    328332
    329333  Timer_initialize();
     334#if (CPU_HARDWARE_FP == 1) || (CPU_SOFTWARE_FP == 1)
    330335    _Context_Save_fp( &executing->fp_context );
    331336    _Context_Restore_fp( &_Thread_Executing->fp_context );
     337#endif
    332338    _Context_Switch( &executing->Registers, &_Thread_Executing->Registers );
    333339  /* switch to Floating_point_task_2 */
     
    357363
    358364  Timer_initialize();
     365#if (CPU_HARDWARE_FP == 1) || (CPU_SOFTWARE_FP == 1)
    359366    _Context_Save_fp( &executing->fp_context );
    360367    _Context_Restore_fp( &_Thread_Executing->fp_context );
     368#endif
    361369    _Context_Switch( &executing->Registers, &_Thread_Executing->Registers );
    362370  /* switch to Floating_point_task_1 */
     
    494502  );
    495503
     504#if (CPU_HARDWARE_FP == 1) || (CPU_SOFTWARE_FP == 1)
    496505  put_time(
    497506    "fp context switch: restore 1st FP task",
     
    525534    0
    526535  );
     536#else
     537    puts( "fp context switch: restore 1st FP task - NA" );
     538    puts( "fp context switch: save idle, restore initialized - NA" );
     539    puts( "fp context switch: save idle, restore idle - NA" );
     540    puts( "fp context switch: save initialized, restore initialized - NA" );
     541#endif
    527542
    528543  put_time(
Note: See TracChangeset for help on using the changeset viewer.