From b67a822d6f9455e794d0965de200ed6919649d5f Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 15 May 2008 15:54:11 +0000 Subject: 2008-05-15 Joel Sherrill * startup/bspstart.c, startup/bspstart.c.nocache: Add capability for bootcard.c BSP Initialization Framework to ask the BSP where it has memory for the RTEMS Workspace and C Program Heap. These collectively are referred to as work area. If the BSP supports this, then it does not have to include code to split the available memory between the two areas. This reduces the amount of code in the BSP specific bspstart.c file. Additionally, the shared framework can initialize the C Library, call rtems_debug_enable(), and dirty the work area memory. Until most/all BSPs support this new capability, if the BSP supports this, it should call RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION from its configure.ac. When the transition is complete, this autoconf macro can be removed. --- c/src/lib/libbsp/powerpc/mbx8xx/ChangeLog | 15 +++++++++++++++ c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c | 10 +++------- .../lib/libbsp/powerpc/mbx8xx/startup/bspstart.c.nocache | 10 +++------- 3 files changed, 21 insertions(+), 14 deletions(-) (limited to 'c/src/lib/libbsp/powerpc/mbx8xx') diff --git a/c/src/lib/libbsp/powerpc/mbx8xx/ChangeLog b/c/src/lib/libbsp/powerpc/mbx8xx/ChangeLog index 5948b9ea7a..f6bca896f1 100644 --- a/c/src/lib/libbsp/powerpc/mbx8xx/ChangeLog +++ b/c/src/lib/libbsp/powerpc/mbx8xx/ChangeLog @@ -1,3 +1,18 @@ +2008-05-15 Joel Sherrill + + * startup/bspstart.c, startup/bspstart.c.nocache: Add capability for + bootcard.c BSP Initialization Framework to ask the BSP where it has + memory for the RTEMS Workspace and C Program Heap. These collectively + are referred to as work area. If the BSP supports this, then it does + not have to include code to split the available memory between the + two areas. This reduces the amount of code in the BSP specific + bspstart.c file. Additionally, the shared framework can initialize + the C Library, call rtems_debug_enable(), and dirty the work area + memory. Until most/all BSPs support this new capability, if the BSP + supports this, it should call + RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION from its configure.ac. When + the transition is complete, this autoconf macro can be removed. + 2008-05-15 Thomas Doerfler * irq/irq.c: diff --git a/c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c b/c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c index 72a2ac8ad2..a0b9aaa84c 100644 --- a/c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c @@ -94,14 +94,10 @@ void bsp_pretasking_hook(void) * the kernel and the application can be linked and burned into ROM * independently of each other. */ - extern unsigned char _HeapStart; - extern unsigned char _HeapEnd; + extern unsigned char _HeapStart; + extern unsigned char _HeapEnd; - bsp_libc_init( &_HeapStart, &_HeapEnd - &_HeapStart, 0 ); - -#ifdef RTEMS_DEBUG - rtems_debug_enable( RTEMS_DEBUG_ALL_MASK ); -#endif + bsp_libc_init( &_HeapStart, &_HeapEnd - &_HeapStart, 0 ); } /* diff --git a/c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c.nocache b/c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c.nocache index 1776fa219f..a943e9e4d0 100644 --- a/c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c.nocache +++ b/c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c.nocache @@ -71,14 +71,10 @@ void bsp_pretasking_hook(void) * the kernel and the application can be linked and burned into ROM * independently of each other. */ - extern unsigned char _HeapStart; - extern unsigned char _HeapEnd; + extern unsigned char _HeapStart; + extern unsigned char _HeapEnd; - bsp_libc_init( &_HeapStart, &_HeapEnd - &_HeapStart, 0 ); - -#ifdef RTEMS_DEBUG - rtems_debug_enable( RTEMS_DEBUG_ALL_MASK ); -#endif + bsp_libc_init( &_HeapStart, &_HeapEnd - &_HeapStart, 0 ); } -- cgit v1.2.3