summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-07-26 19:28:11 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-07-26 19:28:11 +0000
commitca7858bb8856f1afcc537f39763b7c951e5068d3 (patch)
tree3f01b3bb41ce9b2d7bc16c300391382918758caf /cpukit
parentPort of RTEMS to the Texas Instruments C3x/C4x DSP families including (diff)
downloadrtems-ca7858bb8856f1afcc537f39763b7c951e5068d3.tar.bz2
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.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/libcsupport/src/malloc.c4
-rw-r--r--cpukit/libmisc/monitor/mon-monitor.c4
-rw-r--r--cpukit/librpc/Makefile.am4
-rw-r--r--cpukit/pppd/fsm.c2
-rw-r--r--cpukit/pppd/fsm.h2
-rw-r--r--cpukit/pppd/upap.c2
-rw-r--r--cpukit/score/src/thread.c2
-rw-r--r--cpukit/score/src/threadclose.c4
-rw-r--r--cpukit/score/src/threaddispatch.c2
-rw-r--r--cpukit/score/src/threadinitialize.c2
-rw-r--r--cpukit/score/src/threadloadenv.c2
11 files changed, 23 insertions, 7 deletions
diff --git a/cpukit/libcsupport/src/malloc.c b/cpukit/libcsupport/src/malloc.c
index 0396b051be..d3121f90b4 100644
--- a/cpukit/libcsupport/src/malloc.c
+++ b/cpukit/libcsupport/src/malloc.c
@@ -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
diff --git a/cpukit/libmisc/monitor/mon-monitor.c b/cpukit/libmisc/monitor/mon-monitor.c
index a531fc003c..ef86decda9 100644
--- a/cpukit/libmisc/monitor/mon-monitor.c
+++ b/cpukit/libmisc/monitor/mon-monitor.c
@@ -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;
diff --git a/cpukit/librpc/Makefile.am b/cpukit/librpc/Makefile.am
index d9429399ec..2377188d12 100644
--- a/cpukit/librpc/Makefile.am
+++ b/cpukit/librpc/Makefile.am
@@ -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
diff --git a/cpukit/pppd/fsm.c b/cpukit/pppd/fsm.c
index aeb4564b98..09b67486e5 100644
--- a/cpukit/pppd/fsm.c
+++ b/cpukit/pppd/fsm.c
@@ -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));
diff --git a/cpukit/pppd/fsm.h b/cpukit/pppd/fsm.h
index f289429fdc..c04050a369 100644
--- a/cpukit/pppd/fsm.h
+++ b/cpukit/pppd/fsm.h
@@ -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));
/*
diff --git a/cpukit/pppd/upap.c b/cpukit/pppd/upap.c
index f2cdb921c5..78b3b2f5f7 100644
--- a/cpukit/pppd/upap.c
+++ b/cpukit/pppd/upap.c
@@ -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));
/*
diff --git a/cpukit/score/src/thread.c b/cpukit/score/src/thread.c
index 9cb197e5bc..c71f025d39 100644
--- a/cpukit/score/src/thread.c
+++ b/cpukit/score/src/thread.c
@@ -63,7 +63,9 @@ void _Thread_Handler_initialization(
_Context_Switch_necessary = FALSE;
_Thread_Executing = NULL;
_Thread_Heir = NULL;
+#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
+#endif
_Thread_Do_post_task_switch_extension = 0;
diff --git a/cpukit/score/src/threadclose.c b/cpukit/score/src/threadclose.c
index 4f2c9a6de5..882672d47e 100644
--- a/cpukit/score/src/threadclose.c
+++ b/cpukit/score/src/threadclose.c
@@ -53,6 +53,7 @@ void _Thread_Close(
_User_extensions_Thread_delete( the_thread );
+#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( _Thread_Is_allocated_fp( the_thread ) )
_Thread_Deallocate_fp();
@@ -60,7 +61,8 @@ void _Thread_Close(
the_thread->fp_context = NULL;
if ( the_thread->Start.fp_context )
- (void) _Workspace_Free( the_thread->Start.fp_context );
+ (void) _Workspace_Free( the_thread->Start.fp_context );
+#endif
_Thread_Stack_Free( the_thread );
diff --git a/cpukit/score/src/threaddispatch.c b/cpukit/score/src/threaddispatch.c
index 311947cfa9..66a8996a12 100644
--- a/cpukit/score/src/threaddispatch.c
+++ b/cpukit/score/src/threaddispatch.c
@@ -92,7 +92,7 @@ void _Thread_Dispatch( void )
* operations.
*/
-#if ( CPU_HARDWARE_FP == TRUE )
+#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (heir->fp_context != NULL) && !_Thread_Is_allocated_fp( heir ) ) {
if ( _Thread_Allocated_fp != NULL )
diff --git a/cpukit/score/src/threadinitialize.c b/cpukit/score/src/threadinitialize.c
index 0d5154c400..fe4e9fa2b5 100644
--- a/cpukit/score/src/threadinitialize.c
+++ b/cpukit/score/src/threadinitialize.c
@@ -95,6 +95,7 @@ boolean _Thread_Initialize(
* Allocate the floating point area for this thread
*/
+#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
@@ -109,6 +110,7 @@ boolean _Thread_Initialize(
the_thread->fp_context = fp_area;
the_thread->Start.fp_context = fp_area;
+#endif
/*
* Allocate the extensions area for this thread
diff --git a/cpukit/score/src/threadloadenv.c b/cpukit/score/src/threadloadenv.c
index c3493eeccd..af1233f709 100644
--- a/cpukit/score/src/threadloadenv.c
+++ b/cpukit/score/src/threadloadenv.c
@@ -45,11 +45,13 @@ void _Thread_Load_environment(
{
boolean is_fp = FALSE;
+#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( the_thread->Start.fp_context ) {
the_thread->fp_context = the_thread->Start.fp_context;
_Context_Initialize_fp( &the_thread->fp_context );
is_fp = TRUE;
}
+#endif
the_thread->do_post_task_switch_extension = FALSE;
the_thread->is_preemptible = the_thread->Start.is_preemptible;