summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-19 21:04:15 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-19 21:04:15 +0000
commit1a3db54805702c0efac91af825aebebac9b62439 (patch)
treeb7eb3a2cd69d2fe48ce2f7cd6175e1c5ec74b3eb /c/src/lib/libbsp
parent2008-09-19 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-1a3db54805702c0efac91af825aebebac9b62439.tar.bz2
2008-09-19 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, include/bsp.h, startup/bspstart.c: Use PowerPC level shared bsp_get_work_area() implementation. * startup/bspgetworkarea.c: Removed.
Diffstat (limited to 'c/src/lib/libbsp')
-rw-r--r--c/src/lib/libbsp/powerpc/ep1a/ChangeLog6
-rw-r--r--c/src/lib/libbsp/powerpc/ep1a/Makefile.am2
-rw-r--r--c/src/lib/libbsp/powerpc/ep1a/include/bsp.h5
-rw-r--r--c/src/lib/libbsp/powerpc/ep1a/startup/bspgetworkarea.c44
-rw-r--r--c/src/lib/libbsp/powerpc/ep1a/startup/bspstart.c17
5 files changed, 11 insertions, 63 deletions
diff --git a/c/src/lib/libbsp/powerpc/ep1a/ChangeLog b/c/src/lib/libbsp/powerpc/ep1a/ChangeLog
index ae52020dd0..910ce2b226 100644
--- a/c/src/lib/libbsp/powerpc/ep1a/ChangeLog
+++ b/c/src/lib/libbsp/powerpc/ep1a/ChangeLog
@@ -1,3 +1,9 @@
+2008-09-19 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * Makefile.am, include/bsp.h, startup/bspstart.c: Use PowerPC level
+ shared bsp_get_work_area() implementation.
+ * startup/bspgetworkarea.c: Removed.
+
2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* startup/bspstart.c: Remove unnecessary includes of
diff --git a/c/src/lib/libbsp/powerpc/ep1a/Makefile.am b/c/src/lib/libbsp/powerpc/ep1a/Makefile.am
index 28f2060899..d46c203d7e 100644
--- a/c/src/lib/libbsp/powerpc/ep1a/Makefile.am
+++ b/c/src/lib/libbsp/powerpc/ep1a/Makefile.am
@@ -25,7 +25,7 @@ dist_project_lib_DATA += startup/linkcmds
startup_SOURCES = startup/bspstart.c ../../shared/bootcard.c \
../../shared/bsppost.c ../../shared/bsppredriverhook.c \
- startup/bspgetworkarea.c ../../shared/bsplibc.c \
+ ../../powerpc/shared/startup/bspgetworkarea.c ../../shared/bsplibc.c \
../../powerpc/shared/startup/sbrk.c \
../../shared/bspclean.c ../../shared/gnatinstallhandler.c \
../../powerpc/shared/startup/pgtbl_setup.c \
diff --git a/c/src/lib/libbsp/powerpc/ep1a/include/bsp.h b/c/src/lib/libbsp/powerpc/ep1a/include/bsp.h
index 6f24bac137..cdb2658b26 100644
--- a/c/src/lib/libbsp/powerpc/ep1a/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/ep1a/include/bsp.h
@@ -202,11 +202,6 @@ void BSP_FLASH_set_page( uint8_t page );
#define BSP_FLASH_DISABLE_WRITES(_area) BSP_FLASH_Disable_writes( _area )
#define BSP_FLASH_SET_PAGE(_page) BSP_FLASH_set_page( _page )
-/*
- * system init stack
- */
-#define BSP_INIT_STACK_SIZE 0x1000
-
/* clear hostbridge errors
*
* enableMCP: whether to enable MCP checkstop / machine check interrupts
diff --git a/c/src/lib/libbsp/powerpc/ep1a/startup/bspgetworkarea.c b/c/src/lib/libbsp/powerpc/ep1a/startup/bspgetworkarea.c
deleted file mode 100644
index a30866ebf3..0000000000
--- a/c/src/lib/libbsp/powerpc/ep1a/startup/bspgetworkarea.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#include <bsp.h>
-#include <bsp/bootcard.h>
-#include <stdint.h>
-
-extern void *RAM_END;
-extern void *__rtems_end;
-extern uint32_t _bsp_sbrk_init(uint32_t, uint32_t*);
-
-unsigned int BSP_mem_size = (unsigned int)&RAM_END;
-
-/*
- * This method returns the base address and size of the area which
- * is to be allocated between the RTEMS Workspace and the C Program
- * Heap.
- */
-void bsp_get_work_area(
- void **work_area_start,
- size_t *work_area_size,
- void **heap_start,
- size_t *heap_size
-)
-{
- uintptr_t size;
- uintptr_t reserve;
-
- reserve = (uintptr_t)BSP_INIT_STACK_SIZE;
- reserve += rtems_configuration_get_interrupt_stack_size();
- size = (uintptr_t)&RAM_END - (uintptr_t)&__rtems_end + reserve;
-
- *work_area_start = (void *)(&__rtems_end + reserve);
- *work_area_size = size;
- _bsp_sbrk_init( *work_area_start, work_area_size );
- *heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
- *heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
-}
-
diff --git a/c/src/lib/libbsp/powerpc/ep1a/startup/bspstart.c b/c/src/lib/libbsp/powerpc/ep1a/startup/bspstart.c
index 6dfec6ad34..c6ea668c1b 100644
--- a/c/src/lib/libbsp/powerpc/ep1a/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/ep1a/startup/bspstart.c
@@ -46,6 +46,9 @@ SPR_RW(SPRG1)
uint8_t LightIdx = 0;
+extern int RAM_END;
+unsigned int BSP_mem_size = (unsigned int)&RAM_END;
+
void BSP_Increment_Light(void){
uint8_t data;
data = *GENERAL_REGISTER1;
@@ -272,7 +275,6 @@ void Read_ep1a_config_registers( ppc_cpu_id_t myCpu ) {
void bsp_start( void )
{
- unsigned char *stack;
uint32_t intrStackStart;
uint32_t intrStackSize;
ppc_cpu_id_t myCpu;
@@ -309,20 +311,9 @@ ShowBATS();
#endif
/*
- * the initial stack has aready been set to this value in start.S
- * so there is no need to set it in r1 again... It is just for info
- * so that It can be printed without accessing R1.
- */
- stack = ((unsigned char*) __rtems_end) + BSP_INIT_STACK_SIZE
- - PPC_MINIMUM_STACK_FRAME_SIZE;
-
- /* tag the bottom (T. Straumann 6/36/2001 <strauman@slac.stanford.edu>) */
- *((uint32_t *)stack) = 0;
-
- /*
* Initialize the interrupt related settings.
*/
- intrStackStart = (uint32_t) __rtems_end + BSP_INIT_STACK_SIZE;
+ intrStackStart = (uint32_t) __rtems_end;
intrStackSize = rtems_configuration_get_interrupt_stack_size();
/*