Index: c/src/exec/libcsupport/src/libio.c
===================================================================
--- c/src/exec/libcsupport/src/libio.c	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/exec/libcsupport/src/libio.c	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -100,22 +100,4 @@
     rtems_fatal_error_occurred( RTEMS_INVALID_NUMBER );
   handlers[handler_index] = *handler;
-}
-
-
-void
-rtems_libio_config(
-    rtems_configuration_table *config,
-    unsigned32                 max_fds
-)
-{
-    rtems_libio_number_iops = max_fds;
-
-    /*
-     * tweak config to reflect # of semaphores we will need
-     */
-
-    /* one for iop table */
-    config->RTEMS_api_configuration->maximum_semaphores += 1; 
-    config->RTEMS_api_configuration->maximum_semaphores += max_fds;
 }
 
Index: c/src/exec/sapi/headers/confdefs.h
===================================================================
--- c/src/exec/sapi/headers/confdefs.h	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/exec/sapi/headers/confdefs.h	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -39,4 +39,11 @@
 #define CONFIGURE_NEWLIB_EXTENSION 1
 #define CONFIGURE_MALLOC_REGION 1
+
+#ifndef CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20
+#endif
+
+#define CONFIGURE_LIBIO_SEMAPHORES \
+  (CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS + 1)
 
 /*
@@ -478,5 +485,6 @@
 (( CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_MAXIMUM_TASKS) + \
    CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS) + \
-   CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES) + \
+   CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES + \
+     CONFIGURE_LIBIO_SEMAPHORES) + \
    CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \
    CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \
Index: c/src/exec/sapi/include/confdefs.h
===================================================================
--- c/src/exec/sapi/include/confdefs.h	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/exec/sapi/include/confdefs.h	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -39,4 +39,11 @@
 #define CONFIGURE_NEWLIB_EXTENSION 1
 #define CONFIGURE_MALLOC_REGION 1
+
+#ifndef CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20
+#endif
+
+#define CONFIGURE_LIBIO_SEMAPHORES \
+  (CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS + 1)
 
 /*
@@ -478,5 +485,6 @@
 (( CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_MAXIMUM_TASKS) + \
    CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS) + \
-   CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES) + \
+   CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES + \
+     CONFIGURE_LIBIO_SEMAPHORES) + \
    CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \
    CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \
Index: c/src/lib/libbsp/a29k/portsw/include/bsp.h
===================================================================
--- c/src/lib/libbsp/a29k/portsw/include/bsp.h	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/a29k/portsw/include/bsp.h	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -83,10 +83,4 @@
  */
 
-/*
- * How many libio files we want
- */
-
-#define BSP_LIBIO_MAX_FDS       20
-
 /* functions */
 
Index: c/src/lib/libbsp/a29k/portsw/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/a29k/portsw/startup/bspstart.c	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/a29k/portsw/startup/bspstart.c	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -125,16 +125,4 @@
 
   /*
-   *  Copy the Configuration Table .. so we can change it
-   */
-
-  BSP_Configuration = Configuration;
-
-  /*
-   * Tell libio how many fd's we want and allow it to tweak config
-   */
-
-  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
-
-  /*
    *  Need to "allocate" the memory for the RTEMS Workspace and
    *  tell the RTEMS configuration where it is.  This memory is
@@ -152,25 +140,7 @@
    */
 
-  /*
-   *  we do not use the pretasking_hook
-   */
-
   Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
-
-  Cpu_table.predriver_hook = NULL;
-
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
-
-  Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
-
-  Cpu_table.do_zero_of_workspace = TRUE;
-
   Cpu_table.interrupt_stack_size = 4096;
-
-  Cpu_table.extra_system_initialization_stack = 0;
-
-  /*
-   *  Don't forget the other CPU Table entries.
-   */
 
   _settrap( 109,&a29k_enable_sup);
Index: c/src/lib/libbsp/hppa1.1/simhppa/include/bsp.h
===================================================================
--- c/src/lib/libbsp/hppa1.1/simhppa/include/bsp.h	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/hppa1.1/simhppa/include/bsp.h	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -93,9 +93,4 @@
   { tty_initialize, tty_open, tty_close, tty_read, tty_write, tty_control }
 
-/*
- * How many libio files we want
- */
-#define BSP_LIBIO_MAX_FDS       20
-
 #define HPPA_INTERRUPT_EXTERNAL_MPCI        HPPA_INTERRUPT_EXTERNAL_10
 
Index: c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -173,10 +173,4 @@
 #endif
 
-    /*
-     *  Copy the table
-     */
-
-    BSP_Configuration = Configuration;
-
     BSP_Configuration.work_space_start = (void *)MY_WORK_SPACE;
     if (BSP_Configuration.work_space_size)
@@ -190,11 +184,6 @@
 
     Cpu_table.pretasking_hook = bsp_pretasking_hook;    /* init libc, etc. */
-
-    Cpu_table.predriver_hook = NULL;
-
     Cpu_table.postdriver_hook = bsp_postdriver_hook;    /* register drivers */
 
-    Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
-
     /*
      *  Don't zero out the workspace.  The simulator did it for us.
@@ -202,8 +191,5 @@
 
     Cpu_table.do_zero_of_workspace = FALSE;
-
     Cpu_table.interrupt_stack_size = (12 * 1024);
-
-    Cpu_table.extra_mpci_receive_server_stack = 0;
 
     /*
@@ -245,10 +231,4 @@
     BSP_Configuration.maximum_extensions++;
 #endif
-
-    /*
-     * Tell libio how many fd's we want and allow it to tweak config
-     */
-
-    rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
 
     /*
Index: c/src/lib/libbsp/i386/force386/include/bsp.h
===================================================================
--- c/src/lib/libbsp/i386/force386/include/bsp.h	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/i386/force386/include/bsp.h	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -143,10 +143,4 @@
  */
 
