source: rtems/c/src/lib/libbsp/mips/rbtx4925/startup/bspgetworkarea.c @ a444be6

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

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

  • Makefile.am, configure.ac, startup/bspstart.c: Create bsp_get_work_area() into its own file and use BSP Framework to perform more initialization.
  • startup/bspgetworkarea.c: New file.
  • Property mode set to 100644
File size: 854 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 *_RamBase;
14extern void *_RamSize;
15extern void *end;
16
17/*
18 *  This method returns the base address and size of the area which
19 *  is to be allocated between the RTEMS Workspace and the C Program
20 *  Heap.
21 */
22void bsp_get_work_area(
23  void   **work_area_start,
24  size_t  *work_area_size,
25  void   **heap_start,
26  size_t  *heap_size
27)
28{
29  uintptr_t size;
30
31  size = (uintptr_t)&_RamBase + (uintptr_t)&_RamSize - (uintptr_t)&end;
32
33  *work_area_start = (void *)&end;
34  *work_area_size  = size;
35  *heap_start      = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
36  *heap_size       = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
37}
38
Note: See TracBrowser for help on using the repository browser.