diff options
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libbsp/mips/jmr3904/ChangeLog | 14 | ||||
-rw-r--r-- | c/src/lib/libbsp/mips/jmr3904/configure.ac | 2 | ||||
-rw-r--r-- | c/src/lib/libbsp/mips/jmr3904/startup/bspstart.c | 60 |
3 files changed, 33 insertions, 43 deletions
diff --git a/c/src/lib/libbsp/mips/jmr3904/ChangeLog b/c/src/lib/libbsp/mips/jmr3904/ChangeLog index 142cab595a..d41d6fbb7b 100644 --- a/c/src/lib/libbsp/mips/jmr3904/ChangeLog +++ b/c/src/lib/libbsp/mips/jmr3904/ChangeLog @@ -1,3 +1,17 @@ +2008-05-15 Joel Sherrill <joel.sherrill@OARcorp.com> + + * configure.ac, startup/bspstart.c: Add capability for bootcard.c BSP + Initialization Framework to ask the BSP where it has memory for the + RTEMS Workspace and C Program Heap. These collectively are referred + to as work area. If the BSP supports this, then it does not have to + include code to split the available memory between the two areas. + This reduces the amount of code in the BSP specific bspstart.c file. + Additionally, the shared framework can initialize the C Library, call + rtems_debug_enable(), and dirty the work area memory. Until most/all + BSPs support this new capability, if the BSP supports this, it should + call RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION from its configure.ac. + When the transition is complete, this autoconf macro can be removed. + 2008-05-14 Joel Sherrill <joel.sherrill@OARcorp.com> * Makefile.am: Rework to avoid .rel files. diff --git a/c/src/lib/libbsp/mips/jmr3904/configure.ac b/c/src/lib/libbsp/mips/jmr3904/configure.ac index f040a7588a..8f39438da7 100644 --- a/c/src/lib/libbsp/mips/jmr3904/configure.ac +++ b/c/src/lib/libbsp/mips/jmr3904/configure.ac @@ -17,6 +17,8 @@ RTEMS_PROG_CCAS RTEMS_CONFIG_BUILD_SUBDIRS(tools) +RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION + # Explicitly list all Makefiles here AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff --git a/c/src/lib/libbsp/mips/jmr3904/startup/bspstart.c b/c/src/lib/libbsp/mips/jmr3904/startup/bspstart.c index e0c87c420e..e654182785 100644 --- a/c/src/lib/libbsp/mips/jmr3904/startup/bspstart.c +++ b/c/src/lib/libbsp/mips/jmr3904/startup/bspstart.c @@ -4,7 +4,7 @@ * The generic CPU dependent initialization has been performed * before this routine is invoked. * - * COPYRIGHT (c) 1989-2000. + * COPYRIGHT (c) 1989-2008. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -14,45 +14,25 @@ * $Id$ */ -#include <string.h> - #include <bsp.h> -#include <rtems/libio.h> -#include <rtems/libcsupport.h> /* - * Use the shared implementations of the following routines + * This method returns the base address and size of the area which + * is to be allocated between the RTEMS Workspace and the C Program + * Heap. */ - -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) +void bsp_get_workarea( + void **workarea_base, + size_t *workarea_size, + size_t *requested_heap_size +) { - extern int HeapBase; - extern int HeapSize; - void *heapStart = &HeapBase; - unsigned long heapSize = (unsigned long)&HeapSize; - - bsp_libc_init(heapStart, (uint32_t) heapSize, 0); - -#ifdef RTEMS_DEBUG - rtems_debug_enable( RTEMS_DEBUG_ALL_MASK ); -#endif + extern int WorkspaceBase; + extern int end; + *workarea_base = &WorkspaceBase; + *workarea_size = (void *)&end - (void *)&WorkspaceBase; + *requested_heap_size = 0; } /* @@ -63,22 +43,16 @@ void bsp_pretasking_hook(void) void bsp_start( void ) { - extern int WorkspaceBase; - extern void _sys_exit(int); extern void mips_install_isr_entries(void); - /* HACK -- tied to value linkcmds */ - if ( rtems_configuration_get_work_space_size() >(4096*1024) ) - _sys_exit( 1 ); - - Configuration.work_space_start = (void *) &WorkspaceBase; - mips_set_sr( 0xff00 ); /* all interrupts unmasked but globally off */ /* depend on the IRC to take care of things */ mips_install_isr_entries(); } -/* XXX */ +/* + * Required routine by some gcc run-times. + */ void clear_cache( void *address, size_t n ) { } |