Files
rtems/c/src/lib/libbsp/powerpc/tqm8xx/startup/bspgetworkarea.c
Sebastian Huber 47a3cd8f73 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.
2012-10-25 14:54:06 +02:00

36 lines
824 B
C

/**
* @file
*
* @ingroup tqm8xx
*
* @brief Source for BSP Get Work Area Memory
*/
/*
* 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
* http://www.rtems.com/license/LICENSE.
*/
#include <libcpu/powerpc-utility.h>
#include <bsp.h>
#include <bsp/bootcard.h>
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;
bsp_work_area_initialize_default( area_start, area_size );
}