-/*
- * How many libio files we want
- */
-
-#define BSP_LIBIO_MAX_FDS       20
-
 /* miscellaneous stuff assumed to exist */
 
Index: c/src/lib/libbsp/i386/force386/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/i386/force386/startup/bspstart.c	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/i386/force386/startup/bspstart.c	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -88,17 +88,7 @@
   outport_byte( 0x00, 0x3f );      /* resets VMEbus request level */
 
-  /*
-   *  we do not use the pretasking_hook.
-   */
-
   Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
 
-  Cpu_table.predriver_hook = NULL;
-
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
-
-  Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
-
-  Cpu_table.do_zero_of_workspace = TRUE;
 
   Cpu_table.interrupt_table_segment = get_ds();
@@ -108,19 +98,6 @@
   Cpu_table.interrupt_stack_size = 4096;
 
-  Cpu_table.extra_mpci_receive_server_stack = 0;
-
-  /*
-   *  Copy the table
-   */
-
-  BSP_Configuration = Configuration;
-
   BSP_Configuration.work_space_start = (void *)
      RAM_END - BSP_Configuration.work_space_size;
 
-  /*
-   * Tell libio how many fd's we want and allow it to tweak config
-   */
-
-  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
 }
Index: c/src/lib/libbsp/i386/go32/include/bsp.h
===================================================================
--- c/src/lib/libbsp/i386/go32/include/bsp.h	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/i386/go32/include/bsp.h	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -139,10 +139,4 @@
  */
 
-/*
- * How many libio files we want
- */
-
-#define BSP_LIBIO_MAX_FDS       20
-
 /* functions */
 
Index: c/src/lib/libbsp/i386/go32/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/i386/go32/startup/bspstart.c	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/i386/go32/startup/bspstart.c	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -106,17 +106,8 @@
 
   Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
-  Cpu_table.predriver_hook = NULL;
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
-  Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
-  Cpu_table.do_zero_of_workspace = TRUE;
   Cpu_table.interrupt_table_segment = 0;/* get_ds(); */
   Cpu_table.interrupt_table_offset = (void *)0;
   Cpu_table.interrupt_stack_size = 4096;
-  Cpu_table.extra_mpci_receive_server_stack = 0;
-
-  /*
-   *  Copy the table
-   */
-  BSP_Configuration = Configuration;
 
   BSP_Configuration.work_space_start = sbrk( Configuration.work_space_size );
@@ -128,10 +119,4 @@
     _exit( 1 );
   }
-
-  /*
-   * Tell libio how many fd's we want and allow it to tweak config
-   */
-
-  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
 
   rtems_initialize_executive( &BSP_Configuration, &Cpu_table );
Index: c/src/lib/libbsp/i386/i386ex/include/bsp.h
===================================================================
--- c/src/lib/libbsp/i386/i386ex/include/bsp.h	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/i386/i386ex/include/bsp.h	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -113,10 +113,4 @@
  */
  
-/*
- * How many libio files we want
- */
- 
-#define BSP_LIBIO_MAX_FDS       20
-
 /* miscellaneous stuff assumed to exist */
 
Index: c/src/lib/libbsp/i386/i386ex/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/i386/i386ex/startup/bspstart.c	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/i386/i386ex/startup/bspstart.c	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -98,26 +98,8 @@
 
   Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
- 
-  Cpu_table.predriver_hook = NULL;
- 
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
- 
-  Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
- 
-  Cpu_table.do_zero_of_workspace = TRUE;
- 
   Cpu_table.interrupt_table_segment = get_ds();
- 
   Cpu_table.interrupt_table_offset = (void *)Interrupt_descriptor_table;
- 
   Cpu_table.interrupt_stack_size = 4096;  /* STACK_MINIMUM_SIZE */
- 
-  Cpu_table.extra_mpci_receive_server_stack = 0;
-
-  /*
-   *  Copy the table
-   */
-
-  BSP_Configuration = Configuration;
 
 #if defined(RTEMS_POSIX_API)
@@ -134,10 +116,3 @@
   /*   console_reserve_resources( &BSP_Configuration ); */
 
-
-  /*
-   * Tell libio how many fd's we want and allow it to tweak config
-   */
-
-  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
-
 }
Index: c/src/lib/libbsp/i386/pc386/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/i386/pc386/startup/bspstart.c	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/i386/pc386/startup/bspstart.c	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -119,32 +119,7 @@
   Cpu_table.extra_mpci_receive_server_stack = 0;
 
-  /* Copy user's table and make necessary adjustments.              */
-
-  BSP_Configuration = Configuration;
-
   /* Place RTEMS workspace at top of physical RAM (RAM_END defined in 'bsp.h' */
 
   BSP_Configuration.work_space_start =
                           (void *)(RAM_END - BSP_Configuration.work_space_size);
-
-  /* Tell libio how many fd's we want and allow it to tweak config. */
-
-  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
-
-#if 0
-  rtems_initialize_executive(&BSP_Configuration, &Cpu_table);
-  /* does not return */
-
-  /*-------------------------------------------------------------------------+
-  | We only return here if the executive has finished. This happens when the
-  | task has called exit(). We will then call _exit() which is part of the bsp.
-  +--------------------------------------------------------------------------*/
-
-  for (;;)
-    _exit(0);
-
-  /* no cleanup necessary for PC386 */
-
-  return 0;
-#endif
 } /* bsp_start */
Index: c/src/lib/libbsp/i960/cvme961/include/bsp.h
===================================================================
--- c/src/lib/libbsp/i960/cvme961/include/bsp.h	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/i960/cvme961/include/bsp.h	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -130,10 +130,4 @@
  */
 
