forked from Imagelibrary/rtems
2008-09-19 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, include/bsp.h, startup/bspstart.c, startup/linkcmds: Use PowerPC level shared bsp_get_work_area() implementation. * startup/bspgetworkarea.c: Removed.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2008-09-19 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* Makefile.am, include/bsp.h, startup/bspstart.c, startup/linkcmds: Use
|
||||
PowerPC level shared bsp_get_work_area() implementation.
|
||||
* startup/bspgetworkarea.c: Removed.
|
||||
|
||||
2008-09-18 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* startup/bspstart.c: Remove unused variable.
|
||||
|
||||
@@ -26,9 +26,9 @@ include_HEADERS += include/coverhd.h include/gen2.h
|
||||
dist_project_lib_DATA += startup/linkcmds
|
||||
|
||||
startup_SOURCES = startup/bspclean.c ../../shared/bsplibc.c \
|
||||
startup/bspstart.c startup/bspgetworkarea.c ../../shared/bootcard.c \
|
||||
startup/Hwr_init.c ../../powerpc/shared/startup/sbrk.c \
|
||||
startup/genpvec.c ../../shared/gnatinstallhandler.c \
|
||||
startup/bspstart.c ../../powerpc/shared/startup/bspgetworkarea.c \
|
||||
../../powerpc/shared/startup/sbrk.c ../../shared/bootcard.c \
|
||||
startup/Hwr_init.c startup/genpvec.c ../../shared/gnatinstallhandler.c \
|
||||
../../powerpc/shared/showbats.c \
|
||||
../../shared/bsppretaskinghook.c
|
||||
|
||||
|
||||
@@ -93,6 +93,11 @@ extern int CPU_PPC_CLICKS_PER_MS;
|
||||
*/
|
||||
#define BSP_INIT_STACK_SIZE 0x1000
|
||||
|
||||
/*
|
||||
* Total RAM available
|
||||
*/
|
||||
extern unsigned int BSP_mem_size;
|
||||
|
||||
/* functions */
|
||||
|
||||
/*
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -28,6 +28,12 @@
|
||||
*/
|
||||
unsigned int BSP_heap_start;
|
||||
|
||||
/*
|
||||
* Total RAM available and associated linker symbol
|
||||
*/
|
||||
unsigned int BSP_mem_size;
|
||||
extern char RamSize[];
|
||||
|
||||
/*
|
||||
* PCI Bus Frequency
|
||||
*/
|
||||
@@ -266,7 +272,9 @@ void bsp_start( void )
|
||||
*/
|
||||
intrStackStart = (uint32_t) __rtems_end + BSP_INIT_STACK_SIZE;
|
||||
intrStackSize = rtems_configuration_get_interrupt_stack_size();
|
||||
|
||||
BSP_heap_start = intrStackStart + intrStackSize;
|
||||
BSP_mem_size = (uintptr_t) RamSize;
|
||||
|
||||
/*
|
||||
* Initialize default raw exception handlers.
|
||||
|
||||
@@ -12,6 +12,9 @@ ENTRY(_start)
|
||||
|
||||
PROVIDE(CPU_PPC_CLICKS_PER_MS = 16500);
|
||||
|
||||
RamBase = DEFINED(RamBase) ? RamBase : 0x0;
|
||||
RamSize = DEFINED(RamSize) ? RamSize : 31M;
|
||||
|
||||
MEMORY
|
||||
{
|
||||
VECTORS : ORIGIN = 0, LENGTH = 64K
|
||||
|
||||
Reference in New Issue
Block a user