summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/arm/gba
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2012-08-09 16:48:00 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2012-10-25 14:54:06 +0200
commit47a3cd8f73780bad3eff5135f0eb58e8c98af91d (patch)
tree8acdfc6ebe5d596f9c6b974e6c460dc69e824e3c /c/src/lib/libbsp/arm/gba
parentscore: Append to free list in _Heap_Extend() (diff)
downloadrtems-47a3cd8f73780bad3eff5135f0eb58e8c98af91d.tar.bz2
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.
Diffstat (limited to 'c/src/lib/libbsp/arm/gba')
-rw-r--r--c/src/lib/libbsp/arm/gba/startup/bspgetworkarea.c20
1 files changed, 5 insertions, 15 deletions
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 );
}