summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorEric Norum <WENorum@lbl.gov>2008-05-19 19:07:10 +0000
committerEric Norum <WENorum@lbl.gov>2008-05-19 19:07:10 +0000
commitb5b9e75f7da818601b870b8c6aad68456823a795 (patch)
tree9948e1c92254a9e3aa46a9f193fef7d63e23beda /c
parentUse shared version of bootstrap to set up workspace. (diff)
downloadrtems-b5b9e75f7da818601b870b8c6aad68456823a795.tar.bz2
Back out changes from 2008-05-16 -- they don't seem to work.
Diffstat (limited to 'c')
-rw-r--r--c/src/lib/libbsp/m68k/uC5282/ChangeLog5
-rw-r--r--c/src/lib/libbsp/m68k/uC5282/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/uC5282/configure.ac3
-rw-r--r--c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c28
-rw-r--r--c/src/lib/libbsp/m68k/uC5282/startup/linkcmds1
5 files changed, 32 insertions, 9 deletions
diff --git a/c/src/lib/libbsp/m68k/uC5282/ChangeLog b/c/src/lib/libbsp/m68k/uC5282/ChangeLog
index b441e17e43..0298f44c1c 100644
--- a/c/src/lib/libbsp/m68k/uC5282/ChangeLog
+++ b/c/src/lib/libbsp/m68k/uC5282/ChangeLog
@@ -1,3 +1,8 @@
+2008-05-19 Eric Norum <norume@aps.anl.gov>
+
+ * Makefile.am, configure.ac, startup/bspstart.c, startup/linkcmds: Back
+ out changes from 2008-05-16 -- they don't seem to work.
+
2008-05-16 Eric Norum <norume@aps.anl.gov>
* Makefile.am, configure.ac, startup/bspstart.c, startup/linkcmds: Use
diff --git a/c/src/lib/libbsp/m68k/uC5282/Makefile.am b/c/src/lib/libbsp/m68k/uC5282/Makefile.am
index 2b752a53f6..1611e21834 100644
--- a/c/src/lib/libbsp/m68k/uC5282/Makefile.am
+++ b/c/src/lib/libbsp/m68k/uC5282/Makefile.am
@@ -27,9 +27,7 @@ dist_project_lib_DATA += startup/linkcmds
startup_SOURCES = startup/bspclean.c ../../shared/bsplibc.c \
../../shared/bsppost.c ../../shared/bsppredriverhook.c \
- ../../shared/bsppretaskinghook.c \
- ../../m68k/shared/m68kbspgetworkarea.c \
- startup/init5282.c \
+ ../../m68k/shared/m68kpretaskinghook.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
diff --git a/c/src/lib/libbsp/m68k/uC5282/configure.ac b/c/src/lib/libbsp/m68k/uC5282/configure.ac
index cbed4102c2..b445ec2693 100644
--- a/c/src/lib/libbsp/m68k/uC5282/configure.ac
+++ b/c/src/lib/libbsp/m68k/uC5282/configure.ac
@@ -16,9 +16,8 @@ RTEMS_CANONICALIZE_TOOLS
RTEMS_PROG_CCAS
RTEMS_CHECK_NETWORKING
-AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")
-RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION
+AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")
# Explicitly list all Makefiles here
AC_CONFIG_FILES([Makefile])
diff --git a/c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c b/c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c
index cc4ed30f67..ebbda06d6e 100644
--- a/c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c
@@ -227,14 +227,34 @@ 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
+ */
+ for (i = 2 ; i < 256 ; i++)
+ if (i != (32+2)) /* Catch all but bootrom system calls */
+ *((void (**)(int))(i * 4)) = handler;
/*
- * Set up default exception 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".
*/
- for (i = 2 ; i < 256 ; i++)
- if (i != (32+2)) /* Catch all but bootrom system calls */
- *((void (**)(int))(i * 4)) = handler;
+
+ Configuration.work_space_start = (void *)_WorkspaceBase;
/*
* Invalidate the cache and disable it
diff --git a/c/src/lib/libbsp/m68k/uC5282/startup/linkcmds b/c/src/lib/libbsp/m68k/uC5282/startup/linkcmds
index 5b097df50f..43cc352ccd 100644
--- a/c/src/lib/libbsp/m68k/uC5282/startup/linkcmds
+++ b/c/src/lib/libbsp/m68k/uC5282/startup/linkcmds
@@ -166,6 +166,7 @@ SECTIONS
. = ALIGN (16);
PROVIDE (end = .);
_clear_end = .;
+ _WorkspaceBase = .;
} >ram
/* Stabs debugging sections. */