summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/m68k/mvme167/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/mvme167/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/mvme167/startup')
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/startup/Makefile.in4
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/startup/bspstart.c44
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/startup/elflinkcmds17
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/startup/linkcmds27
4 files changed, 17 insertions, 75 deletions
diff --git a/c/src/lib/libbsp/m68k/mvme167/startup/Makefile.in b/c/src/lib/libbsp/m68k/mvme167/startup/Makefile.in
index cfbb545914..db71259ef4 100644
--- a/c/src/lib/libbsp/m68k/mvme167/startup/Makefile.in
+++ b/c/src/lib/libbsp/m68k/mvme167/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 page_table sbrk \
- setvec gnatinstallhandler
+C_PIECES = bspclean bsplibc bsppost bspstart bootcard m68kpretaskinghook \
+ main page_table sbrk setvec gnatinstallhandler
C_FILES = $(C_PIECES:%=%.c)
C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
diff --git a/c/src/lib/libbsp/m68k/mvme167/startup/bspstart.c b/c/src/lib/libbsp/m68k/mvme167/startup/bspstart.c
index 559463e4a5..f443a48153 100644
--- a/c/src/lib/libbsp/m68k/mvme167/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/mvme167/startup/bspstart.c
@@ -48,48 +48,7 @@ rtems_cpu_table Cpu_table;
*/
void bsp_postdriver_hook( void );
void bsp_libc_init( void *, unsigned32, int );
-
-
-/*
- * bsp_pretasking_hook
- *
- * Called when RTEMS initialization is complete but before interrupts and
- * tasking are enabled. Used to setup libc and install any BSP extensions.
- *
- * Must not use libc (to do io) from here, since drivers are not yet
- * initialized.
- *
- * Installed in the rtems_cpu_table defined in
- * rtems/c/src/exec/score/cpu/m68k/cpu.h in main() below. Called from
- * rtems_initialize_executive() defined in rtems/c/src/exec/sapi/src/init.c
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * Return values: NONE
- */
-void bsp_pretasking_hook( void )
-{
- /*
- * These are assigned addresses in the linkcmds file for the BSP. This
- * approach is better than having these defined as manifest constants and
- * compiled into the kernel, but it is still not ideal when dealing with
- * multiprocessor configuration in which each board as a different memory
- * map. A better place for defining these symbols might be the makefiles.
- * Consideration should also be given to developing an approach in which
- * the kernel and the application can be linked and burned into ROM
- * independently of each other.
- */
- extern unsigned char _HeapStart, _HeapEnd;
-
- bsp_libc_init(&_HeapStart, &_HeapEnd - &_HeapStart, 0);
-
-#ifdef RTEMS_DEBUG
- rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
-#endif
-}
-
+void bsp_pretasking_hook(void); /* m68k version */
/*
* bsp_start()
@@ -122,6 +81,7 @@ void bsp_start( void )
{
extern void *_WorkspaceBase;
extern m68k_isr_entry M68Kvec[];
+ extern void *_WorkspaceBase;
void M68KFPSPInstallExceptionHandlers (void);
diff --git a/c/src/lib/libbsp/m68k/mvme167/startup/elflinkcmds b/c/src/lib/libbsp/m68k/mvme167/startup/elflinkcmds
index 927d5b932a..3aa5a9d279 100644
--- a/c/src/lib/libbsp/m68k/mvme167/startup/elflinkcmds
+++ b/c/src/lib/libbsp/m68k/mvme167/startup/elflinkcmds
@@ -21,20 +21,11 @@ OUTPUT_FORMAT("elf32-m68k")
OUTPUT_ARCH(m68k)
ENTRY(_start)
-/* Base address and size of RAM on the MVME167 */
-
-RAM_SIZE = 4M;
-RAM_START = 0x00800000;
-RAM_END = RAM_START + RAM_SIZE;
-
/*
* Declare some sizes.
- * XXX: The assignment of ". += XyzSize;" fails in older gld's if the
- * number used there is not constant. If this happens to you, edit
- * the lines marked XXX below to use a constant value.
*/
-HeapSize = DEFINED(HeapSize) ? HeapSize : 0x10000;
-StackSize = DEFINED(StackSize) ? StackSize : 0x1000;
+_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
+_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
MEMORY
{
@@ -170,9 +161,9 @@ SECTIONS
. += HeapSize; /* XXX -- Old gld can't handle this */
_HeapEnd = .;
_StackStart = .;
- . += StackSize; /* XXX -- Old gld can't handle this */
+ . += _StackSize; /* XXX -- Old gld can't handle this */
/* . += 0x10000; */ /* HeapSize for old gld */
- /* . += 0x1000; */ /* StackSize for old gld */
+ /* . += 0x1000; */ /* _StackSize for old gld */
. = ALIGN (16);
_StackEnd = .;
stack_init = .;
diff --git a/c/src/lib/libbsp/m68k/mvme167/startup/linkcmds b/c/src/lib/libbsp/m68k/mvme167/startup/linkcmds
index 8ddee103c5..9cbf889dd7 100644
--- a/c/src/lib/libbsp/m68k/mvme167/startup/linkcmds
+++ b/c/src/lib/libbsp/m68k/mvme167/startup/linkcmds
@@ -21,17 +21,13 @@
OUTPUT_ARCH(m68k)
ENTRY(_start)
-/* Base address and size of RAM on the MVME167 */
-
-RAM_SIZE = 4M;
-RAM_START = 0x00800000;
-RAM_END = RAM_START + RAM_SIZE;
-
/*
* Declare some sizes.
*/
-HeapSize = DEFINED(HeapSize) ? HeapSize : 0x10000;
-StackSize = DEFINED(StackSize) ? StackSize : 0x1000;
+_RamBase = 0x00800000;
+_RamSize = DEFINED(_RamSize) ? _RamSize : 4M;
+_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
+_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
MEMORY
{
@@ -132,22 +128,17 @@ SECTIONS
PROVIDE (_copy_end = .);
} >ram
.bss : {
- PROVIDE (_bss_start = .);
- 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
}