diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-08-09 16:48:00 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-10-25 14:54:06 +0200 |
commit | 47a3cd8f73780bad3eff5135f0eb58e8c98af91d (patch) | |
tree | 8acdfc6ebe5d596f9c6b974e6c460dc69e824e3c /c/src/lib/libbsp/powerpc/tqm8xx | |
parent | score: Append to free list in _Heap_Extend() (diff) | |
download | rtems-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/powerpc/tqm8xx')
-rw-r--r-- | c/src/lib/libbsp/powerpc/tqm8xx/startup/bspgetworkarea.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/c/src/lib/libbsp/powerpc/tqm8xx/startup/bspgetworkarea.c b/c/src/lib/libbsp/powerpc/tqm8xx/startup/bspgetworkarea.c index bd06b70fdd..d9521896f5 100644 --- a/c/src/lib/libbsp/powerpc/tqm8xx/startup/bspgetworkarea.c +++ b/c/src/lib/libbsp/powerpc/tqm8xx/startup/bspgetworkarea.c @@ -7,12 +7,13 @@ */ /* - * Copyright (c) 2008 - * Embedded Brains GmbH - * Obere Lagerstr. 30 - * D-82178 Puchheim - * Germany - * rtems@embedded-brains.de + * Copyright (c) 2008-2012 embedded brains GmbH. All rights reserved. + * + * embedded brains GmbH + * Obere Lagerstr. 30 + * 82178 Puchheim + * Germany + * <rtems@embedded-brains.de> * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at @@ -24,17 +25,11 @@ #include <bsp.h> #include <bsp/bootcard.h> -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) { char *ram_end = (char *) (TQM_BD_INFO.sdram_size - (uint32_t)TopRamReserved); + void *area_start = bsp_work_area_start; + uintptr_t area_size = (uintptr_t) ram_end - (uintptr_t) bsp_work_area_start; - *work_area_start = bsp_work_area_start; - *work_area_size = ram_end - bsp_work_area_start; - *heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA; - *heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT; + bsp_work_area_initialize_default( area_start, area_size ); } |