source: rtems/c/src/lib/libbsp/m68k/gen68340/startup/bspstart.c @ d34d8692

4.104.114.95
Last change on this file since d34d8692 was d34d8692, checked in by Joel Sherrill <joel.sherrill@…>, on 12/04/07 at 22:22:26

2007-12-04 Joel Sherrill <joel.sherrill@…>

  • include/bsp.h, startup/bspstart.c: Move interrupt_stack_size field from CPU Table to Configuration Table. Eliminate CPU Table from all ports. Delete references to CPU Table in all forms.
  • Property mode set to 100644
File size: 2.0 KB
Line 
1/*  bsp_start()
2 *
3 *  This routine starts the application.  It includes application,
4 *  board, and monitor specific initialization and configuration.
5 *  The generic CPU dependent initialization has been performed
6 *  before this routine is invoked.
7 *
8 *  INPUT:  NONE
9 *
10 *  OUTPUT: NONE
11 *
12 *  COPYRIGHT (c) 1989-1999.
13 *  On-Line Applications Research Corporation (OAR).
14 *
15 *  The license and distribution terms for this file may be
16 *  found in the file LICENSE in this distribution or at
17 *  http://www.rtems.com/license/LICENSE.
18 *
19 *  $Id$
20 */
21
22#include <string.h>
23
24#include <bsp.h>
25#include <rtems/libio.h>
26#include <rtems/libcsupport.h>
27
28/*
29 *  The original table from the application and our copy of it with
30 *  some changes.
31 */
32
33extern rtems_configuration_table Configuration;
34rtems_configuration_table  BSP_Configuration;
35
36char *rtems_progname;
37
38/*      Initialize whatever libc we are using
39 *      called from postdriver hook
40 */
41void bsp_postdriver_hook(void);
42void bsp_libc_init( void *, uint32_t, int );
43void bsp_pretasking_hook(void);               /* m68k version */
44
45/*
46 *  bsp_start
47 *
48 *  This routine does the bulk of the system initialization.
49 */
50
51void bsp_start( void )
52{
53  extern void          *_WorkspaceBase;
54  extern void          *_RamSize;
55  extern unsigned long  _M68k_Ramsize;
56
57  /* RAM size set in linker script */
58  _M68k_Ramsize = (unsigned long)&_RamSize;
59
60  /*
61   *  Allocate the memory for the RTEMS Work Space.  This can come from
62   *  a variety of places: hard coded address, malloc'ed from outside
63   *  RTEMS world (e.g. simulator or primitive memory manager), or (as
64   *  typically done by stock BSPs) by subtracting the required amount
65   *  of work space from the last physical address on the CPU board.
66   */
67
68  /*
69   *  Need to "allocate" the memory for the RTEMS Workspace and
70   *  tell the RTEMS configuration where it is.  This memory is
71   *  not malloc'ed.  It is just "pulled from the air".
72   */
73
74  BSP_Configuration.work_space_start = (void *)&_WorkspaceBase;
75}
Note: See TracBrowser for help on using the repository browser.