Index: cpukit/ChangeLog
===================================================================
--- cpukit/ChangeLog	(revision 3e0665404062ebdc13e6d631acd8da6375d06d4d)
+++ cpukit/ChangeLog	(revision 976162a69f6fdfbd2ab507074be7d99a48b4f7f7)
@@ -1,2 +1,25 @@
+2007-12-03	Joel Sherrill <joel.sherrill@OARcorp.com>
+
+	* libcsupport/src/malloc.c, libmisc/monitor/mon-command.c,
+	posix/preinstall.am, posix/include/rtems/posix/cond.h,
+	posix/include/rtems/posix/mqueue.h,
+	posix/include/rtems/posix/mutex.h,
+	posix/include/rtems/posix/pthread.h,
+	posix/include/rtems/posix/semaphore.h, posix/src/conddestroy.c,
+	posix/src/mutexdestroy.c, posix/src/mutexinit.c,
+	posix/src/mutexsetprioceiling.c, posix/src/mutexunlock.c,
+	sapi/include/confdefs.h, sapi/include/rtems/config.h,
+	sapi/include/rtems/init.h, sapi/include/rtems/sptables.h,
+	sapi/src/exinit.c, score/include/rtems/system.h,
+	score/include/rtems/score/mpci.h, score/src/mpci.c,
+	score/src/thread.c, score/src/threadcreateidle.c,
+	score/src/threadstackallocate.c, score/src/threadstackfree.c,
+	score/src/wkspace.c: Moved most of the remaining CPU Table fields to
+	the Configuration Table. This included pretasking_hook,
+	predriver_hook, postdriver_hook, idle_task, do_zero_of_workspace,
+	extra_mpci_receive_server_stack, stack_allocate_hook, and
+	stack_free_hook. As a side-effect of this effort some multiprocessing
+	code was made conditional and some style clean up occurred.
+
 2007-12-03	Chris Johns <chrisj@rtems.org>
 
Index: cpukit/libcsupport/src/malloc.c
===================================================================
--- cpukit/libcsupport/src/malloc.c	(revision 3e0665404062ebdc13e6d631acd8da6375d06d4d)
+++ cpukit/libcsupport/src/malloc.c	(revision 976162a69f6fdfbd2ab507074be7d99a48b4f7f7)
@@ -176,5 +176,5 @@
    */
 
-  if ( rtems_cpu_configuration_get_do_zero_of_workspace() )
+  if ( rtems_configuration_get_do_zero_of_workspace() )
      memset( starting_address, 0, length );
 
Index: cpukit/libmisc/monitor/mon-command.c
===================================================================
--- cpukit/libmisc/monitor/mon-command.c	(revision 3e0665404062ebdc13e6d631acd8da6375d06d4d)
+++ cpukit/libmisc/monitor/mon-command.c	(revision 976162a69f6fdfbd2ab507074be7d99a48b4f7f7)
@@ -499,8 +499,11 @@
    * put node number in the prompt if we are multiprocessing
    */
+#if defined(RTEMS_MULTIPROCESSING)
   if (!rtems_configuration_get_user_multiprocessing_table ())
     sprintf (monitor_prompt, "%s",
              (env_prompt == NULL) ? MONITOR_PROMPT: env_prompt);
