source: rtems/c/src/lib/libbsp/arm/gba/startup/bspgetworkarea.c @ b9cb6cdf

4.104.115
Last change on this file since b9cb6cdf was b9cb6cdf, checked in by Joel Sherrill <joel.sherrill@…>, on 09/12/08 at 21:47:01

2008-09-12 Joel Sherrill <joel.sherrill@…>

  • Makefile.am, configure.ac, startup/bspstart.c: Now support bsp_get_work_area() and used shared implementation of it and bsp_pretasking_hook. Ticker runs.
  • startup/bspgetworkarea.c: New file.
  • Property mode set to 100644
File size: 784 bytes
Line 
1/*
2 *  The license and distribution terms for this file may be
3 *  found in the file LICENSE in this distribution or at
4 *  http://www.rtems.com/license/LICENSE.
5 *
6 *  $Id$
7 */
8
9#include <bsp.h>
10#include <bsp/bootcard.h>
11#include <stdint.h>
12
13extern  void _end;
14extern  void __heap_limit;
15
16/*
17 *  This method returns the base address and size of the area which
18 *  is to be allocated between the RTEMS Workspace and the C Program
19 *  Heap.
20 */
21void bsp_get_work_area(
22  void   **work_area_start,
23  size_t  *work_area_size,
24  void   **heap_start,
25  size_t  *heap_size
26)
27{
28  *work_area_start = (void *)&_end;
29  *work_area_size  = (uintptr_t)&__heap_limit - (uintptr_t)&_end;
30  *heap_start      = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
31  *heap_size       = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
32}
33
Note: See TracBrowser for help on using the repository browser.