summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/tqm8xx/startup/bspgetworkarea.c
blob: d9521896f5ba34edd478ed3861bbb1376c593dd9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/**
 * @file
 *
 * @ingroup tqm8xx
 *
 * @brief Source for BSP Get Work Area Memory
 */

/*
 * Copyright (c) 2008-2012 embedded brains GmbH.  All rights reserved.
 *
 *  embedded brains GmbH
 *  Obere Lagerstr. 30
 *  82178 Puchheim
 *  Germany
 *  <rtems@embedded-brains.de>
 *
 * The license and distribution terms for this file may be
 * found in the file LICENSE in this distribution or at
 * http://www.rtems.com/license/LICENSE.
 */

#include <libcpu/powerpc-utility.h>

#include <bsp.h>
#include <bsp/bootcard.h>

void bsp_work_area_initialize(void)
{
  char *ram_end = (char *) (TQM_BD_INFO.sdram_size - (uint32_t)TopRamReserved);
  void *area_start = bsp_work_area_start;
  uintptr_t area_size = (uintptr_t) ram_end - (uintptr_t) bsp_work_area_start;

  bsp_work_area_initialize_default( area_start, area_size );
}