-  else if (rtems_monitor_default_node != rtems_monitor_node)
+  else /* .... */
+#endif
+  if (rtems_monitor_default_node != rtems_monitor_node)
     sprintf (monitor_prompt, "%" PRId32 "-%s-%" PRId32 "", rtems_monitor_node,
              (env_prompt == NULL) ? MONITOR_PROMPT : env_prompt,
Index: cpukit/posix/include/rtems/posix/cond.h
===================================================================
--- cpukit/posix/include/rtems/posix/cond.h	(revision 3e0665404062ebdc13e6d631acd8da6375d06d4d)
+++ cpukit/posix/include/rtems/posix/cond.h	(revision 976162a69f6fdfbd2ab507074be7d99a48b4f7f7)
@@ -160,7 +160,4 @@
 
 #include <rtems/posix/cond.inl>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/posix/condmp.h>
-#endif
 
 #ifdef __cplusplus
Index: cpukit/posix/include/rtems/posix/mqueue.h
===================================================================
--- cpukit/posix/include/rtems/posix/mqueue.h	(revision 3e0665404062ebdc13e6d631acd8da6375d06d4d)
+++ cpukit/posix/include/rtems/posix/mqueue.h	(revision 976162a69f6fdfbd2ab507074be7d99a48b4f7f7)
@@ -240,7 +240,4 @@
 
 #include <rtems/posix/mqueue.inl>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/posix/mqueuemp.h>
-#endif
 
 #ifdef __cplusplus
Index: cpukit/posix/include/rtems/posix/mutex.h
===================================================================
--- cpukit/posix/include/rtems/posix/mutex.h	(revision 3e0665404062ebdc13e6d631acd8da6375d06d4d)
+++ cpukit/posix/include/rtems/posix/mutex.h	(revision 976162a69f6fdfbd2ab507074be7d99a48b4f7f7)
@@ -149,7 +149,4 @@
 
 #include <rtems/posix/mutex.inl>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/posix/mutexmp.h>
-#endif
 
 #ifdef __cplusplus
Index: cpukit/posix/include/rtems/posix/pthread.h
===================================================================
--- cpukit/posix/include/rtems/posix/pthread.h	(revision 3e0665404062ebdc13e6d631acd8da6375d06d4d)
+++ cpukit/posix/include/rtems/posix/pthread.h	(revision 976162a69f6fdfbd2ab507074be7d99a48b4f7f7)
@@ -142,7 +142,4 @@
 
 #include <rtems/posix/pthread.inl>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/posix/pthreadmp.h>
-#endif
 
 #ifdef __cplusplus
Index: cpukit/posix/include/rtems/posix/semaphore.h
===================================================================
--- cpukit/posix/include/rtems/posix/semaphore.h	(revision 3e0665404062ebdc13e6d631acd8da6375d06d4d)
+++ cpukit/posix/include/rtems/posix/semaphore.h	(revision 976162a69f6fdfbd2ab507074be7d99a48b4f7f7)
@@ -186,7 +186,4 @@
 
 #include <rtems/posix/semaphore.inl>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/posix/semaphoremp.h>
-#endif
 
 #ifdef __cplusplus
Index: cpukit/posix/preinstall.am
===================================================================
--- cpukit/posix/preinstall.am	(revision 3e0665404062ebdc13e6d631acd8da6375d06d4d)
+++ cpukit/posix/preinstall.am	(revision 976162a69f6fdfbd2ab507074be7d99a48b4f7f7)
@@ -9,8 +9,18 @@
 DISTCLEANFILES = $(PREINSTALL_DIRS)
 
+all-local: $(TMPINSTALL_FILES)
+
+TMPINSTALL_FILES =
+CLEANFILES = $(TMPINSTALL_FILES)
+
 all-am: $(PREINSTALL_FILES)
 
 PREINSTALL_FILES =
-CLEANFILES = $(PREINSTALL_FILES)
+CLEANFILES += $(PREINSTALL_FILES)
+
+$(PROJECT_LIB)/$(dirstamp):
+	@$(MKDIR_P) $(PROJECT_LIB)
+	@: > $(PROJECT_LIB)/$(dirstamp)
+PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp)
 
 $(PROJECT_INCLUDE)/$(dirstamp):
@@ -20,4 +30,8 @@
 
 if LIBPOSIX
+$(PROJECT_LIB)/libposix.a: libposix.a $(PROJECT_LIB)/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_LIB)/libposix.a
+TMPINSTALL_FILES += $(PROJECT_LIB)/libposix.a
+
 if HAS_PTHREADS
 $(PROJECT_INCLUDE)/sched.h: include/sched.h $(PROJECT_INCLUDE)/$(dirstamp)
Index: cpukit/posix/src/conddestroy.c
===================================================================
--- cpukit/posix/src/conddestroy.c	(revision 3e0665404062ebdc13e6d631acd8da6375d06d4d)
+++ cpukit/posix/src/conddestroy.c	(revision 976162a69f6fdfbd2ab507074be7d99a48b4f7f7)
@@ -47,21 +47,4 @@
 
       _POSIX_Condition_variables_Free( the_cond );
-
-#if defined(RTEMS_MULTIPROCESSING)
-      if ( the_cond->process_shared == PTHREAD_PROCESS_SHARED ) {
-
-        _Objects_MP_Close(
-          &_POSIX_Condition_variables_Information,
-          the_cond->Object.id
-        );
-
-        _POSIX_Condition_variables_MP_Send_process_packet(
-          POSIX_CONDITION_VARIABLES_MP_ANNOUNCE_DELETE,
-          the_cond->Object.id,
-          0,                         /* Not used */
-          0                          /* Not used */
-        );
-      }
-#endif
       _Thread_Enable_dispatch();
       return 0;
Index: cpukit/posix/src/mutexdestroy.c
===================================================================
--- cpukit/posix/src/mutexdestroy.c	(revision 3e0665404062ebdc13e6d631acd8da6375d06d4d)
+++ cpukit/posix/src/mutexdestroy.c	(revision 976162a69f6fdfbd2ab507074be7d99a48b4f7f7)
@@ -13,7 +13,4 @@
 #include <rtems/score/coremutex.h>
 #include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 #include <rtems/posix/mutex.h>
 #include <rtems/posix/priority.h>
@@ -48,29 +45,7 @@
       _Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object );
 
