source: rtems/c/src/lib/libbsp/powerpc/gen5200/startup/bspgetworkarea.c @ 379a4761

4.104.11
Last change on this file since 379a4761 was 379a4761, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 15, 2008 at 7:25:42 PM

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

  • Makefile.am, startup/bspstart.c: Use shared bsp_get_work_area() in its own file and rely on BSP Framework to perform more initialization.
  • startup/bspgetworkarea.c: New file.
  • Property mode set to 100644
File size: 1008 bytes
RevLine 
[379a4761]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
13#if defined(HAS_UBOOT)
14  extern bd_t *uboot_bdinfo_ptr;
15#endif
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 */
22
23void bsp_get_work_area(
24  void   **work_area_start,
25  size_t  *work_area_size,
26  void   **heap_start,
27  size_t  *heap_size
28)
29{
30  #ifdef HAS_UBOOT
31    char *ram_end = (char *) uboot_bdinfo_ptr->bi_memstart +
32                                 uboot_bdinfo_ptr->bi_memsize;
33  #else /* HAS_UBOOT */
34    char *ram_end = bsp_ram_end;
35  #endif /* HAS_UBOOT */
36
37  *work_area_start = bsp_work_area_start;
38  *work_area_size = ram_end - bsp_work_area_start;
39  *heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
40  *heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
41}
42
Note: See TracBrowser for help on using the repository browser.