-/*
- * How many libio files we want
- */
-
-#define BSP_LIBIO_MAX_FDS       20
-
 /* functions */
 
Index: c/src/lib/libbsp/i960/cvme961/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/i960/cvme961/startup/bspstart.c	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/i960/cvme961/startup/bspstart.c	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -107,35 +107,8 @@
   i960_soft_reset( Prcb );
 
-  /*
-   *  we do not use the pretasking_hook.
-   */
-
   Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
-
-  Cpu_table.predriver_hook = NULL;
-
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
-
-  Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
-
-  Cpu_table.do_zero_of_workspace = TRUE;
-
   Cpu_table.interrupt_stack_size = 4096;
-
-  Cpu_table.extra_mpci_receive_server_stack = 0;
-
   Cpu_table.Prcb = Prcb;
-
-  /*
-   *  Copy the table
-   */
-
-  BSP_Configuration = Configuration;
-
-  /*
-   * Tell libio how many fd's we want and allow it to tweak config
-   */
-
-  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
 
   BSP_Configuration.work_space_start = (void *)
Index: c/src/lib/libbsp/m68k/dmv152/include/bsp.h
===================================================================
--- c/src/lib/libbsp/m68k/dmv152/include/bsp.h	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/m68k/dmv152/include/bsp.h	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -155,10 +155,4 @@
  */
 
-/*
- * How many libio files we want
- */
-
-#define BSP_LIBIO_MAX_FDS       20
-
 /* functions */
 
Index: c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -117,25 +117,10 @@
 
   Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
-
-  Cpu_table.predriver_hook = NULL;
-
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
-
-  Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
-
   Cpu_table.do_zero_of_workspace = TRUE;
+  Cpu_table.interrupt_stack_size = 4096;
 
   m68k_get_vbr( vbr );
   Cpu_table.interrupt_vector_table = vbr;
-
-  Cpu_table.interrupt_stack_size = 4096;
-
-  Cpu_table.extra_mpci_receive_server_stack = 0;
-
-  /*
-   *  Copy the table
-   */
-
-  BSP_Configuration = Configuration;
 
   BSP_Configuration.work_space_start = (void *)
@@ -148,10 +133,4 @@
   console_reserve_resources( &BSP_Configuration );
 
-  /*
-   * Tell libio how many fd's we want and allow it to tweak config
-   */
-
-  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
-
   /* Clock_exit is done as an atexit() function */
 }
Index: c/src/lib/libbsp/m68k/efi332/include/bsp.h
===================================================================
--- c/src/lib/libbsp/m68k/efi332/include/bsp.h	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/m68k/efi332/include/bsp.h	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -131,10 +131,4 @@
  */
 
-/*
- * How many libio files we want
- */
- 
-#define BSP_LIBIO_MAX_FDS       20
-
 /* functions */
 
Index: c/src/lib/libbsp/m68k/efi332/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/m68k/efi332/startup/bspstart.c	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/m68k/efi332/startup/bspstart.c	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -93,34 +93,11 @@
 
   Cpu_table.pretasking_hook = bsp_pretasking_hook;
-
-  Cpu_table.predriver_hook = NULL;
-
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
-
-  Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
-
-  Cpu_table.do_zero_of_workspace = TRUE;
 
   m68k_get_vbr( vbr );
   Cpu_table.interrupt_vector_table = vbr;
 
-  Cpu_table.interrupt_stack_size = 0;
-
-  Cpu_table.extra_mpci_receive_server_stack = 0;
-
-  /*
-   *  Copy the table
-   */
-
-  BSP_Configuration = Configuration;
-
   BSP_Configuration.work_space_start = (void *)
     (((unsigned int)_end + STACK_SIZE + 0x100) & 0xffffff00);
-
-  /*
-   * Tell libio how many fd's we want and allow it to tweak config
-   */
-
-  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
 
   /* Clock_exit is done as an atexit() function */
Index: c/src/lib/libbsp/m68k/efi68k/include/bsp.h
===================================================================
--- c/src/lib/libbsp/m68k/efi68k/include/bsp.h	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/m68k/efi68k/include/bsp.h	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -133,10 +133,4 @@
  */
  
-/*
- * How many libio files we want
- */
- 
-#define BSP_LIBIO_MAX_FDS       20
- 
 /* functions */
 
Index: c/src/lib/libbsp/m68k/efi68k/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/m68k/efi68k/startup/bspstart.c	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/m68k/efi68k/startup/bspstart.c	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -101,34 +101,11 @@
 
   Cpu_table.pretasking_hook = bsp_pretasking_hook;
- 
-  Cpu_table.predriver_hook = NULL;
- 
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
-
-  Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
-
-  Cpu_table.do_zero_of_workspace = TRUE;
 
   m68k_get_vbr( vbr );
   Cpu_table.interrupt_vector_table = vbr;
 
-  Cpu_table.interrupt_stack_size = 0;
-
-  Cpu_table.extra_mpci_receive_server_stack = 0;
-
-  /*
-   *  Copy the table
-   */
-
-  BSP_Configuration = Configuration;
-
   BSP_Configuration.work_space_start = (void *)
     (((unsigned int)_end + STACK_SIZE + 0x100) & 0xffffff00);
-
-  /*
-   * Tell libio how many fd's we want and allow it to tweak config
-   */
-
-  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
 
   /* Clock_exit is done as an atexit() function */
Index: c/src/lib/libbsp/m68k/gen68302/include/bsp.h
===================================================================
--- c/src/lib/libbsp/m68k/gen68302/include/bsp.h	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/m68k/gen68302/include/bsp.h	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -96,10 +96,4 @@
  */
 