-      _CORE_mutex_Flush(
-        &the_mutex->Mutex,
-#if defined(RTEMS_MULTIPROCESSING)
-        _POSIX_Mutex_MP_Send_object_was_deleted,
-#else
-        NULL,
-#endif
-        EINVAL
-      );
+      _CORE_mutex_Flush( &the_mutex->Mutex, NULL, EINVAL );
 
       _POSIX_Mutex_Free( the_mutex );
-
-#if defined(RTEMS_MULTIPROCESSING)
-      if ( the_mutex->process_shared == PTHREAD_PROCESS_SHARED ) {
-
-        _Objects_MP_Close( &_POSIX_Mutex_Information, the_mutex->Object.id );
-
-        _POSIX_Mutex_MP_Send_process_packet(
-          POSIX_MUTEX_MP_ANNOUNCE_DELETE,
-          the_mutex->Object.id,
-          0,                         /* Not used */
-          0                          /* Not used */
-        );
-      }
-#endif
       _Thread_Enable_dispatch();
       return 0;
Index: cpukit/posix/src/mutexinit.c
===================================================================
--- cpukit/posix/src/mutexinit.c	(revision 3e0665404062ebdc13e6d631acd8da6375d06d4d)
+++ cpukit/posix/src/mutexinit.c	(revision 976162a69f6fdfbd2ab507074be7d99a48b4f7f7)
@@ -14,7 +14,4 @@
 #include <rtems/score/coremutex.h>
 #include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 #include <rtems/posix/mutex.h>
 #include <rtems/posix/priority.h>
@@ -133,14 +130,4 @@
   }
 
-#if defined(RTEMS_MULTIPROCESSING)
-  if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED &&
-       !( _Objects_MP_Allocate_and_open( &_POSIX_Mutex_Information, 0,
-                            the_mutex->Object.id, FALSE ) ) ) {
-    _POSIX_Mutex_Free( the_mutex );
-    _Thread_Enable_dispatch();
-    return EAGAIN;
-  }
-#endif
-
   the_mutex->process_shared = the_attr->process_shared;
 
@@ -170,14 +157,4 @@
   *mutex = the_mutex->Object.id;
 
-#if defined(RTEMS_MULTIPROCESSING)
-  if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
-    _POSIX_Mutex_MP_Send_process_packet(
-      POSIX_MUTEX_MP_ANNOUNCE_CREATE,
-      the_mutex->Object.id,
-      0,                         /* Name not used */
-      0                          /* Not used */
-    );
-#endif
-
   _Thread_Enable_dispatch();
   return 0;
Index: cpukit/posix/src/mutexsetprioceiling.c
===================================================================
--- cpukit/posix/src/mutexsetprioceiling.c	(revision 3e0665404062ebdc13e6d631acd8da6375d06d4d)
+++ cpukit/posix/src/mutexsetprioceiling.c	(revision 976162a69f6fdfbd2ab507074be7d99a48b4f7f7)
@@ -13,7 +13,4 @@
 #include <rtems/score/coremutex.h>
 #include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 #include <rtems/posix/mutex.h>
 #include <rtems/posix/priority.h>
@@ -63,9 +60,5 @@
         &the_mutex->Mutex,
         the_mutex->Object.id,
-#if defined(RTEMS_MULTIPROCESSING)
-        _POSIX_Threads_mutex_MP_support
-#else
         NULL
-#endif
       );
       _Thread_Enable_dispatch();
Index: cpukit/posix/src/mutexunlock.c
===================================================================
--- cpukit/posix/src/mutexunlock.c	(revision 3e0665404062ebdc13e6d631acd8da6375d06d4d)
+++ cpukit/posix/src/mutexunlock.c	(revision 976162a69f6fdfbd2ab507074be7d99a48b4f7f7)
@@ -42,9 +42,5 @@
         &the_mutex->Mutex,
         the_mutex->Object.id,
-#if defined(RTEMS_MULTIPROCESSING)
-        _POSIX_Threads_mutex_MP_support
-#else
         NULL
-#endif
       );
       _Thread_Enable_dispatch();
Index: cpukit/sapi/include/confdefs.h
===================================================================
--- cpukit/sapi/include/confdefs.h	(revision 3e0665404062ebdc13e6d631acd8da6375d06d4d)
+++ cpukit/sapi/include/confdefs.h	(revision 976162a69f6fdfbd2ab507074be7d99a48b4f7f7)
@@ -53,5 +53,7 @@
 extern rtems_driver_address_table       Device_drivers[];
 extern rtems_configuration_table        Configuration;
-extern rtems_multiprocessing_table      Multiprocessing_configuration;
+#if defined(RTEMS_MULTIPROCESSING)
+  extern rtems_multiprocessing_table      Multiprocessing_configuration;
+#endif
 #ifdef RTEMS_POSIX_API
 extern posix_api_configuration_table    Configuration_POSIX_API;
