forked from Imagelibrary/rtems
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.
This commit is contained in:
@@ -1,2 +1,4 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
configure
|
||||
aclocal.m4
|
||||
|
||||
2
c/src/lib/libbsp/c4x/c4xsim/wrapup/.cvsignore
Normal file
2
c/src/lib/libbsp/c4x/c4xsim/wrapup/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
13
c/src/lib/libbsp/c4x/shared/.cvsignore
Normal file
13
c/src/lib/libbsp/c4x/shared/.cvsignore
Normal file
@@ -0,0 +1,13 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
config.cache
|
||||
config.guess
|
||||
config.log
|
||||
config.status
|
||||
config.sub
|
||||
configure
|
||||
depcomp
|
||||
install-sh
|
||||
missing
|
||||
mkinstalldirs
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
char *rtems_progname;
|
||||
|
||||
rtems_interrupt_level bsp_isr_level;
|
||||
extern rtems_interrupt_level bsp_isr_level;
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
|
||||
@@ -82,9 +82,9 @@ void RTEMS_Malloc_Initialize(
|
||||
/* DOES NOT RETURN!!! */
|
||||
}
|
||||
|
||||
if (u32_address & (CPU_ALIGNMENT-1)) {
|
||||
if (u32_address & (CPU_HEAP_ALIGNMENT-1)) {
|
||||
old_address = u32_address;
|
||||
u32_address = (u32_address + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
|
||||
u32_address = (u32_address + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1);
|
||||
|
||||
/*
|
||||
* adjust the length by whatever we aligned by
|
||||
|
||||
@@ -525,7 +525,11 @@ rtems_monitor_task(
|
||||
|
||||
debugee = _Thread_Executing;
|
||||
rp = &debugee->Registers;
|
||||
#if (CPU_HARDWARE_FP == TRUE) || (CPU_SOFTWARE_FP == TRUE)
|
||||
fp = (rtems_context_fp *) debugee->fp_context; /* possibly 0 */
|
||||
#else
|
||||
fp = 0;
|
||||
#endif
|
||||
|
||||
if (0 == rtems_monitor_command_read(command_buffer, &argc, argv))
|
||||
continue;
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "fsm.h"
|
||||
|
||||
static void fsm_timeout __P((void *));
|
||||
static void fsm_rconfreq __P((fsm *, int, u_char *, int));
|
||||
static void fsm_rconfreq __P((fsm *, u_char, u_char *, int));
|
||||
static void fsm_rconfack __P((fsm *, int, u_char *, int));
|
||||
static void fsm_rconfnakrej __P((fsm *, int, int, u_char *, int));
|
||||
static void fsm_rtermreq __P((fsm *, int, u_char *, int));
|
||||
|
||||
@@ -135,7 +135,7 @@ void fsm_open __P((fsm *));
|
||||
void fsm_close __P((fsm *, char *));
|
||||
void fsm_input __P((fsm *, u_char *, int));
|
||||
void fsm_protreject __P((fsm *));
|
||||
void fsm_sdata __P((fsm *, int, int, u_char *, int));
|
||||
void fsm_sdata __P((fsm *, u_char, u_char, u_char *, int));
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -72,7 +72,7 @@ static void upap_rauthreq __P((upap_state *, u_char *, int, int));
|
||||
static void upap_rauthack __P((upap_state *, u_char *, int, int));
|
||||
static void upap_rauthnak __P((upap_state *, u_char *, int, int));
|
||||
static void upap_sauthreq __P((upap_state *));
|
||||
static void upap_sresp __P((upap_state *, int, int, char *, int));
|
||||
static void upap_sresp __P((upap_state *, u_char, u_char, char *, int));
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -5,7 +5,11 @@
|
||||
AUTOMAKE_OPTIONS = foreign 1.4
|
||||
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
|
||||
|
||||
if rpc_not_supported
|
||||
SUBDIRS =
|
||||
else
|
||||
SUBDIRS = include src
|
||||
endif
|
||||
|
||||
EXTRA_DIST = README_RTEMS
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ RTEMS_CANONICALIZE_TOOLS
|
||||
RTEMS_CHECK_NETWORKING(RTEMS_BSP)
|
||||
|
||||
AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")
|
||||
AM_CONDITIONAL(rpc_not_supported, test "$RTEMS_CPU" = "c4x")
|
||||
|
||||
RTEMS_PROJECT_ROOT
|
||||
|
||||
|
||||
@@ -356,7 +356,9 @@ uninitialized =
|
||||
(sizeof _Thread_Ready_chain) +
|
||||
(sizeof _Thread_Executing) +
|
||||
(sizeof _Thread_Heir) +
|
||||
#if (CPU_HARDWARE_FP == 1) || (CPU_SOFTWARE_FP == 1)
|
||||
(sizeof _Thread_Allocated_fp) +
|
||||
#endif
|
||||
(sizeof _Thread_Internal_information) +
|
||||
(sizeof _Thread_Idle) +
|
||||
|
||||
|
||||
@@ -281,7 +281,9 @@ rtems_task Low_task(
|
||||
_Thread_Disable_dispatch();
|
||||
|
||||
Timer_initialize();
|
||||
#if (CPU_HARDWARE_FP == 1) || (CPU_SOFTWARE_FP == 1)
|
||||
_Context_Restore_fp( &_Thread_Executing->fp_context );
|
||||
#endif
|
||||
_Context_Switch( &executing->Registers, &_Thread_Executing->Registers );
|
||||
}
|
||||
|
||||
@@ -306,8 +308,10 @@ rtems_task Floating_point_task_1(
|
||||
_Thread_Disable_dispatch();
|
||||
|
||||
Timer_initialize();
|
||||
#if (CPU_HARDWARE_FP == 1) || (CPU_SOFTWARE_FP == 1)
|
||||
_Context_Save_fp( &executing->fp_context );
|
||||
_Context_Restore_fp( &_Thread_Executing->fp_context );
|
||||
#endif
|
||||
_Context_Switch( &executing->Registers, &_Thread_Executing->Registers );
|
||||
/* switch to Floating_point_task_2 */
|
||||
|
||||
@@ -327,8 +331,10 @@ rtems_task Floating_point_task_1(
|
||||
_Thread_Disable_dispatch();
|
||||
|
||||
Timer_initialize();
|
||||
#if (CPU_HARDWARE_FP == 1) || (CPU_SOFTWARE_FP == 1)
|
||||
_Context_Save_fp( &executing->fp_context );
|
||||
_Context_Restore_fp( &_Thread_Executing->fp_context );
|
||||
#endif
|
||||
_Context_Switch( &executing->Registers, &_Thread_Executing->Registers );
|
||||
/* switch to Floating_point_task_2 */
|
||||
}
|
||||
@@ -356,8 +362,10 @@ rtems_task Floating_point_task_2(
|
||||
_Thread_Disable_dispatch();
|
||||
|
||||
Timer_initialize();
|
||||
#if (CPU_HARDWARE_FP == 1) || (CPU_SOFTWARE_FP == 1)
|
||||
_Context_Save_fp( &executing->fp_context );
|
||||
_Context_Restore_fp( &_Thread_Executing->fp_context );
|
||||
#endif
|
||||
_Context_Switch( &executing->Registers, &_Thread_Executing->Registers );
|
||||
/* switch to Floating_point_task_1 */
|
||||
|
||||
@@ -493,6 +501,7 @@ void complete_test( void )
|
||||
0
|
||||
);
|
||||
|
||||
#if (CPU_HARDWARE_FP == 1) || (CPU_SOFTWARE_FP == 1)
|
||||
put_time(
|
||||
"fp context switch: restore 1st FP task",
|
||||
context_switch_restore_1st_fp_time,
|
||||
@@ -524,6 +533,12 @@ void complete_test( void )
|
||||
0,
|
||||
0
|
||||
);
|
||||
#else
|
||||
puts( "fp context switch: restore 1st FP task - NA" );
|
||||
puts( "fp context switch: save idle, restore initialized - NA" );
|
||||
puts( "fp context switch: save idle, restore idle - NA" );
|
||||
puts( "fp context switch: save initialized, restore initialized - NA" );
|
||||
#endif
|
||||
|
||||
put_time(
|
||||
"_Thread_Resume",
|
||||
|
||||
@@ -13,8 +13,8 @@ LIB = $(PROJECT_RELEASE)/lib/librtemsall${LIB_VARIANT}.a
|
||||
|
||||
if HAS_NETWORKING
|
||||
LIBNETWORKING = $(PROJECT_RELEASE)/lib/libnetworking$(LIB_VARIANT).a \
|
||||
$(PROJECT_RELEASE)/lib/librpc$(LIB_VARIANT).a \
|
||||
$(PROJECT_RELEASE)/lib/libxdr$(LIB_VARIANT).a
|
||||
$(wildcard $(PROJECT_RELEASE)/lib/librpc$(LIB_VARIANT).a) \
|
||||
$(wildcard $(PROJECT_RELEASE)/lib/libxdr$(LIB_VARIANT).a)
|
||||
endif
|
||||
|
||||
if HAS_RDBG
|
||||
|
||||
Reference in New Issue
Block a user