source: rtems/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspgetworkarea.c @ 12838f75

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

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

  • startup/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 * @file
3 *
4 * @ingroup mpc55xx
5 *
6 * @brief BSP Get Work Area of Memory.
7 */
8
9/*
10 * Copyright (c) 2008
11 * Embedded Brains GmbH
12 * Obere Lagerstr. 30
13 * D-82178 Puchheim
14 * Germany
15 * rtems@embedded-brains.de
16 *
17 * The license and distribution terms for this file may be found in the file
18 * LICENSE in this distribution or at http://www.rtems.com/license/LICENSE.
19 */
20
21#include <bsp.h>
22#include <bsp/bootcard.h>
23#include <libcpu/powerpc-utility.h>
24
25#define MPC55XX_INTERRUPT_STACK_SIZE 0x1000
26
27/* Symbols defined in linker command file */
28LINKER_SYMBOL(bsp_ram_start);
29LINKER_SYMBOL(bsp_ram_end);
30LINKER_SYMBOL(bsp_external_ram_start);
31LINKER_SYMBOL(bsp_external_ram_size);
32LINKER_SYMBOL(bsp_section_bss_end);
33
34void bsp_get_work_area(
35  void    **work_area_start,
36  ssize_t  *work_area_size,
37  void    **heap_start,
38  ssize_t  *heap_size
39)
40{
41  *work_area_start = bsp_section_bss_end;
42  *work_area_size = bsp_ram_end - 2 *
43        MPC55XX_INTERRUPT_STACK_SIZE - bsp_section_bss_end;
44  *heap_start = bsp_external_ram_start;
45  *heap_size = (ssize_t) bsp_external_ram_size;
46}
Note: See TracBrowser for help on using the repository browser.