2008-09-18 Joel Sherrill <joel.sherrill@oarcorp.com>

* Makefile.am, configure.ac, startup/bspstart.c, startup/linkcmds: Use
	top level shared bsp_get_work_area() implementation.
This commit is contained in:
Joel Sherrill
2008-09-18 18:01:48 +00:00
parent bcb9f8c330
commit 76ba5f222a
5 changed files with 17 additions and 60 deletions
+5
View File
@@ -1,3 +1,8 @@
2008-09-18 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac, startup/bspstart.c, startup/linkcmds: Use
top level shared bsp_get_work_area() implementation.
2008-09-18 Joel Sherrill <joel.sherrill@oarcorp.com>
* include/bsp.h: Remove unnecessary variables and EXTERN magic.
+2 -1
View File
@@ -33,7 +33,8 @@ dist_project_lib_DATA += startup/linkcmds
include_HEADERS += ../../i386/shared/comm/uart.h
startup_SOURCES = ../../shared/bspclean.c ../../shared/bsplibc.c \
../../shared/bsppredriverhook.c \
../../shared/bsppredriverhook.c ../../shared/bsppretaskinghook.c \
../../shared/bspgetworkarea.c ../../shared/bspclean.c \
../../shared/bsppost.c startup/bspstart.c ../../shared/bootcard.c \
../../shared/sbrk.c ../../i386/shared/irq/idt.c \
../../i386/shared/irq/irq.c ../../i386/shared/irq/irq_init.c \
@@ -24,6 +24,8 @@ AM_CONDITIONAL(RTEMS_GAS_CODE16,test "$RTEMS_GAS_CODE16" = "yes")
AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")
RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION
# Explicitly list all Makefiles here
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
@@ -20,78 +20,20 @@
* $Id$
*/
void bsp_clean_up(void);
#include <bsp.h>
#include <bsp/irq.h>
/*
* 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");
}
@@ -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:
*