mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
2008-09-14 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, startup/bspstart.c: Split out bsp_get_work_area() into its own file and use BSP Framework to perform more initialization. * startup/bspgetworkarea.c: New file.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2008-09-14 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* Makefile.am, startup/bspstart.c: Split out bsp_get_work_area() into
|
||||
its own file and use BSP Framework to perform more initialization.
|
||||
* startup/bspgetworkarea.c: New file.
|
||||
|
||||
2008-09-10 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* include/bsp.h: Review of all bsp_cleanup() implementations. In this
|
||||
|
||||
@@ -31,7 +31,7 @@ dist_project_lib_DATA += startup/linkcmds
|
||||
|
||||
startup_SOURCES = startup/bspclean.c ../../shared/bsplibc.c \
|
||||
../../shared/bsppredriverhook.c ../../shared/bsppost.c \
|
||||
../../shared/bsppretaskinghook.c \
|
||||
../../shared/bsppretaskinghook.c startup/bspgetworkarea.c \
|
||||
startup/bspstart.c ../../shared/bootcard.c ../../shared/sbrk.c \
|
||||
../../shared/gnatinstallhandler.c ../../shared/setvec.c
|
||||
clock_SOURCES = clock/clockdrv.c
|
||||
|
||||
34
c/src/lib/libbsp/mips/jmr3904/startup/bspgetworkarea.c
Normal file
34
c/src/lib/libbsp/mips/jmr3904/startup/bspgetworkarea.c
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <bsp.h>
|
||||
#include <bsp/bootcard.h>
|
||||
|
||||
extern int WorkspaceBase;
|
||||
extern int end;
|
||||
|
||||
/*
|
||||
* 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_get_work_area(
|
||||
void **work_area_start,
|
||||
size_t *work_area_size,
|
||||
void **heap_start,
|
||||
size_t *heap_size
|
||||
)
|
||||
{
|
||||
*work_area_start = &WorkspaceBase;
|
||||
*work_area_size = (void *)&end - (void *)&WorkspaceBase;
|
||||
*heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
|
||||
*heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
|
||||
}
|
||||
@@ -17,27 +17,6 @@
|
||||
#include <bsp.h>
|
||||
#include <bsp/bootcard.h>
|
||||
|
||||
/*
|
||||
* 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_get_work_area(
|
||||
void **work_area_start,
|
||||
size_t *work_area_size,
|
||||
void **heap_start,
|
||||
size_t *heap_size
|
||||
)
|
||||
{
|
||||
extern int WorkspaceBase;
|
||||
extern int end;
|
||||
|
||||
*work_area_start = &WorkspaceBase;
|
||||
*work_area_size = (void *)&end - (void *)&WorkspaceBase;
|
||||
*heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
|
||||
*heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
|
||||
}
|
||||
|
||||
/*
|
||||
* bsp_start
|
||||
*
|
||||
@@ -61,7 +40,8 @@ void clear_cache( void *address, size_t n )
|
||||
}
|
||||
|
||||
/* Structure filled in by get_mem_info. Only the size field is
|
||||
actually used (to clear bss), so the others aren't even filled in. */
|
||||
* actually used (to clear bss), so the others aren't even filled in.
|
||||
*/
|
||||
|
||||
struct s_mem
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user