-/*
- * How many libio files we want
- */
-
-#define BSP_LIBIO_MAX_FDS       20
-
 /* miscellaneous stuff assumed to exist */
 
Index: c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -93,17 +93,4 @@
 #endif
 
-
-  /*
-   *  Copy the Configuration Table .. so we can change it
-   */
-
-  BSP_Configuration = Configuration;
-
-  /*
-   * Tell libio how many fd's we want and allow it to tweak config
-   */
-
-  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
-
   /*
    *  Need to "allocate" the memory for the RTEMS Workspace and
@@ -119,25 +106,6 @@
    */
 
-  /*
-   *  we do not use the pretasking_hook
-   */
-
   Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
-
-  Cpu_table.predriver_hook = NULL;
-
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
-
-  Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
-
-  Cpu_table.do_zero_of_workspace = TRUE;
-
   Cpu_table.interrupt_stack_size = 4096;
-
-  Cpu_table.extra_mpci_receive_server_stack = 0;
-
-  /*
-   *  Don't forget the other CPU Table entries.
-   */
-
 }
Index: c/src/lib/libbsp/m68k/gen68360/include/bsp.h
===================================================================
--- c/src/lib/libbsp/m68k/gen68360/include/bsp.h	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/m68k/gen68360/include/bsp.h	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -95,10 +95,4 @@
  */
 
-/*
- * How many libio files we want
- */
-
-#define BSP_LIBIO_MAX_FDS       20
-
 /* miscellaneous stuff assumed to exist */
 
Index: c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -89,17 +89,4 @@
 #endif
 
-
-  /*
-   *  Copy the Configuration Table .. so we can change it
-   */
-
-  BSP_Configuration = Configuration;
-
-  /*
-   * Tell libio how many fd's we want and allow it to tweak config
-   */
-
-  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
-
   /*
    *  Need to "allocate" the memory for the RTEMS Workspace and
@@ -114,24 +101,7 @@
    */
 
-  /*
-   *  we do not use the pretasking_hook
-   */
-
   Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
-
-  Cpu_table.predriver_hook = NULL;
-
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
-
-  Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
-
   Cpu_table.do_zero_of_workspace = TRUE;
-
   Cpu_table.interrupt_stack_size = 4096;
-
-  Cpu_table.extra_mpci_receive_server_stack = 0;
-
-  /*
-   *  Don't forget the other CPU Table entries.
-   */
 }
Index: c/src/lib/libbsp/m68k/idp/include/bsp.h
===================================================================
--- c/src/lib/libbsp/m68k/idp/include/bsp.h	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/m68k/idp/include/bsp.h	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -68,10 +68,4 @@
  */
 
-/*
- * How many libio files we want
- */
-
-#define BSP_LIBIO_MAX_FDS       20
-
 /* miscellaneous stuff assumed to exist */
 
Index: c/src/lib/libbsp/m68k/idp/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/m68k/idp/startup/bspstart.c	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/m68k/idp/startup/bspstart.c	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -124,34 +124,11 @@
  
   Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
-
-  Cpu_table.predriver_hook = NULL;
-
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
-
-  Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
-
-  Cpu_table.do_zero_of_workspace = TRUE;
- 
   Cpu_table.interrupt_vector_table = (m68k_isr_entry *) &M68Kvec;
- 
   Cpu_table.interrupt_stack_size = 4096;
 
-  Cpu_table.extra_mpci_receive_server_stack = 0;
-
-  /*
-   *  Copy the table
-   */
- 
-  BSP_Configuration = Configuration;
- 
   BSP_Configuration.work_space_start = (void *)
      (RAM_END - BSP_Configuration.work_space_size);
  
-  /*
-   * Tell libio how many fd's we want and allow it to tweak config
-   */
-
-  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
-
 /*  led_putnum('e'); * for debugging purposes only */
 
Index: c/src/lib/libbsp/m68k/mvme136/include/bsp.h
===================================================================
--- c/src/lib/libbsp/m68k/mvme136/include/bsp.h	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/m68k/mvme136/include/bsp.h	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -139,10 +139,4 @@
  */
 
-/*
- * How many libio files we want
- */
-
-#define BSP_LIBIO_MAX_FDS       20
-
 /* functions */
 
Index: c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -107,32 +107,10 @@
 
   Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
-
-  Cpu_table.predriver_hook = NULL;
-
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
-
-  Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
-
-  Cpu_table.do_zero_of_workspace = TRUE;
-
   Cpu_table.interrupt_vector_table = (m68k_isr_entry *) &M68Kvec;
-
   Cpu_table.interrupt_stack_size = 4096;
-
-  Cpu_table.extra_mpci_receive_server_stack = 0;
-
-  /*
-   *  Copy the table
-   */
-
-  BSP_Configuration = Configuration;
 
   BSP_Configuration.work_space_start = (void *)
      (RAM_END - BSP_Configuration.work_space_size);
 
-  /*
-   * Tell libio how many fd's we want and allow it to tweak config
-   */
-
-  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
 }
Index: c/src/lib/libbsp/m68k/mvme147/include/bsp.h
===================================================================
--- c/src/lib/libbsp/m68k/mvme147/include/bsp.h	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/m68k/mvme147/include/bsp.h	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -165,10 +165,4 @@
  */
 
-/*
- * How many libio files we want
- */
-
-#define BSP_LIBIO_MAX_FDS       20
-
 /* functions */
 
Index: c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -113,32 +113,10 @@
 
   Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
-
-  Cpu_table.predriver_hook = NULL;
-
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
-
-  Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
-
-  Cpu_table.do_zero_of_workspace = TRUE;
-
   Cpu_table.interrupt_vector_table = (m68k_isr_entry *) &M68Kvec;
-
   Cpu_table.interrupt_stack_size = 4096;
