Use shared version of bootstrap to set up workspace.

This commit is contained in:
Eric Norum
2008-05-16 21:55:13 +00:00
parent d9aca5f537
commit 60f4b6e98b
5 changed files with 14 additions and 27 deletions

View File

@@ -1,3 +1,8 @@
2008-05-16 Eric Norum <norume@aps.anl.gov>
* Makefile.am, configure.ac, startup/bspstart.c, startup/linkcmds: Use
shared version of bootstrap to set up workspace.
2008-05-14 Joel Sherrill <joel.sherrill@OARcorp.com>
* Makefile.am: Rework to avoid .rel files.

View File

@@ -27,7 +27,9 @@ dist_project_lib_DATA += startup/linkcmds
startup_SOURCES = startup/bspclean.c ../../shared/bsplibc.c \
../../shared/bsppost.c ../../shared/bsppredriverhook.c \
../../m68k/shared/m68kpretaskinghook.c startup/init5282.c \
../../shared/bsppretaskinghook.c \
../../m68k/shared/m68kbspgetworkarea.c \
startup/init5282.c \
startup/bspstart.c ../../shared/bootcard.c ../../shared/sbrk.c \
../../m68k/shared/setvec.c ../../shared/gnatinstallhandler.c
clock_SOURCES = clock/clock.c

View File

@@ -16,9 +16,10 @@ RTEMS_CANONICALIZE_TOOLS
RTEMS_PROG_CCAS
RTEMS_CHECK_NETWORKING
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

View File

@@ -227,34 +227,14 @@ static void handler(int pc)
void bsp_start( void )
{
int i;
extern char _WorkspaceBase[];
extern char _RamBase[], _RamSize[];
extern unsigned long _M68k_Ramsize;
_M68k_Ramsize = (unsigned long)_RamSize; /* RAM size set in linker script */
/*
* Allocate the memory for the RTEMS Work Space. This can come from
* a variety of places: hard coded address, malloc'ed from outside
* RTEMS world (e.g. simulator or primitive memory manager), or (as
* typically done by stock BSPs) by subtracting the required amount
* of work space from the last physical address on the CPU board.
* Set up default exception handler
*/
/*
* Set up default exception handler
*/
for (i = 2 ; i < 256 ; i++)
if (i != (32+2)) /* Catch all but bootrom system calls */
*((void (**)(int))(i * 4)) = handler;
/*
* Need to "allocate" the memory for the RTEMS Workspace and
* tell the RTEMS configuration where it is. This memory is
* not malloc'ed. It is just "pulled from the air".
*/
Configuration.work_space_start = (void *)_WorkspaceBase;
for (i = 2 ; i < 256 ; i++)
if (i != (32+2)) /* Catch all but bootrom system calls */
*((void (**)(int))(i * 4)) = handler;
/*
* Invalidate the cache and disable it

View File

@@ -166,7 +166,6 @@ SECTIONS
. = ALIGN (16);
PROVIDE (end = .);
_clear_end = .;
_WorkspaceBase = .;
} >ram
/* Stabs debugging sections. */