From 28b6765d41615abb319d3f11128daae4d9bfcf83 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 15 Sep 2008 00:23:55 +0000 Subject: [PATCH] 2008-09-14 Joel Sherrill * Makefile.am, startup/bspstart.c: Use shared bsp_get_work_area() into its own file and use BSP Framework to perform more initialization. --- c/src/lib/libbsp/sparc/leon3/ChangeLog | 5 +++ c/src/lib/libbsp/sparc/leon3/Makefile.am | 4 +-- .../lib/libbsp/sparc/leon3/startup/bspstart.c | 32 ------------------- 3 files changed, 7 insertions(+), 34 deletions(-) diff --git a/c/src/lib/libbsp/sparc/leon3/ChangeLog b/c/src/lib/libbsp/sparc/leon3/ChangeLog index 95814dd3a1..b3ec57efec 100644 --- a/c/src/lib/libbsp/sparc/leon3/ChangeLog +++ b/c/src/lib/libbsp/sparc/leon3/ChangeLog @@ -1,3 +1,8 @@ +2008-09-14 Joel Sherrill + + * Makefile.am, startup/bspstart.c: Use shared bsp_get_work_area() into + its own file and use BSP Framework to perform more initialization. + 2008-09-10 Joel Sherrill * include/bsp.h: Review of all bsp_cleanup() implementations. In this diff --git a/c/src/lib/libbsp/sparc/leon3/Makefile.am b/c/src/lib/libbsp/sparc/leon3/Makefile.am index 3e74513d45..0a0c27876d 100644 --- a/c/src/lib/libbsp/sparc/leon3/Makefile.am +++ b/c/src/lib/libbsp/sparc/leon3/Makefile.am @@ -34,8 +34,8 @@ project_lib_DATA = start.$(OBJEXT) dist_project_lib_DATA += startup/linkcmds startup_SOURCES = ../../sparc/shared/bspclean.c ../../shared/bsplibc.c \ - ../../shared/bsppost.c startup/bspstart.c \ - ../../shared/bootcard.c ../../shared/sbrk.c startup/setvec.c \ + ../../shared/bsppost.c ../../shared/bootcard.c startup/bspstart.c \ + ../../sparc/shared/bspgetworkarea.c ../../shared/sbrk.c startup/setvec.c \ startup/spurious.c startup/ithread.S gnatsupp_SOURCES = gnatsupp/gnatsupp.c ../../sparc/shared/gnatcommon.c diff --git a/c/src/lib/libbsp/sparc/leon3/startup/bspstart.c b/c/src/lib/libbsp/sparc/leon3/startup/bspstart.c index dd3b3d486e..0f7a8ba977 100644 --- a/c/src/lib/libbsp/sparc/leon3/startup/bspstart.c +++ b/c/src/lib/libbsp/sparc/leon3/startup/bspstart.c @@ -19,20 +19,9 @@ */ -#include - #include -#include #include -/* must be identical to STACK_SIZE in start.S */ -#define STACK_SIZE 16 * 1024 - -/* - * Tells us where to put the workspace in case remote debugger is present. - */ -extern uint32_t rdb_start; - /* * Tells us if data cache snooping is available */ @@ -69,27 +58,6 @@ void bsp_pretasking_hook(void) bsp_spurious_initialize(); } -/* - * 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 -) -{ - /* Tells us where to put the workspace in case remote debugger is present. */ - extern uint32_t rdb_start; - - *work_area_start = &end; - *work_area_size = (void *)rdb_start - (void *)&end - STACK_SIZE; - *heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA; - *heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT; -} - /* * bsp_start *