-
-  Cpu_table.extra_mpci_receive_server_stack = 0;
-
-  /*
-   *  Copy the table
-   */
-
-  BSP_Configuration = Configuration;
 
   BSP_Configuration.work_space_start = (void *)
      (RAM_END - BSP_Configuration.work_space_size);
 
-  /*
-   * Tell libio how many fd's we want and allow it to tweak config
-   */
-
-  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
 }
Index: c/src/lib/libbsp/m68k/mvme147s/include/bsp.h
===================================================================
--- c/src/lib/libbsp/m68k/mvme147s/include/bsp.h	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/m68k/mvme147s/include/bsp.h	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -229,10 +229,4 @@
  */
 
-/*
- * How many libio files we want
- */
-
-#define BSP_LIBIO_MAX_FDS       20
-
 /* functions */
 
Index: c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -172,32 +172,10 @@
 
   Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
-
-  Cpu_table.predriver_hook = NULL;
-
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
-
-  Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
-
-  Cpu_table.do_zero_of_workspace = TRUE;
-
   Cpu_table.interrupt_vector_table = (m68k_isr_entry *) &M68Kvec;
-
   Cpu_table.interrupt_stack_size = 4096;
-
-  Cpu_table.extra_mpci_receive_server_stack = 0;
-
-  /*
-   *  Copy the table
-   */
-
-  BSP_Configuration = Configuration;
 
   BSP_Configuration.work_space_start = (void *)
      (RAM_END - BSP_Configuration.work_space_size);
 
-  /*
-   * Tell libio how many fd's we want and allow it to tweak config
-   */
-
-  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
 }
Index: c/src/lib/libbsp/m68k/mvme162/include/bsp.h
===================================================================
--- c/src/lib/libbsp/m68k/mvme162/include/bsp.h	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/m68k/mvme162/include/bsp.h	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -271,10 +271,4 @@
  */
 
-/*
- * How many libio files we want
- */
-
-#define BSP_LIBIO_MAX_FDS       20
-
 /* miscellaneous stuff assumed to exist */
 
Index: c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -130,30 +130,7 @@
 
   Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
-
-  Cpu_table.predriver_hook = NULL;
-
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
-
-  Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
-
-  Cpu_table.do_zero_of_workspace = TRUE;
-
   Cpu_table.interrupt_vector_table = (m68k_isr_entry *) &M68Kvec;
-
   Cpu_table.interrupt_stack_size = 4096;
-
-  Cpu_table.extra_mpci_receive_server_stack = 0;
-
-  /*
-   *  Copy the table
-   */
-
-  BSP_Configuration = Configuration;
-
-  /*
-   * Tell libio how many fd's we want and allow it to tweak config
-   */
-
-  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
 
   BSP_Configuration.work_space_start = (void *)
Index: c/src/lib/libbsp/m68k/ods68302/include/bsp.h
===================================================================
--- c/src/lib/libbsp/m68k/ods68302/include/bsp.h	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/m68k/ods68302/include/bsp.h	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -110,10 +110,4 @@
  */
 
-/*
- * How many libio files we want
- */
-
-#define BSP_LIBIO_MAX_FDS       20
-
 /* miscellaneous stuff assumed to exist */
 
Index: c/src/lib/libbsp/m68k/ods68302/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/m68k/ods68302/startup/bspstart.c	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/m68k/ods68302/startup/bspstart.c	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -92,17 +92,4 @@
 #endif
 
-
-  /*
-   *  Copy the Configuration Table .. so we can change it
-   */
-
-  BSP_Configuration = Configuration;
-
-  /*
-   * Tell libio how many fd's we want and allow it to tweak config
-   */
-
-  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
-
   /*
    *  Need to "allocate" the memory for the RTEMS Workspace and
@@ -118,24 +105,6 @@
    */
 
-  /*
-   *  we do not use the pretasking_hook
-   */
-
   Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
-
-  Cpu_table.predriver_hook = NULL;
-
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
-
-  Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
-
-  Cpu_table.do_zero_of_workspace = TRUE;
-
   Cpu_table.interrupt_stack_size = 4096;
-
-  Cpu_table.extra_mpci_receive_server_stack = 0;
-
-  /*
-   *  Don't forget the other CPU Table entries.
-   */
 }
Index: c/src/lib/libbsp/mips/p4000/include/bsp.h
===================================================================
--- c/src/lib/libbsp/mips/p4000/include/bsp.h	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/mips/p4000/include/bsp.h	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -103,10 +103,4 @@
  */
 
-/*
- * How many libio files we want
- */
-
-#define BSP_LIBIO_MAX_FDS       20
-
 /* miscellaneous stuff assumed to exist */
 
Index: c/src/lib/libbsp/mips/p4000/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/mips/p4000/startup/bspstart.c	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/mips/p4000/startup/bspstart.c	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -102,16 +102,4 @@
 
   /*
-   *  Copy the Configuration Table .. so we can change it
-   */
-
-  BSP_Configuration = Configuration;
-
-  /*
-   * Tell libio how many fd's we want and allow it to tweak config
-   */
-
-  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
-
-  /*
    *  Need to "allocate" the memory for the RTEMS Workspace and
    *  tell the RTEMS configuration where it is.  This memory is
@@ -119,5 +107,6 @@
    */
 
-  BSP_Configuration.work_space_start = (void *)((unsigned64)((&end) + LIBC_HEAP_SIZE + 0x2000) & ~0x7);
+  BSP_Configuration.work_space_start =
+       (void *)((unsigned64)((&end) + LIBC_HEAP_SIZE + 0x2000) & ~0x7);
 
   /*
@@ -125,25 +114,6 @@
    */
 
-  /*
-   *  we do not use the pretasking_hook
-   */
-
   Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
