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

4.104.115
Last change on this file since d374492 was eee78e5, checked in by Joel Sherrill <joel.sherrill@…>, on 05/08/09 at 13:24:09

2009-05-08 Joel Sherrill <joel.sherrill@…>

  • startup/bspgetworkarea.c: Switch from ssize_t to uintptr_t for bsp_get_work_area() since the work area is larger than a single allocatable object.
  • 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  uintptr_t   *work_area_size,
37  void      **heap_start,
38  uintptr_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 = (uintptr_t) bsp_external_ram_size;
46}
Note: See TracBrowser for help on using the repository browser.