@@ -178,4 +180,60 @@
 
 /*
+ *  Idle task body configuration
+ *
+ *  There is a default IDLE thread body provided by RTEMS which
+ *  has the possibility of being CPU specific.  There may be a
+ *  BSP specific override of the RTEMS default body and in turn,
+ *  the application may override and provide its own.
+ */
+#ifndef CONFIGURE_IDLE_TASK_BODY
+  #ifdef BSP_IDLE_TASK_BODY
+    #define CONFIGURE_IDLE_TASK_BODY BSP_IDLE_TASK_BODY
+  #else
+    #define CONFIGURE_IDLE_TASK_BODY NULL
+  #endif
+#endif
+
+/*
+ *  Idle task stack size configuration
+ *
+ *  By default, the IDLE task will have a stack of minimum size.
+ *  The BSP or application may override this value.
+ */
+#ifndef CONFIGURE_IDLE_TASK_STACK_SIZE
+  #ifdef BSP_IDLE_TASK_STACK_SIZE
+    #define CONFIGURE_IDLE_TASK_STACK_SIZE BSP_IDLE_TASK_STACK_SIZE
+  #else
+    #define CONFIGURE_IDLE_TASK_STACK_SIZE RTEMS_MINIMUM_STACK_SIZE
+  #endif
+#endif
+
+/*
+ *  Task stack allocator configuration
+ */
+
+#ifndef CONFIGURE_TASK_STACK_ALLOCATOR
+  #define CONFIGURE_TASK_STACK_ALLOCATOR NULL
+#endif
+
+#ifndef CONFIGURE_TASK_STACK_DEALLOCATOR
+  #define CONFIGURE_TASK_STACK_DEALLOCATOR NULL
+#endif
+
+/*
+ *  Should the RTEMS Workspace and C Program Heap be cleared automatically
+ *  at system start up?
+ */
+
+#ifndef CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY
+  #ifdef BSP_ZERO_WORKSPACE_AUTOMATICALLY
+    #define CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY \
+            BSP_ZERO_WORKSPACE_AUTOMATICALLY
+  #else
+    #define CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY FALSE
+  #endif
+#endif
+
+/*
  *  Default User Initialization Task Table.  This table guarantees that
  *  one user initialization table is defined.
@@ -400,4 +458,6 @@
 #endif /* CONFIGURE_HAS_OWN_BDBUF_TABLE        */
 #endif /* CONFIGURE_APPLICATION_NEEDS_LIBBLOCK */
+
+#if defined(RTEMS_MULTIPROCESSING)
 /*
  *  Default Multiprocessing Configuration Table.  The defaults are
@@ -449,4 +509,5 @@
 
 #endif /* CONFIGURE_MP_APPLICATION */
+#endif /* RTEMS_MULTIPROCESSING */
 
 /*
@@ -1179,15 +1240,22 @@
 rtems_configuration_table Configuration = {
   CONFIGURE_EXECUTIVE_RAM_WORK_AREA,
-  CONFIGURE_EXECUTIVE_RAM_SIZE,
+  CONFIGURE_EXECUTIVE_RAM_SIZE,              /* required RTEMS workspace */
   CONFIGURE_MAXIMUM_USER_EXTENSIONS + CONFIGURE_NEWLIB_EXTENSION +
-      CONFIGURE_STACK_CHECKER_EXTENSION,
-  CONFIGURE_MICROSECONDS_PER_TICK,
-  CONFIGURE_TICKS_PER_TIMESLICE,
-  CONFIGURE_MAXIMUM_DRIVERS,
-  CONFIGURE_NUMBER_OF_DRIVERS,               /* number of device drivers */
+      CONFIGURE_STACK_CHECKER_EXTENSION,     /* maximum user extensions */
+  CONFIGURE_MICROSECONDS_PER_TICK,           /* microseconds per clock tick */
+  CONFIGURE_TICKS_PER_TIMESLICE,             /* ticks per timeslice quantum */
+  CONFIGURE_IDLE_TASK_BODY,                  /* user's IDLE task */
+  CONFIGURE_IDLE_TASK_STACK_SIZE,            /* IDLE task stack size */
+  CONFIGURE_TASK_STACK_ALLOCATOR,            /* stack allocator */
+  CONFIGURE_TASK_STACK_DEALLOCATOR,          /* stack deallocator */
+  CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY,    /* true to clear memory */
+  CONFIGURE_MAXIMUM_DRIVERS,                 /* maximum device drivers */
+  CONFIGURE_NUMBER_OF_DRIVERS,               /* static device drivers */
   Device_drivers,                            /* pointer to driver table */
   CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS,    /* number of initial extensions */
   CONFIGURE_INITIAL_EXTENSION_TABLE,         /* pointer to initial extensions */