-
-  Cpu_table.predriver_hook = NULL;
-
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
-
-  Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
-
-  Cpu_table.do_zero_of_workspace = TRUE;
-
   Cpu_table.interrupt_stack_size = 4096;
-
-  Cpu_table.extra_mpci_receive_server_stack = 0;
-
-  /*
-   *  Don't forget the other CPU Table entries.
-   */
-
 }
Index: c/src/lib/libbsp/mips64orion/p4000/include/bsp.h
===================================================================
--- c/src/lib/libbsp/mips64orion/p4000/include/bsp.h	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/mips64orion/p4000/include/bsp.h	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -103,10 +103,4 @@
  */
 
-/*
- * How many libio files we want
- */
-
-#define BSP_LIBIO_MAX_FDS       20
-
 /* miscellaneous stuff assumed to exist */
 
Index: c/src/lib/libbsp/mips64orion/p4000/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/mips64orion/p4000/startup/bspstart.c	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/mips64orion/p4000/startup/bspstart.c	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -102,16 +102,4 @@
 
   /*
-   *  Copy the Configuration Table .. so we can change it
-   */
-
-  BSP_Configuration = Configuration;
-
-  /*
-   * Tell libio how many fd's we want and allow it to tweak config
-   */
-
-  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
-
-  /*
    *  Need to "allocate" the memory for the RTEMS Workspace and
    *  tell the RTEMS configuration where it is.  This memory is
@@ -119,5 +107,6 @@
    */
 
-  BSP_Configuration.work_space_start = (void *)((unsigned64)((&end) + LIBC_HEAP_SIZE + 0x2000) & ~0x7);
+  BSP_Configuration.work_space_start =
+       (void *)((unsigned64)((&end) + LIBC_HEAP_SIZE + 0x2000) & ~0x7);
 
   /*
@@ -125,25 +114,6 @@
    */
 
-  /*
-   *  we do not use the pretasking_hook
-   */
-
   Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
-
-  Cpu_table.predriver_hook = NULL;
-
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
-
-  Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
-
-  Cpu_table.do_zero_of_workspace = TRUE;
-
   Cpu_table.interrupt_stack_size = 4096;
-
-  Cpu_table.extra_mpci_receive_server_stack = 0;
-
-  /*
-   *  Don't forget the other CPU Table entries.
-   */
-
 }
Index: c/src/lib/libbsp/no_cpu/no_bsp/include/bsp.h
===================================================================
--- c/src/lib/libbsp/no_cpu/no_bsp/include/bsp.h	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/no_cpu/no_bsp/include/bsp.h	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -82,10 +82,4 @@
  */
 
-/*
- * How many libio files we want
- */
-
-#define BSP_LIBIO_MAX_FDS       20
-
 /* functions */
 
Index: c/src/lib/libbsp/no_cpu/no_bsp/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/no_cpu/no_bsp/startup/bspstart.c	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/no_cpu/no_bsp/startup/bspstart.c	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -79,15 +79,6 @@
  */
 
-int bsp_start(
-  int argc,
-  char **argv,
-  char **environp
-)
+void bsp_start( void )
 {
-  if ((argc > 0) && argv && argv[0])
-    rtems_progname = argv[0];
-  else
-    rtems_progname = "RTEMS";
-
   /*
    *  Allocate the memory for the RTEMS Work Space.  This can come from
@@ -97,16 +88,4 @@
    *  of work space from the last physical address on the CPU board.
    */
-
-  /*
-   *  Copy the Configuration Table .. so we can change it
-   */
-
-  BSP_Configuration = Configuration;
-
-  /*
-   * Tell libio how many fd's we want and allow it to tweak config
-   */
-
-  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
 
   /*
@@ -122,34 +101,6 @@
    */
 
-  /*
-   *  we do not use the pretasking_hook
-   */
-
   Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
-
-  Cpu_table.predriver_hook = NULL;
-
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
-
-  Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
-
-  Cpu_table.do_zero_of_workspace = TRUE;
-
   Cpu_table.interrupt_stack_size = 4096;
-
-  Cpu_table.extra_mpci_receive_server_stack = 0;
-
-  /*
-   *  Don't forget the other CPU Table entries.
-   */
-
-  /*
-   *  Start RTEMS
-   */
-
-  rtems_initialize_executive( &BSP_Configuration, &Cpu_table );
-
-  bsp_cleanup();
-
-  return 0;
 }
Index: c/src/lib/libbsp/powerpc/papyrus/include/bsp.h
===================================================================
--- c/src/lib/libbsp/powerpc/papyrus/include/bsp.h	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/powerpc/papyrus/include/bsp.h	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -108,10 +108,4 @@
  */
  
-/*
- * How many libio files we want
- */
- 
-#define BSP_LIBIO_MAX_FDS       20
-
 /* functions */
 
Index: c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -108,16 +108,4 @@
 
   /*
-   *  Copy the Configuration Table .. so we can change it
-   */
-
-  BSP_Configuration = Configuration;
-
-  /*
-   * Tell libio how many fd's we want and allow it to tweak config
-   */
-
-  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
-
-  /*
    *  Need to "allocate" the memory for the RTEMS Workspace and
    *  tell the RTEMS configuration where it is.  This memory is
@@ -133,35 +121,14 @@
 
   Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
-
-  Cpu_table.predriver_hook = NULL;
-
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
-
-  Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
-
-  Cpu_table.do_zero_of_workspace = TRUE;
-
   Cpu_table.interrupt_stack_size = 4 * 1024;
 
-  Cpu_table.extra_mpci_receive_server_stack = 0;
-
-  /*
-   *  Don't forget the other CPU Table entries.
-   */
-
   Cpu_table.clicks_per_usec = 10;
