source: rtems/c/src/lib/libbsp/sparc/shared/bspgetworkarea.c @ 12838f75

4.104.115
Last change on this file since 12838f75 was c7932ded, checked in by Joel Sherrill <joel.sherrill@…>, on 10/02/08 at 19:12:54

2008-10-02 Joel Sherrill <joel.sherrill@…>

  • shared/bspgetworkarea.c: Change size_t to ssize_t on bsp_get_work_area(). On 16-bit architectures, size_t can be 16-bits which would limit the work area to 64K.
  • Property mode set to 100644
File size: 1.1 KB
Line 
1/*
2 *  This set of routines are the BSP specific initialization
3 *  support routines.
4 *
5 *  COPYRIGHT (c) 1989-2008.
6 *  On-Line Applications Research Corporation (OAR).
7 *
8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *  http://www.rtems.com/license/LICENSE.
11 *
12 *  $Id$
13 */
14
15#include <bsp.h>
16#include <bsp/bootcard.h>
17
18/*
19 *  This method returns the base address and size of the area which
20 *  is to be allocated between the RTEMS Workspace and the C Program
21 *  Heap.
22 */
23void bsp_get_work_area(
24  void    **work_area_start,
25  ssize_t  *work_area_size,
26  void    **heap_start,
27  ssize_t  *heap_size
28)
29{
30  /* Tells us where to put the workspace in case remote debugger is present.  */
31  extern uint32_t rdb_start;
32  /* must be identical to STACK_SIZE in start.S */
33  #define STACK_SIZE (16 * 1024)
34
35  *work_area_start       = &end;
36  *work_area_size       = (void *)rdb_start - (void *)&end - STACK_SIZE;
37  *heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
38  *heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
39}
Note: See TracBrowser for help on using the repository browser.