+#if defined(RTEMS_MULTIPROCESSING)
   CONFIGURE_MULTIPROCESSING_TABLE,           /* pointer to MP config table */
+#endif
   &Configuration_RTEMS_API,                  /* pointer to RTEMS API config */
 #ifdef RTEMS_POSIX_API
Index: cpukit/sapi/include/rtems/config.h
===================================================================
--- cpukit/sapi/include/rtems/config.h	(revision 3e0665404062ebdc13e6d631acd8da6375d06d4d)
+++ cpukit/sapi/include/rtems/config.h	(revision 976162a69f6fdfbd2ab507074be7d99a48b4f7f7)
@@ -70,4 +70,5 @@
 #endif
 
+#if defined(RTEMS_MULTIPROCESSING)
 /*
  *  The following records define the Multiprocessor Configuration
@@ -76,16 +77,19 @@
  *  system.
  */
-
 typedef struct {
-  uint32_t      node;             /* local node number */
-  uint32_t      maximum_nodes;    /* maximum # nodes in system */
-  uint32_t      maximum_global_objects; /* maximum # global objects */
-  uint32_t      maximum_proxies;  /* maximum # proxies */
-#if defined(RTEMS_MULTIPROCESSING)
+  uint32_t            node;                   /* local node number */
+  uint32_t            maximum_nodes;          /* maximum # nodes in system */
+  uint32_t            maximum_global_objects; /* maximum # global objects */
+  uint32_t            maximum_proxies;        /* maximum # proxies */
+
+  /** The MPCI Receive server is assumed to have a stack of at least 
+   *  minimum stack size.  This field specifies the amount of extra
+   *  stack this task will be given in bytes.
+   */
+  uint32_t            extra_mpci_receive_server_stack;
+
   rtems_mpci_table   *User_mpci_table;  /* pointer to MPCI table */
-#else
-  void         *User_mpci_table;        /* pointer to MPCI table */
-#endif
 } rtems_multiprocessing_table;
+#endif
 
 /*
@@ -100,5 +104,4 @@
  *     + required number of each object type for each API configured
  */
-
 typedef struct {
   void                          *work_space_start;
@@ -107,4 +110,33 @@
   uint32_t                       microseconds_per_tick;
   uint32_t                       ticks_per_timeslice;
+
+  /** This element points to the BSP's optional idle task which may override
+   *  the default one provided with RTEMS.
+   */
+  void                         (*idle_task)( void );
+
+  /** This field specifies the size of the IDLE task's stack.  If less than or
+   *  equal to the minimum stack size, then the IDLE task will have the minimum
+   *  stack size.
+   */
+  uint32_t                       idle_task_stack_size;
+
+  /** The BSP may want to provide it's own stack allocation routines.
+   *  In this case, the BSP will provide this stack allocation hook.
+   */
+  void *                       (*stack_allocate_hook)( uint32_t );
+
+  /** The BSP may want to provide it's own stack free routines.
+   *  In this case, the BSP will provide this stack free hook.
+   */
+  void                         (*stack_free_hook)( void *);
+
+  /** If this element is TRUE, then RTEMS will zero the Executive Workspace.
+   *  When this element is FALSE, it is assumed that the BSP or invoking
+   *  environment has ensured that memory was cleared before RTEMS was 
+   *  invoked.
+   */
+  boolean                        do_zero_of_workspace;
+
   uint32_t                       maximum_drivers;
   uint32_t                       number_of_device_drivers;
@@ -112,5 +144,7 @@
   uint32_t                       number_of_initial_extensions;
   rtems_extensions_table        *User_extension_table;
+#if defined(RTEMS_MULTIPROCESSING)
   rtems_multiprocessing_table   *User_multiprocessing_table;
+#endif
   rtems_api_configuration_table *RTEMS_api_configuration;
   posix_api_configuration_table *POSIX_api_configuration;
@@ -153,4 +187,11 @@
         (_Configuration_Table->ticks_per_timeslice)
 
+/**
+  * This macro assists in accessing the field which indicates whether
+  * RTEMS is responsible for zeroing the Executive Workspace.
+  */
+#define rtems_configuration_get_do_zero_of_workspace() \
+   (_Configuration_Table->do_zero_of_workspace)
+
 #define rtems_configuration_get_maximum_devices() \
         (_Configuration_Table->maximum_devices)
Index: cpukit/sapi/include/rtems/init.h
===================================================================
--- cpukit/sapi/include/rtems/init.h	(revision 3e0665404062ebdc13e6d631acd8da6375d06d4d)
+++ cpukit/sapi/include/rtems/init.h	(revision 976162a69f6fdfbd2ab507074be7d99a48b4f7f7)
@@ -37,4 +37,5 @@
 #include <rtems/rtems/intr.h>
 
+#if defined(RTEMS_MULTIPROCESSING)
 /*
  *  The following defines the default Multiprocessing Configuration
@@ -44,4 +45,5 @@
 extern const rtems_multiprocessing_table
   _Initialization_Default_multiprocessing_table;
+#endif
 
 /*
Index: cpukit/sapi/include/rtems/sptables.h
===================================================================
--- cpukit/sapi/include/rtems/sptables.h	(revision 3e0665404062ebdc13e6d631acd8da6375d06d4d)
+++ cpukit/sapi/include/rtems/sptables.h	(revision 976162a69f6fdfbd2ab507074be7d99a48b4f7f7)
@@ -48,21 +48,22 @@
 #include <rtems/rtems/timer.h>
 
+#if defined(RTEMS_MULTIPROCESSING)
 /*
  *  This is the default Multiprocessing Configuration Table.
  *  It is used in single processor configurations.
  */
-
-#if defined(SAPI_INIT)
-const rtems_multiprocessing_table
-       _Initialization_Default_multiprocessing_table = {
-  1,                      /* local node number */
-  1,                      /* maximum number nodes in system */
-  0,                      /* maximum number global objects */
-  0,                      /* maximum number proxies */
-  NULL,                   /* pointer to MPCI address table */
-};
-#else
-extern const rtems_multiprocessing_table
-       _Initialization_Default_multiprocessing_table;
+  #if defined(SAPI_INIT)
+    const rtems_multiprocessing_table
+	   _Initialization_Default_multiprocessing_table = {
+      1,                      /* local node number */
+      1,                      /* maximum number nodes in system */
+      0,                      /* maximum number global objects */
+      0,                      /* maximum number proxies */
+      NULL,                   /* pointer to MPCI address table */
+    };
+  #else
+    extern const rtems_multiprocessing_table
+	   _Initialization_Default_multiprocessing_table;
+  #endif
 #endif
 
Index: cpukit/sapi/src/exinit.c
===================================================================
--- cpukit/sapi/src/exinit.c	(revision 3e0665404062ebdc13e6d631acd8da6375d06d4d)
+++ cpukit/sapi/src/exinit.c	(revision 976162a69f6fdfbd2ab507074be7d99a48b4f7f7)
@@ -93,4 +93,19 @@
     );
 
