summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-18 18:01:48 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-18 18:01:48 +0000
commit76ba5f222ad66dda7f811a65216e8d3a4cd073e6 (patch)
tree2a7c722058313ff7d4a4d3ec67700e215909e5b0
parent2008-09-18 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-76ba5f222ad66dda7f811a65216e8d3a4cd073e6.tar.bz2
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.
-rw-r--r--c/src/lib/libbsp/i386/i386ex/ChangeLog5
-rw-r--r--c/src/lib/libbsp/i386/i386ex/Makefile.am3
-rw-r--r--c/src/lib/libbsp/i386/i386ex/configure.ac2
-rw-r--r--c/src/lib/libbsp/i386/i386ex/startup/bspstart.c60
-rw-r--r--c/src/lib/libbsp/i386/i386ex/startup/linkcmds7
5 files changed, 17 insertions, 60 deletions
diff --git a/c/src/lib/libbsp/i386/i386ex/ChangeLog b/c/src/lib/libbsp/i386/i386ex/ChangeLog
index 0f0af857a6..c8ffdaafae 100644
--- a/c/src/lib/libbsp/i386/i386ex/ChangeLog
+++ b/c/src/lib/libbsp/i386/i386ex/ChangeLog
@@ -1,5 +1,10 @@
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.
2008-09-18 Joel Sherrill <joel.sherrill@oarcorp.com>
diff --git a/c/src/lib/libbsp/i386/i386ex/Makefile.am b/c/src/lib/libbsp/i386/i386ex/Makefile.am
index c4c6329328..56db21bb8f 100644
--- a/c/src/lib/libbsp/i386/i386ex/Makefile.am
+++ b/c/src/lib/libbsp/i386/i386ex/Makefile.am
@@ -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 \
diff --git a/c/src/lib/libbsp/i386/i386ex/configure.ac b/c/src/lib/libbsp/i386/i386ex/configure.ac
index 483887b152..87932a6c06 100644
--- a/c/src/lib/libbsp/i386/i386ex/configure.ac
+++ b/c/src/lib/libbsp/i386/i386ex/configure.ac
@@ -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
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 <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");
-}
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:
*