From 76ba5f222ad66dda7f811a65216e8d3a4cd073e6 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 18 Sep 2008 18:01:48 +0000 Subject: 2008-09-18 Joel Sherrill * Makefile.am, configure.ac, startup/bspstart.c, startup/linkcmds: Use top level shared bsp_get_work_area() implementation. --- c/src/lib/libbsp/i386/i386ex/startup/bspstart.c | 60 +------------------------ c/src/lib/libbsp/i386/i386ex/startup/linkcmds | 7 +++ 2 files changed, 8 insertions(+), 59 deletions(-) (limited to 'c/src/lib/libbsp/i386/i386ex/startup') diff --git a/c/src/lib/libbsp/i386/i386ex/startup/bspstart.c b/c/src/lib/libbsp/i386/i386ex/startup/bspstart.c index b039e2cd6e..41b2ffbd7e 100644 --- a/c/src/lib/libbsp/i386/i386ex/startup/bspstart.c +++ b/c/src/lib/libbsp/i386/i386ex/startup/bspstart.c @@ -20,78 +20,20 @@ * $Id$ */ -void bsp_clean_up(void); - #include #include -/* - * Tells us where to put the workspace in case remote debugger is present. - */ - -extern uint32_t rdb_start; - -/* - * Use the shared implementations of the following routines - */ - -void bsp_libc_init( void *, uint32_t, int ); - -/* - * Function: bsp_pretasking_hook - * Created: 95/03/10 - * - * Description: - * BSP pretasking hook. Called just before drivers are initialized. - * Used to setup libc and install any BSP extensions. - * - * NOTES: - * Must not use libc (to do io) from here, since drivers are - * not yet initialized. - * - */ - -void bsp_pretasking_hook(void) -{ - extern int heap_bottom; - uint32_t heap_start; - uint32_t heap_size; - - heap_start = (uint32_t) &heap_bottom; - if (heap_start & (CPU_ALIGNMENT-1)) - heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1); - - heap_size = Configuration.work_space_start -(void *) heap_start ; - heap_size &= 0xfffffff0; /* keep it as a multiple of 16 bytes */ - - bsp_libc_init((void *) heap_start, heap_size, 0); -} +extern void rtems_irq_mngt_init(); /* * bsp_start * * This routine does the bulk of the system initialization. */ - void bsp_start( void ) { - void rtems_irq_mngt_init(); - - Configuration.work_space_start = (void *) - RAM_END - rtems_configuration_get_work_space_size(); -#ifdef DEBUG - printk("workspace size = 0x%x\nstart = 0x%x, RAM_END = 0x%x\n",rtems_configuration_get_work_space_size(), Configuration.work_space_start, RAM_END ); -#endif - - /* - * Account for the console's resources - */ - /* * Init rtems_interrupt_management */ rtems_irq_mngt_init(); } -void bsp_clean_up(void) { - printk("bsp_cleanup called\n"); -} diff --git a/c/src/lib/libbsp/i386/i386ex/startup/linkcmds b/c/src/lib/libbsp/i386/i386ex/startup/linkcmds index 946de8e6e6..a4a4cc6794 100644 --- a/c/src/lib/libbsp/i386/i386ex/startup/linkcmds +++ b/c/src/lib/libbsp/i386/i386ex/startup/linkcmds @@ -41,6 +41,10 @@ SECTIONS _ram_data_offset = 0x0; _ram_data_location = _ram_data_segment * 16 + _ram_data_offset; +RamBase = DEFINED(RamBase) ? RamBase : _ram_data_location; +RamSize = DEFINED(RamSize) ? RamSize : 1M; +HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0; + .init : { _init = .; *(.init) } = 0x9090 .fini : { _fini = .; *(.fini) } = 0x9090 .data : @@ -74,6 +78,9 @@ SECTIONS } _bss_size = _ebss - _bss_start ; + . = ALIGN(0x10); + WorkAreaBase = .; + /************************************************************************************** * General variables: * -- cgit v1.2.3