+  /*
+   *  Grab our own copy of the user's CPU table.
+   */
+  _CPU_Table = *cpu_table;
+
+  /*
+   *  Provide pointers just for later convenience.
+   */
+  _Configuration_Table    = configuration_table;
+
+  /*
+   * Initialize any target architecture specific support as early as possible
+   */
+  _CPU_Initialize( cpu_table, _Thread_Dispatch );
+
 #if defined(RTEMS_MULTIPROCESSING)
   /*
@@ -113,16 +128,4 @@
 
   /*
-   *  Grab our own copy of the user's CPU table.
-   */
-  _CPU_Table = *cpu_table;
-
-  /*
-   *  Provide pointers just for later convenience.
-   */
-  _Configuration_Table    = configuration_table;
-
-  _CPU_Initialize( cpu_table, _Thread_Dispatch );
-
-  /*
    *  Do this as early as possible to insure no debugging output
    *  is even attempted to be printed.
@@ -174,5 +177,5 @@
 #if defined(RTEMS_MULTIPROCESSING)
     ,
-    multiprocessing_table->maximum_proxies
+    _Configuration_MP_table->maximum_proxies
 #endif
   );
@@ -180,5 +183,5 @@
 #if defined(RTEMS_MULTIPROCESSING)
   _MPCI_Handler_initialization(
-    multiprocessing_table->User_mpci_table,
+    _Configuration_MP_table->User_mpci_table,
     RTEMS_TIMEOUT
   );
@@ -221,6 +224,8 @@
    */
 
-  if ( cpu_table->pretasking_hook )
-    (*cpu_table->pretasking_hook)();
+  {
+    extern void bsp_pretasking_hook(void);
+    bsp_pretasking_hook();
+  }
 
 #if defined(RTEMS_MULTIPROCESSING)
@@ -234,6 +239,8 @@
   _API_extensions_Run_predriver();
 
