summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/m68k/gen68302/startup
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-01-13 20:45:07 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-01-13 20:45:07 +0000
commitb8c98837559029b807fc80b54d170b2c3184df1f (patch)
tree8ebc7a418213c792f6f6bc0c46daff05d5b56c12 /c/src/lib/libbsp/m68k/gen68302/startup
parentPOSIX message queues now include complete functionality including (diff)
downloadrtems-b8c98837559029b807fc80b54d170b2c3184df1f.tar.bz2
All m68k BSPs now build with new ELF style linkcmds.
Diffstat (limited to 'c/src/lib/libbsp/m68k/gen68302/startup')
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/startup/Makefile.in4
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c36
-rw-r--r--c/src/lib/libbsp/m68k/gen68302/startup/linkcmds22
3 files changed, 15 insertions, 47 deletions
diff --git a/c/src/lib/libbsp/m68k/gen68302/startup/Makefile.in b/c/src/lib/libbsp/m68k/gen68302/startup/Makefile.in
index f4ce788577..a4ed3ac474 100644
--- a/c/src/lib/libbsp/m68k/gen68302/startup/Makefile.in
+++ b/c/src/lib/libbsp/m68k/gen68302/startup/Makefile.in
@@ -16,8 +16,8 @@ VPATH = @srcdir@:@srcdir@/../../shared:@srcdir@/../../../shared
PGM = ${ARCH}/startup.rel
# C source names, if any, go here -- minus the .c
-C_PIECES = bspclean bsplibc bsppost bspstart bootcard main sbrk setvec \
- gnatinstallhandler
+C_PIECES = bspclean bsplibc bsppost bspstart bootcard m68kpretaskinghook \
+ main sbrk setvec gnatinstallhandler
C_FILES = $(C_PIECES:%=%.c)
C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
diff --git a/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c b/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c
index ac7666d1bd..a33ef2bbf8 100644
--- a/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c
@@ -39,37 +39,7 @@ char *rtems_progname;
void bsp_postdriver_hook(void);
void bsp_libc_init( void *, unsigned32, int );
-
-/*
- * Function: bsp_pretasking_hook
- * Created: 95/03/10
- *
- * Description:
- * BSP pretasking hook. Called just before drivers are initialized.
- * Used to setup libc and install any BSP extensions.
- *
- * NOTES:
- * Must not use libc (to do io) from here, since drivers are
- * not yet initialized.
- *
- */
-
-void bsp_pretasking_hook(void)
-{
- extern int end;
- rtems_unsigned32 heap_start;
-
- heap_start = (rtems_unsigned32) &end;
- if (heap_start & (CPU_ALIGNMENT-1))
- heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
-
- bsp_libc_init((void *) heap_start, 64 * 1024, 0);
-
-
-#ifdef RTEMS_DEBUG
- rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
-#endif
-}
+void bsp_pretasking_hook(void); /* m68k version */
/*
* bsp_start
@@ -79,6 +49,7 @@ void bsp_pretasking_hook(void)
void bsp_start( void )
{
+ extern void *_WorkspaceBase;
/*
* Allocate the memory for the RTEMS Work Space. This can come from
@@ -97,8 +68,7 @@ void bsp_start( void )
* not malloc'ed. It is just "pulled from the air".
*/
- BSP_Configuration.work_space_start = (void *)
- (RAM_END - BSP_Configuration.work_space_size);
+ BSP_Configuration.work_space_start = (void *) &_WorkspaceBase;
/*
* initialize the CPU table for this BSP
diff --git a/c/src/lib/libbsp/m68k/gen68302/startup/linkcmds b/c/src/lib/libbsp/m68k/gen68302/startup/linkcmds
index 2fd0352112..99d0f27cac 100644
--- a/c/src/lib/libbsp/m68k/gen68302/startup/linkcmds
+++ b/c/src/lib/libbsp/m68k/gen68302/startup/linkcmds
@@ -17,14 +17,17 @@ MEMORY
ram : org = 0x0000, l = 16M
}
+_RamBase = 0;
+_RamSize = 16M;
+
m302 = 0xf7f000;
_VBR = 0x000000; /* location of the VBR table (in RAM) */
/*
* Declare some sizes.
*/
-HeapSize = DEFINED(HeapSize) ? HeapSize : 0x10000;
-StackSize = DEFINED(StackSize) ? StackSize : 0x1000;
+_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
+_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
SECTIONS
{
@@ -114,22 +117,17 @@ SECTIONS
PROVIDE (_copy_end = .);
} >ram
.bss : {
- PROVIDE (_clear_start = .);
+ _clear_start = .;
*(.bss)
*(COMMON)
. = ALIGN (16);
PROVIDE (end = .);
- . += StackSize;
- PROVIDE (_stack_init = .);
-
+ . += _StackSize;
. = ALIGN (16);
- PROVIDE (_HeapStart = .);
- . += HeapSize;
- PROVIDE (_HeapEnd = .);
-
- PROVIDE (_clear_end = .);
+ _stack_init = .;
+ _clear_end = .;
- PROVIDE (_WorkspaceBase = .);
+ _WorkspaceBase = .;
} >ram
}