From 47a3cd8f73780bad3eff5135f0eb58e8c98af91d Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 9 Aug 2012 16:48:00 +0200 Subject: score: Work area initialization API change The work areas (RTEMS work space and C program heap) will be initialized now in a separate step and are no longer part of rtems_initialize_data_structures(). Initialization is performed with tables of Heap_Area entries. This allows usage of scattered memory areas present on various small scale micro-controllers. The sbrk() support API changes also. The bsp_sbrk_init() must now deal with a minimum size for the first memory chunk to take the configured work space size into account. --- c/src/lib/libbsp/arm/gba/startup/bspgetworkarea.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'c/src/lib/libbsp/arm/gba') diff --git a/c/src/lib/libbsp/arm/gba/startup/bspgetworkarea.c b/c/src/lib/libbsp/arm/gba/startup/bspgetworkarea.c index abce92f13b..d1c06b14f7 100644 --- a/c/src/lib/libbsp/arm/gba/startup/bspgetworkarea.c +++ b/c/src/lib/libbsp/arm/gba/startup/bspgetworkarea.c @@ -11,21 +11,11 @@ extern void _end; extern void __heap_limit; -/* - * 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, - uintptr_t *work_area_size, - void **heap_start, - uintptr_t *heap_size -) +void bsp_work_area_initialize(void) { - *work_area_start = (void *)&_end; - *work_area_size = (uintptr_t)&__heap_limit - (uintptr_t)&_end; - *heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA; - *heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT; + void *area_start = (void *)&_end; + uintptr_t area_size = (uintptr_t)&__heap_limit - (uintptr_t)&_end; + + bsp_work_area_initialize_default( area_start, area_size ); } -- cgit v1.2.3