-  if ( _CPU_Table.predriver_hook )
-    (*_CPU_Table.predriver_hook)();
+  {
+    extern void bsp_predriver_hook(void);
+    bsp_predriver_hook();
+  }
 
   /*
@@ -262,6 +269,8 @@
   _API_extensions_Run_postdriver();
 
-  if ( _CPU_Table.postdriver_hook )
-    (*_CPU_Table.postdriver_hook)();
+  {
+    extern void bsp_postdriver_hook(void);
+    bsp_postdriver_hook();
+  }
 
   return bsp_level;
Index: cpukit/score/include/rtems/score/mpci.h
===================================================================
--- cpukit/score/include/rtems/score/mpci.h	(revision 3e0665404062ebdc13e6d631acd8da6375d06d4d)
+++ cpukit/score/include/rtems/score/mpci.h	(revision 976162a69f6fdfbd2ab507074be7d99a48b4f7f7)
@@ -42,14 +42,4 @@
 #include <rtems/score/watchdog.h>
 #include <rtems/score/coresem.h>
-
-/**
- *  The following constants define the stack size requirements for
- *  the system threads.
- */
-#define MPCI_RECEIVE_SERVER_STACK_SIZE \
-  ( STACK_MINIMUM_SIZE + \
-    CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK + \
-    _CPU_Table.extra_mpci_receive_server_stack \
-  )
 
 /**
Index: cpukit/score/include/rtems/system.h
===================================================================
--- cpukit/score/include/rtems/system.h	(revision 3e0665404062ebdc13e6d631acd8da6375d06d4d)
+++ cpukit/score/include/rtems/system.h	(revision 976162a69f6fdfbd2ab507074be7d99a48b4f7f7)
@@ -200,5 +200,4 @@
 #define rtems_cpu_configuration_get_table() (&_CPU_Table)
 
-
 /** This macro assists in accessing the pretasking BSP hook. */
 #define rtems_cpu_configuration_get_pretasking_hook() \
@@ -213,35 +212,8 @@
    (_CPU_Table.postdriver_hook)
 
-/** This macro assists in accessing the BSP specific IDLE task entry point. */
-#define rtems_cpu_configuration_get_idle_task() \
-   (_CPU_Table.idle_task)
-
-/**
-  * This macro assists in accessing the field which indicates whether
-  * RTEMS is responsible for zeroing the Executive Workspace.
-  */
-#define rtems_cpu_configuration_get_do_zero_of_workspace() \
-   (_CPU_Table.do_zero_of_workspace)
-
-/** This macro assists in accessing the IDLE task stack point size. */
-#define rtems_cpu_configuration_get_idle_task_stack_size() \
-   (_CPU_Table.idle_task_stack_size)
-
 /** This macro assists in accessing the interrupt stack size. */
 #define rtems_cpu_configuration_get_interrupt_stack_size() \
    (_CPU_Table.interrupt_stack_size)
 
-/** This macro assists in accessing the size of the MPCI receiver server. */
-#define rtems_cpu_configuration_get_extra_mpci_receive_server_stack() \
-   (_CPU_Table.extra_mpci_receive_server_stack)
-
-/** This macro assists in accessing the BSP stack allocation hook. */
-#define rtems_cpu_configuration_get_stack_allocate_hook() \
-   (_CPU_Table.stack_allocate_hook)
-
-/** This macro assists in accessing the BSP stack allocation free hook. */
-#define rtems_cpu_configuration_get_stack_free_hook() \
-   (_CPU_Table.stack_free_hook)
-
 /** This macro defines the maximum length of a Classic API name. */
 #define RTEMS_MAXIMUM_NAME_LENGTH sizeof(rtems_name)
Index: cpukit/score/src/mpci.c
===================================================================
--- cpukit/score/src/mpci.c	(revision 3e0665404062ebdc13e6d631acd8da6375d06d4d)
+++ cpukit/score/src/mpci.c	(revision 976162a69f6fdfbd2ab507074be7d99a48b4f7f7)
@@ -18,10 +18,10 @@
 
 #include <rtems/system.h>
-#include <rtems/score/cpu.h>
-#include <rtems/score/interr.h>
 #if defined(RTEMS_MULTIPROCESSING)
 #include <rtems/score/mpci.h>
 #include <rtems/score/mppkt.h>
 #endif
+#include <rtems/score/cpu.h>
+#include <rtems/score/interr.h>
 #include <rtems/score/states.h>
 #include <rtems/score/thread.h>
@@ -32,4 +32,5 @@
 
 #include <rtems/score/coresem.h>
+#include <rtems/config.h>
 
 /*PAGE
@@ -113,5 +114,7 @@
     _MPCI_Receive_server_tcb,
     NULL,        /* allocate the stack */
-    MPCI_RECEIVE_SERVER_STACK_SIZE,
+    STACK_MINIMUM_SIZE +
+      CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK +
+      _Configuration_MP_table->extra_mpci_receive_server_stack,
     CPU_ALL_TASKS_ARE_FP,
     PRIORITY_MINIMUM,
Index: cpukit/score/src/thread.c
===================================================================
--- cpukit/score/src/thread.c	(revision 3e0665404062ebdc13e6d631acd8da6375d06d4d)
+++ cpukit/score/src/thread.c	(revision 976162a69f6fdfbd2ab507074be7d99a48b4f7f7)
@@ -30,4 +30,5 @@
 #include <rtems/score/userext.h>
 #include <rtems/score/wkspace.h>
+#include <rtems/config.h>
 
 /*PAGE
@@ -59,7 +60,6 @@
    * Do not allow mixture.
    */
