diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-09-16 19:03:48 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-09-16 19:03:48 +0000 |
commit | 18aa55eebbc7dabbcb9a87ded4ed25c22dd790b0 (patch) | |
tree | 0055595794c4ef785c7ef2fff3682f99b0f55e2d /c/src/lib/libbsp/m68k/uC5282 | |
parent | 2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-18aa55eebbc7dabbcb9a87ded4ed25c22dd790b0.tar.bz2 |
2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac, startup/bspstart.c, startup/linkcmds: Add
use of bsp_get_work_area() in its own file and rely on BSP Framework
to perform more initialization. Remove unnecessary includes of
rtems/libio.h and rtems/libcsupport.h.
Diffstat (limited to 'c/src/lib/libbsp/m68k/uC5282')
-rw-r--r-- | c/src/lib/libbsp/m68k/uC5282/ChangeLog | 7 | ||||
-rw-r--r-- | c/src/lib/libbsp/m68k/uC5282/Makefile.am | 7 | ||||
-rw-r--r-- | c/src/lib/libbsp/m68k/uC5282/configure.ac | 2 | ||||
-rw-r--r-- | c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c | 49 | ||||
-rw-r--r-- | c/src/lib/libbsp/m68k/uC5282/startup/linkcmds | 8 |
5 files changed, 29 insertions, 44 deletions
diff --git a/c/src/lib/libbsp/m68k/uC5282/ChangeLog b/c/src/lib/libbsp/m68k/uC5282/ChangeLog index 42f44e01da..bd85fd9d00 100644 --- a/c/src/lib/libbsp/m68k/uC5282/ChangeLog +++ b/c/src/lib/libbsp/m68k/uC5282/ChangeLog @@ -1,3 +1,10 @@ +2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com> + + * Makefile.am, configure.ac, startup/bspstart.c, startup/linkcmds: Add + use of bsp_get_work_area() in its own file and rely on BSP Framework + to perform more initialization. Remove unnecessary includes of + rtems/libio.h and rtems/libcsupport.h. + 2008-09-10 Joel Sherrill <joel.sherrill@oarcorp.com> * include/bsp.h: Review of all bsp_cleanup() implementations. In this diff --git a/c/src/lib/libbsp/m68k/uC5282/Makefile.am b/c/src/lib/libbsp/m68k/uC5282/Makefile.am index 1611e21834..e3355bb96b 100644 --- a/c/src/lib/libbsp/m68k/uC5282/Makefile.am +++ b/c/src/lib/libbsp/m68k/uC5282/Makefile.am @@ -27,9 +27,10 @@ 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 \ - startup/bspstart.c ../../shared/bootcard.c ../../shared/sbrk.c \ - ../../m68k/shared/setvec.c ../../shared/gnatinstallhandler.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 console_SOURCES = console/console.c timer_SOURCES = timer/timer.c diff --git a/c/src/lib/libbsp/m68k/uC5282/configure.ac b/c/src/lib/libbsp/m68k/uC5282/configure.ac index b445ec2693..35d3f7eed1 100644 --- a/c/src/lib/libbsp/m68k/uC5282/configure.ac +++ b/c/src/lib/libbsp/m68k/uC5282/configure.ac @@ -19,6 +19,8 @@ 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 diff --git a/c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c b/c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c index ebbda06d6e..289e4b836f 100644 --- a/c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c +++ b/c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c @@ -19,11 +19,7 @@ */ #include <bsp.h> -#include <rtems/libio.h> #include <rtems/error.h> -#include <rtems/libcsupport.h> -#include <stdio.h> -#include <string.h> #include <errno.h> /* @@ -33,6 +29,12 @@ #define VME_TWO_BASE 0x31000000 /* + * Linker Script Defined Variables + */ +extern char _RamSize[]; +extern char _RamBase[]; + +/* * CPU-space access * The NOP after writing the CACR is there to address the following issue as * described in "Device Errata MCF5282DE", Rev. 1.7, 09/2004: @@ -171,12 +173,6 @@ void _CPU_cache_invalidate_1_data_line(const void *addr) } /* - * Use the shared implementations of the following routines - */ -void bsp_libc_init( void *, uint32_t, int ); -void bsp_pretasking_hook(void); /* m68k version */ - -/* * The Arcturus boot ROM prints exception information improperly * so use this default exception handler instead. This one also * prints a call backtrace @@ -185,7 +181,6 @@ static void handler(int pc) { int level; static volatile int reent; - extern char _RamSize[]; rtems_interrupt_disable(level); if (reent++) bsp_reset(0); @@ -227,34 +222,13 @@ 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 @@ -301,9 +275,10 @@ void bsp_start( void ) MCF5282_GPIO_PJPAR |= 0x06; } +extern char _CPUClockSpeed[]; + uint32_t bsp_get_CPU_clock_speed(void) { - extern char _CPUClockSpeed[]; return( (uint32_t)_CPUClockSpeed); } diff --git a/c/src/lib/libbsp/m68k/uC5282/startup/linkcmds b/c/src/lib/libbsp/m68k/uC5282/startup/linkcmds index 43cc352ccd..6c82f6d91a 100644 --- a/c/src/lib/libbsp/m68k/uC5282/startup/linkcmds +++ b/c/src/lib/libbsp/m68k/uC5282/startup/linkcmds @@ -17,10 +17,10 @@ /* * Declare some locations and sizes. */ -_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0 ; -_RamSize = DEFINED(_RamSize) ? _RamSize : 16M ; -_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0 ; -_FlashBase = DEFINED(_FlashBase) ? _FlashBase : 0x10000000 ; +_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0; +_RamSize = DEFINED(_RamSize) ? _RamSize : 16M; +_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0; +_FlashBase = DEFINED(_FlashBase) ? _FlashBase : 0x10000000; _FlashSize = DEFINED(_FlashSize) ? _FlashSize : 4M ; /* |