diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-01-13 20:45:07 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-01-13 20:45:07 +0000 |
commit | b8c98837559029b807fc80b54d170b2c3184df1f (patch) | |
tree | 8ebc7a418213c792f6f6bc0c46daff05d5b56c12 /c/src/lib/libbsp/m68k/mvme147s | |
parent | POSIX message queues now include complete functionality including (diff) | |
download | rtems-b8c98837559029b807fc80b54d170b2c3184df1f.tar.bz2 |
All m68k BSPs now build with new ELF style linkcmds.
Diffstat (limited to 'c/src/lib/libbsp/m68k/mvme147s')
-rw-r--r-- | c/src/lib/libbsp/m68k/mvme147s/startup/Makefile.in | 4 | ||||
-rw-r--r-- | c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c | 36 | ||||
-rw-r--r-- | c/src/lib/libbsp/m68k/mvme147s/startup/linkcmds | 22 |
3 files changed, 14 insertions, 48 deletions
diff --git a/c/src/lib/libbsp/m68k/mvme147s/startup/Makefile.in b/c/src/lib/libbsp/m68k/mvme147s/startup/Makefile.in index 2f19a31294..536bb97884 100644 --- a/c/src/lib/libbsp/m68k/mvme147s/startup/Makefile.in +++ b/c/src/lib/libbsp/m68k/mvme147s/startup/Makefile.in @@ -17,8 +17,8 @@ VPATH = \ 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/mvme147s/startup/bspstart.c b/c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c index 4f63bc60d9..aa1b6c61ca 100644 --- a/c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c +++ b/c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c @@ -43,38 +43,9 @@ char *rtems_progname; void bsp_postdriver_hook(void); void bsp_libc_init( void *, unsigned32, int ); +void bsp_pretasking_hook(void); /* m68k version */ /* - * 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 -} - -/* * bsp_start * * This routine does the bulk of the system initialization. @@ -85,6 +56,7 @@ void bsp_start( void ) m68k_isr_entry *monitors_vector_table; int index; rtems_unsigned8 node_number; + extern void *_WorkspaceBase; monitors_vector_table = (m68k_isr_entry *)0; /* 147Bug Vectors are at 0 */ m68k_set_vbr( monitors_vector_table ); @@ -174,7 +146,5 @@ void bsp_start( void ) Cpu_table.interrupt_vector_table = (m68k_isr_entry *) &M68Kvec; Cpu_table.interrupt_stack_size = 4096; - BSP_Configuration.work_space_start = (void *) - (RAM_END - BSP_Configuration.work_space_size); - + BSP_Configuration.work_space_start = (void *) &_WorkspaceBase; } diff --git a/c/src/lib/libbsp/m68k/mvme147s/startup/linkcmds b/c/src/lib/libbsp/m68k/mvme147s/startup/linkcmds index 773781321a..e752b5b33e 100644 --- a/c/src/lib/libbsp/m68k/mvme147s/startup/linkcmds +++ b/c/src/lib/libbsp/m68k/mvme147s/startup/linkcmds @@ -19,8 +19,10 @@ /* * Declare some sizes. */ -HeapSize = DEFINED(HeapSize) ? HeapSize : 0x10000; -StackSize = DEFINED(StackSize) ? StackSize : 0x1000; +_RamBase = 0x0; +_RamSize = DEFINED(_RamSize) ? _RamSize : 4M; +_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000; +_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000; MEMORY { @@ -115,23 +117,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 } |