source: rtems/c/src/lib/libbsp/mips/jmr3904/startup/bspstart.c @ d4886a06

4.104.114.9
Last change on this file since d4886a06 was d4886a06, checked in by Thomas Doerfler <Thomas.Doerfler@…>, on Jul 24, 2008 at 2:52:55 PM

Changed bsp_get_workarea() to bsp_get_work_area() and
added support for an optional separate heap area.

  • Property mode set to 100644
File size: 1.8 KB
Line 
1/*
2 *  This routine starts the application.  It includes application,
3 *  board, and monitor specific initialization and configuration.
4 *  The generic CPU dependent initialization has been performed
5 *  before this routine is invoked.
6 *
7 *  COPYRIGHT (c) 1989-2008.
8 *  On-Line Applications Research Corporation (OAR).
9 *
10 *  The license and distribution terms for this file may be
11 *  found in the file LICENSE in this distribution or at
12 *  http://www.rtems.com/license/LICENSE.
13 *
14 *  $Id$
15 */
16
17#include <bsp.h>
18#include <bsp/bootcard.h>
19
20/*
21 *  This method returns the base address and size of the area which
22 *  is to be allocated between the RTEMS Workspace and the C Program
23 *  Heap.
24 */
25void bsp_get_work_area(
26  void   **work_area_start,
27  size_t  *work_area_size,
28  void   **heap_start,
29  size_t  *heap_size
30)
31{
32  extern int WorkspaceBase;
33  extern int end;
34
35  *work_area_start       = &WorkspaceBase;
36  *work_area_size       = (void *)&end - (void *)&WorkspaceBase;
37  *heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
38  *heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
39}
40
41/*
42 *  bsp_start
43 *
44 *  This routine does the bulk of the system initialization.
45 */
46
47void bsp_start( void )
48{
49  extern void mips_install_isr_entries(void);
50
51  mips_set_sr( 0xff00 );  /* all interrupts unmasked but globally off */
52                          /* depend on the IRC to take care of things */
53  mips_install_isr_entries();
54}
55
56/*
57 *  Required routine by some gcc run-times.
58 */
59void clear_cache( void *address, size_t n )
60{
61}
62
63/* Structure filled in by get_mem_info.  Only the size field is
64   actually used (to clear bss), so the others aren't even filled in.  */
65
66struct s_mem
67{
68  unsigned int size;
69  unsigned int icsize;
70  unsigned int dcsize;
71};
72
73void
74get_mem_info (mem)
75     struct s_mem *mem;
76{
77  mem->size = 0x1000000;        /* XXX figure out something here */
78}
Note: See TracBrowser for help on using the repository browser.