diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-04-15 20:50:31 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-04-15 20:50:31 +0000 |
commit | bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154 (patch) | |
tree | a5409842b20b5263d7b14910033e728927dd4d41 /c/src/lib/libbsp/i386 | |
parent | Transitioned to shared bsp_libc_init() and cleaned up comments. (diff) | |
download | rtems-bd9c3d1e76df8b4e774f50dbaf1bd5ebeeb7a154.tar.bz2 |
Numerous changes which in total greatly reduced the amount of source
code in each BSP's bspstart.c. These changes were:
+ confdefs.h now knows libio's semaphore requirements
+ shared/main.c now copies Configuration to BSP_Configuration
+ shared/main.c fills in the Cpu_table with default values
This removed the need for rtems_libio_config() and the constant
BSP_LIBIO_MAX_FDS in every BSP. Plus now the maximum number of open
files can now be set on the gcc command line.
Diffstat (limited to 'c/src/lib/libbsp/i386')
-rw-r--r-- | c/src/lib/libbsp/i386/force386/include/bsp.h | 6 | ||||
-rw-r--r-- | c/src/lib/libbsp/i386/force386/startup/bspstart.c | 23 | ||||
-rw-r--r-- | c/src/lib/libbsp/i386/go32/include/bsp.h | 6 | ||||
-rw-r--r-- | c/src/lib/libbsp/i386/go32/startup/bspstart.c | 15 | ||||
-rw-r--r-- | c/src/lib/libbsp/i386/i386ex/include/bsp.h | 6 | ||||
-rw-r--r-- | c/src/lib/libbsp/i386/i386ex/startup/bspstart.c | 25 | ||||
-rw-r--r-- | c/src/lib/libbsp/i386/pc386/startup/bspstart.c | 25 |
7 files changed, 0 insertions, 106 deletions
diff --git a/c/src/lib/libbsp/i386/force386/include/bsp.h b/c/src/lib/libbsp/i386/force386/include/bsp.h index fdf3c2455f..125e53ec88 100644 --- a/c/src/lib/libbsp/i386/force386/include/bsp.h +++ b/c/src/lib/libbsp/i386/force386/include/bsp.h @@ -142,12 +142,6 @@ extern "C" { * NOTE: Use the standard Clock driver entry */ -/* - * How many libio files we want - */ - -#define BSP_LIBIO_MAX_FDS 20 - /* miscellaneous stuff assumed to exist */ extern rtems_configuration_table BSP_Configuration; diff --git a/c/src/lib/libbsp/i386/force386/startup/bspstart.c b/c/src/lib/libbsp/i386/force386/startup/bspstart.c index f32fc798f1..c4ea26cdfb 100644 --- a/c/src/lib/libbsp/i386/force386/startup/bspstart.c +++ b/c/src/lib/libbsp/i386/force386/startup/bspstart.c @@ -87,40 +87,17 @@ void bsp_start( void ) 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(); Cpu_table.interrupt_table_offset = (void *)Interrupt_descriptor_table; 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); } diff --git a/c/src/lib/libbsp/i386/go32/include/bsp.h b/c/src/lib/libbsp/i386/go32/include/bsp.h index eb32b3ba66..a2f79040ef 100644 --- a/c/src/lib/libbsp/i386/go32/include/bsp.h +++ b/c/src/lib/libbsp/i386/go32/include/bsp.h @@ -138,12 +138,6 @@ extern "C" { * NOTE: Use the standard Clock driver entry */ -/* - * How many libio files we want - */ - -#define BSP_LIBIO_MAX_FDS 20 - /* functions */ int _IBMPC_chrdy( char * ch ); diff --git a/c/src/lib/libbsp/i386/go32/startup/bspstart.c b/c/src/lib/libbsp/i386/go32/startup/bspstart.c index eeef55eed9..958591ec8c 100644 --- a/c/src/lib/libbsp/i386/go32/startup/bspstart.c +++ b/c/src/lib/libbsp/i386/go32/startup/bspstart.c @@ -105,19 +105,10 @@ int main( rtems_progname = "RTEMS"; 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 ); if ( BSP_Configuration.work_space_start == 0 ) { @@ -128,12 +119,6 @@ int main( _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 ); /* does not return */ diff --git a/c/src/lib/libbsp/i386/i386ex/include/bsp.h b/c/src/lib/libbsp/i386/i386ex/include/bsp.h index 9f5527de2a..896f4e5cc3 100644 --- a/c/src/lib/libbsp/i386/i386ex/include/bsp.h +++ b/c/src/lib/libbsp/i386/i386ex/include/bsp.h @@ -112,12 +112,6 @@ extern "C" { * NOTE: Use the standard Clock driver entry */ -/* - * How many libio files we want - */ - -#define BSP_LIBIO_MAX_FDS 20 - /* miscellaneous stuff assumed to exist */ extern rtems_configuration_table BSP_Configuration; diff --git a/c/src/lib/libbsp/i386/i386ex/startup/bspstart.c b/c/src/lib/libbsp/i386/i386ex/startup/bspstart.c index 9fc13e0262..d71f182230 100644 --- a/c/src/lib/libbsp/i386/i386ex/startup/bspstart.c +++ b/c/src/lib/libbsp/i386/i386ex/startup/bspstart.c @@ -97,28 +97,10 @@ void bsp_start( void ) */ 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) BSP_Configuration.work_space_size *= 3; @@ -133,11 +115,4 @@ void bsp_start( void ) /* 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); - } diff --git a/c/src/lib/libbsp/i386/pc386/startup/bspstart.c b/c/src/lib/libbsp/i386/pc386/startup/bspstart.c index 773d3ba804..305545dee0 100644 --- a/c/src/lib/libbsp/i386/pc386/startup/bspstart.c +++ b/c/src/lib/libbsp/i386/pc386/startup/bspstart.c @@ -118,33 +118,8 @@ void bsp_start( void ) Cpu_table.interrupt_stack_size = 4096; 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 */ |