-
   Cpu_table.serial_per_sec = 10000000;
-
   Cpu_table.serial_external_clock = 1;
-
   Cpu_table.serial_xon_xoff = 0;
-
   Cpu_table.serial_cts_rts = 1;
-
   Cpu_table.serial_rate = 9600;
-
   Cpu_table.timer_average_overhead = 2;
-
   Cpu_table.timer_least_valid = 3;
 }
Index: c/src/lib/libbsp/powerpc/psim/include/bsp.h
===================================================================
--- c/src/lib/libbsp/powerpc/psim/include/bsp.h	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/powerpc/psim/include/bsp.h	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -123,10 +123,4 @@
 extern int   end;        /* last address in the program */
 
-/*
- * How many libio files we want
- */
- 
-#define BSP_LIBIO_MAX_FDS       20
-
 /* functions */
 
Index: c/src/lib/libbsp/powerpc/psim/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/powerpc/psim/startup/bspstart.c	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/powerpc/psim/startup/bspstart.c	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -189,43 +189,25 @@
 
   Cpu_table.pretasking_hook = bsp_pretasking_hook;    /* init libc, etc. */
-
-  Cpu_table.predriver_hook = NULL; /* bsp_spurious_initialize;*/
-
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
 
-  Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
-
-  /*
+  /*
+   *  Is this true?
+   *
    *  PSIM does zero out memory BUT only when IT begins execution.  Thus
    *  if we want to have a clean slate in the workspace each time we
    *  begin execution of OUR application, then we must zero the workspace.
+   *
+   *  It is true that it takes simulated time to clear the memory.
    */
 
   Cpu_table.do_zero_of_workspace = FALSE;
 
-  /*
-   *  This should be enough interrupt stack.
-   */
-
   Cpu_table.interrupt_stack_size = (12 * 1024);
 
   /*
-   *  SIS does not support MP configurations so there is really no way
-   *  to check this out.
-   */
-
-  Cpu_table.extra_mpci_receive_server_stack = 0;
-
-  /*
    *  The monitor likes the exception table to be at 0x0.
    */
 
   Cpu_table.exceptions_in_RAM = TRUE;
-
-  /*
-   *  Copy the table and allocate memory for the RTEMS Workspace
-   */
-
-  BSP_Configuration = Configuration;
 
 #if defined(RTEMS_POSIX_API)
@@ -283,9 +265,3 @@
       (int) &PSIM_INSTRUCTIONS_PER_MICROSECOND;
   }
-
-  /*
-   *  Initialize RTEMS. main() will finish it up and start multitasking.
-   */
-
-  rtems_libio_config( &BSP_Configuration, BSP_LIBIO_MAX_FDS );
 }
Index: c/src/lib/libbsp/sh/gensh1/include/bsp.h
===================================================================
--- c/src/lib/libbsp/sh/gensh1/include/bsp.h	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/sh/gensh1/include/bsp.h	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -109,10 +109,4 @@
 
 /*
- * How many libio files we want
- */
-
-#define BSP_LIBIO_MAX_FDS       20
-
-/*
  * FIXME: Should this go to libcpu/sh/sh7032 ?
  */