-
-  if ( !( ( _CPU_Table.stack_allocate_hook == 0 )
-       == ( _CPU_Table.stack_free_hook == 0 ) ) )
+    if ( !( (!_Configuration_Table->stack_allocate_hook)
+            == (!_Configuration_Table->stack_free_hook) ) )
     _Internal_error_Occurred(
       INTERNAL_ERROR_CORE,
Index: cpukit/score/src/threadcreateidle.c
===================================================================
--- cpukit/score/src/threadcreateidle.c	(revision 3e0665404062ebdc13e6d631acd8da6375d06d4d)
+++ cpukit/score/src/threadcreateidle.c	(revision 976162a69f6fdfbd2ab507074be7d99a48b4f7f7)
@@ -30,4 +30,5 @@
 #include <rtems/score/userext.h>
 #include <rtems/score/wkspace.h>
+#include <rtems/config.h>
 
 /*PAGE
@@ -61,8 +62,8 @@
 #endif
 
-  if ( _CPU_Table.idle_task )
-    idle = _CPU_Table.idle_task;
+  if ( _Configuration_Table->idle_task )
+    idle = _Configuration_Table->idle_task;
 
-  idle_task_stack_size =  _CPU_Table.idle_task_stack_size;
+  idle_task_stack_size =  _Configuration_Table->idle_task_stack_size;
   if ( idle_task_stack_size < STACK_MINIMUM_SIZE )
     idle_task_stack_size = STACK_MINIMUM_SIZE;
Index: cpukit/score/src/threadstackallocate.c
===================================================================
--- cpukit/score/src/threadstackallocate.c	(revision 3e0665404062ebdc13e6d631acd8da6375d06d4d)
+++ cpukit/score/src/threadstackallocate.c	(revision 976162a69f6fdfbd2ab507074be7d99a48b4f7f7)
@@ -30,4 +30,5 @@
 #include <rtems/score/userext.h>
 #include <rtems/score/wkspace.h>
+#include <rtems/config.h>
 
 /*PAGE
@@ -58,6 +59,6 @@
    */
 
-  if ( _CPU_Table.stack_allocate_hook ) {
-    stack_addr = (*_CPU_Table.stack_allocate_hook)( the_stack_size );
+  if ( _Configuration_Table->stack_allocate_hook ) {
+    stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size );
   } else {
 
Index: cpukit/score/src/threadstackfree.c
===================================================================
--- cpukit/score/src/threadstackfree.c	(revision 3e0665404062ebdc13e6d631acd8da6375d06d4d)
+++ cpukit/score/src/threadstackfree.c	(revision 976162a69f6fdfbd2ab507074be7d99a48b4f7f7)
@@ -30,4 +30,5 @@
 #include <rtems/score/userext.h>
 #include <rtems/score/wkspace.h>
+#include <rtems/config.h>
 
 /*
@@ -54,6 +55,8 @@
      */
 
-    if ( _CPU_Table.stack_free_hook )
-        (*_CPU_Table.stack_free_hook)( the_thread->Start.Initial_stack.area );
+    if ( _Configuration_Table->stack_free_hook )
+      (*_Configuration_Table->stack_free_hook)(
+        the_thread->Start.Initial_stack.area
+      );
     else
         _Workspace_Free( the_thread->Start.Initial_stack.area );
Index: cpukit/score/src/wkspace.c
===================================================================
--- cpukit/score/src/wkspace.c	(revision 3e0665404062ebdc13e6d631acd8da6375d06d4d)
+++ cpukit/score/src/wkspace.c	(revision 976162a69f6fdfbd2ab507074be7d99a48b4f7f7)
@@ -2,9 +2,5 @@
  *  Workspace Handler
  *
- *  XXX
- *
- *  NOTE:
- *
- *  COPYRIGHT (c) 1989-1999.
+ *  COPYRIGHT (c) 1989-2007.
  *  On-Line Applications Research Corporation (OAR).
  *
@@ -23,4 +19,7 @@
 #include <rtems/score/wkspace.h>
 #include <rtems/score/interr.h>
+#include <rtems/config.h>
+
+#include <string.h>  /* for memset */
 
 /*PAGE
@@ -34,6 +33,4 @@
 )
 {
-  uint32_t   *zero_out_array;
-  uint32_t    index;
   uint32_t    memory_available;
 
@@ -45,10 +42,6 @@
     );
 
-  if ( _CPU_Table.do_zero_of_workspace ) {
-    for( zero_out_array  = (uint32_t   *) starting_address, index = 0 ;
-         index < size / sizeof( uint32_t   ) ;
-         index++ )
-      zero_out_array[ index ] = 0;
-  }
+  if ( _Configuration_Table->do_zero_of_workspace )
+   memset( starting_address, 0, size );
 
   memory_available = _Heap_Initialize(
