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

* Makefile.am, configure.ac: Split out bsp_cleanup() and
	bsp_get_work_area() into their own files.
	* startup/bspclean.c, startup/bspgetworkarea.c,
	startup/bspstart.c: New files.
	* startup/start.c: Removed.
This commit is contained in:
Joel Sherrill
2008-09-14 20:04:36 +00:00
parent cdeed30434
commit 12d853d54b
6 changed files with 81 additions and 50 deletions

View File

@@ -1,3 +1,11 @@
2008-09-14 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac: Split out bsp_cleanup() and
bsp_get_work_area() into their own files.
* startup/bspclean.c, startup/bspgetworkarea.c,
startup/bspstart.c: New files.
* startup/start.c: Removed.
2008-09-10 Joel Sherrill <joel.sherrill@oarcorp.com> 2008-09-10 Joel Sherrill <joel.sherrill@oarcorp.com>
* include/bsp.h: Review of all bsp_cleanup() implementations. In this * include/bsp.h: Review of all bsp_cleanup() implementations. In this

View File

@@ -32,8 +32,9 @@ include_rtems_HEADERS = fb/fb.h touchscreen/touchscreen.h sound/sound.h
noinst_PROGRAMS += startup.rel noinst_PROGRAMS += startup.rel
startup_rel_SOURCES = ../../shared/bsplibc.c ../../shared/bsppost.c \ startup_rel_SOURCES = ../../shared/bsplibc.c ../../shared/bsppost.c \
startup/start.c ../../shared/bsppredriverhook.c \ startup/bspstart.c startup/bspclean.c startup/bspgetworkarea.c \
../../shared/bsppretaskinghook.c ../../shared/bootcard.c ../../shared/bsppredriverhook.c ../../shared/bsppretaskinghook.c \
../../shared/bootcard.c
startup_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include startup_rel_CPPFLAGS = $(AM_CPPFLAGS) -DARM9 -I$(srcdir)/libnds/include
startup_rel_LDFLAGS = $(RTEMS_RELLDFLAGS) startup_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)

View File

@@ -25,6 +25,8 @@ RTEMS_CONFIG_BUILD_SUBDIRS(tools)
## $srcdir/mk_libnds.sh $srcdir ## $srcdir/mk_libnds.sh $srcdir
RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION
# Explicitly list all Makefiles here # Explicitly list all Makefiles here
AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([Makefile])
AC_OUTPUT AC_OUTPUT

View File

@@ -0,0 +1,31 @@
/*
* This is a dummy bsp_cleanup routine.
*
* COPYRIGHT (c) 1989-1999.
* 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>
#include <nds.h>
/*
* reset the platform using bios call.
*/
void bsp_reset (void)
{
swiSoftReset ();
}
void bsp_cleanup( void )
{
printk ("[!] executive ended, rebooting\n");
bsp_reset ();
}

View File

@@ -0,0 +1,36 @@
/*
* 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>
#include <stdint.h>
/*
* These are from the linker script.
*/
extern void * _end;
extern void *__ewram_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 = &_end;
*work_area_size = (void *)&__ewram_end - (void *)&_end;
*heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
*heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
}

View File

@@ -20,36 +20,11 @@
*/ */
extern unsigned int arm_cpu_mode; extern unsigned int arm_cpu_mode;
/*
* These are from the linker script.
*/
extern uint8_t _end;
extern uint8_t __ewram_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 = &_end;
*work_area_size = (void *)&__ewram_end - (void *)&_end;
*heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
*heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
}
/* /*
* start the platform. * start the platform.
*/ */
void void bsp_start (void)
bsp_start (void)
{ {
/* initialize irq management */ /* initialize irq management */
BSP_rtems_irq_mngt_init (); BSP_rtems_irq_mngt_init ();
@@ -88,28 +63,6 @@ bss_reset (void)
memset (&__bss_start, 0, (uint32_t) & __bss_end - (uint32_t) & __bss_start); memset (&__bss_start, 0, (uint32_t) & __bss_end - (uint32_t) & __bss_start);
} }
/*
* reset the platform using bios call.
*/
void
bsp_reset (void)
{
swiSoftReset ();
}
/*
* clean up platform before reset.
*/
void
bsp_cleanup (void)
{
printk ("[!] executive ended, rebooting\n");
bsp_reset ();
}
/* /*
* A few symbols needed by libnds but not used. * A few symbols needed by libnds but not used.
*/ */