Index: c/src/lib/libbsp/sh/gensh1/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/sh/gensh1/startup/bspstart.c	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/sh/gensh1/startup/bspstart.c	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -68,5 +68,5 @@
 void bsp_pretasking_hook(void)
 {
-    bsp_libc_init((&HeapStart, sizeof(unsigned32) * (&HeapEnd - &HeapStart), 0);
+    bsp_libc_init(&HeapStart, sizeof(unsigned32) * (&HeapEnd - &HeapStart), 0);
  
 #ifdef RTEMS_DEBUG
@@ -100,10 +100,4 @@
 
   /*
-   *  Copy the Configuration Table .. so we can change it
-   */
-
-  BSP_Configuration = Configuration;
-
-  /*
    *  Need to "allocate" the memory for the RTEMS Workspace and
    *  tell the RTEMS configuration where it is.  This memory is
@@ -132,12 +126,5 @@
 
   Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
-
-  Cpu_table.predriver_hook = NULL;
-
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
-
-  Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
-
-  Cpu_table.do_zero_of_workspace = TRUE;
 
 #if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE )
@@ -145,14 +132,3 @@
 #endif
 
-  Cpu_table.extra_mpci_receive_server_stack = 0;
-
-  /*
-   *  Don't forget the other CPU Table entries.
-   */
-
-  /*
-   * Tell libio how many fd's we want and allow it to tweak config
-   */
-
-  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
 }
Index: c/src/lib/libbsp/shared/main.c
===================================================================
--- c/src/lib/libbsp/shared/main.c	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/shared/main.c	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -25,4 +25,5 @@
 extern void bsp_cleanup( void );
 
+extern rtems_configuration_table  Configuration;
 extern rtems_configuration_table  BSP_Configuration;
 extern rtems_cpu_table            Cpu_table;
@@ -47,14 +48,57 @@
   int status;
 
-  /* the atexit hook will be before the static destructor list's entry
-     point */
+  /*
+   *  Set default values for the CPU Table fields all ports must have.
+   *  These values can be overridden in bsp_start() but they are
+   *  right most of the time.
+   */
+
+  Cpu_table.pretasking_hook                 = NULL;
+  Cpu_table.predriver_hook                  = NULL;
+  Cpu_table.postdriver_hook                 = NULL;
+  Cpu_table.idle_task                       = NULL;
+  Cpu_table.do_zero_of_workspace            = TRUE;
+  Cpu_table.interrupt_stack_size            = RTEMS_MINIMUM_STACK_SIZE;
+  Cpu_table.extra_mpci_receive_server_stack = 0;
+  Cpu_table.stack_allocate_hook             = NULL;
+  Cpu_table.stack_free_hook                 = NULL;
+
+
+  /*
+   *  Copy the configuration table so we and the BSP wants to change it.
+   */
+
+  BSP_Configuration = Configuration;
+
+  /*
+   *  The atexit hook will be before the static destructor list's entry
+   *  point.
+   */
+
   bsp_start();
+
+  /*
+   *  Initialize RTEMS but do NOT start multitasking.
+   */
 
   bsp_isr_level =
     rtems_initialize_executive_early( &BSP_Configuration, &Cpu_table );
 
+  /*
+   *  Call main() and get the global constructors invoked if there
+   *  are any.
+   */
+
   status = main(argc, argv);
 
+  /*
+   *  Perform any BSP specific shutdown actions.
+   */
+
   bsp_cleanup();  
+
+  /*
+   *  Now return to the start code.
+   */
 
   return status;
Index: c/src/lib/libbsp/sparc/erc32/include/bsp.h
===================================================================
--- c/src/lib/libbsp/sparc/erc32/include/bsp.h	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/sparc/erc32/include/bsp.h	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -143,10 +143,4 @@
  */
  
-/*
- * How many libio files we want
- */
- 
-#define BSP_LIBIO_MAX_FDS       20
- 
  
 /* miscellaneous stuff assumed to exist */
Index: c/src/lib/libbsp/sparc/erc32/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/sparc/erc32/startup/bspstart.c	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/sparc/erc32/startup/bspstart.c	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -199,10 +199,5 @@
 
   Cpu_table.pretasking_hook = bsp_pretasking_hook;    /* init libc, etc. */
-
-  Cpu_table.predriver_hook = NULL; /* bsp_spurious_initialize;*/
-
   Cpu_table.postdriver_hook = bsp_postdriver_hook;
-
-  Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
 
   /*
@@ -211,5 +206,4 @@
    *  begin execution of OUR application, then we must zero the workspace.
    */
-
   Cpu_table.do_zero_of_workspace = TRUE;
 
@@ -219,17 +213,4 @@
 
   Cpu_table.interrupt_stack_size = (24 * 1024);
-
-  /*
-   *  SIS does not support MP configurations so there is really no way
-   *  to check this out.
-   */
-
-  Cpu_table.extra_mpci_receive_server_stack = 0;
-
-  /*
-   *  Copy the table and allocate memory for the RTEMS Workspace
-   */
-
-  BSP_Configuration = Configuration;
 
 #if defined(RTEMS_POSIX_API)
@@ -274,9 +255,3 @@
 
   CPU_SPARC_CLICKS_PER_TICK = BSP_Configuration.microseconds_per_tick;
-
-  /*
-   *  Initialize RTEMS. main() will finish it up and start multitasking.
-   */
-
-  rtems_libio_config( &BSP_Configuration, BSP_LIBIO_MAX_FDS );
 }
Index: c/src/lib/libbsp/unix/posix/include/bsp.h
===================================================================
--- c/src/lib/libbsp/unix/posix/include/bsp.h	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/unix/posix/include/bsp.h	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -73,10 +73,4 @@
  */
  
-/*
- * How many libio files we want
- */
-
-#define BSP_LIBIO_MAX_FDS       20
-
 /* functions */
 
Index: c/src/lib/libbsp/unix/posix/startup/bspstart.c
===================================================================
--- c/src/lib/libbsp/unix/posix/startup/bspstart.c	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libbsp/unix/posix/startup/bspstart.c	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -129,5 +129,5 @@
 
     /*
-     *  Copy the table
+     *  Copy the table (normally done in shared main).
      */
 
@@ -215,27 +215,21 @@
     Cpu_table.extra_mpci_receive_server_stack = 0;
 
-  /*
-   * Tell libio how many fd's we want and allow it to tweak config
-   */
-
-  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
-
-  /*
-   * Add 1 extension for MPCI_fatal
-   */
-
-  if (BSP_Configuration.User_multiprocessing_table)
-      BSP_Configuration.maximum_extensions++;
-
-  CPU_CLICKS_PER_TICK = 1;
-
-  /*
-   *  Start most of RTEMS
-   *  main() will start the rest
-   */
-
-  bsp_isr_level = rtems_initialize_executive_early(
-    &BSP_Configuration,
-    &Cpu_table
-  );
+    /*
+     * Add 1 extension for MPCI_fatal
+     */
+
+    if (BSP_Configuration.User_multiprocessing_table)
+        BSP_Configuration.maximum_extensions++;
+
+    CPU_CLICKS_PER_TICK = 1;
+
+    /*
+     *  Start most of RTEMS
+     *  main() will start the rest
+     */
+
+    bsp_isr_level = rtems_initialize_executive_early(
+      &BSP_Configuration,
+      &Cpu_table
+    );
 }
Index: c/src/lib/libc/libio.c
===================================================================
--- c/src/lib/libc/libio.c	(revision b6394ae43432a3c69f1737d1ed1e23db8e7896ba)
+++ c/src/lib/libc/libio.c	(revision bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154)
@@ -100,22 +100,4 @@
     rtems_fatal_error_occurred( RTEMS_INVALID_NUMBER );
   handlers[handler_index] = *handler;
-}
-
-
-void
-rtems_libio_config(
-    rtems_configuration_table *config,
-    unsigned32                 max_fds
-)
-{
-    rtems_libio_number_iops = max_fds;
-
-    /*
-     * tweak config to reflect # of semaphores we will need
-     */
-
-    /* one for iop table */
-    config->RTEMS_api_configuration->maximum_semaphores += 1; 
-    config->RTEMS_api_configuration->maximum_semaphores += max_fds;
 }
 
