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

4.104.114.84.95
Last change on this file since d7aecdc was eba2e4f, checked in by Joel Sherrill <joel.sherrill@…>, on Nov 1, 2000 at 9:19:23 PM

2000-11-01 Joel Sherrill <joel@…>

  • startup/bspstart.c: assoc.h, error.h, libio_.h, libio.h, and libcsupport.h moved from libc to lib/include/rtems and now must be referenced as <rtems/XXX.h>. Header file order was cleaned up while doing this.
  • Property mode set to 100644
File size: 2.4 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.OARcorp.com/rtems/license.html.
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
36rtems_cpu_table Cpu_table;
37
38char *rtems_progname;
39
40/*      Initialize whatever libc we are using
41 *      called from postdriver hook
42 */
43void bsp_postdriver_hook(void);
44void bsp_libc_init( void *, unsigned32, int );
45void bsp_pretasking_hook(void);               /* m68k version */
46
47/*
48 *  bsp_start
49 *
50 *  This routine does the bulk of the system initialization.
51 */
52
53void bsp_start( void )
54{
55  extern void          *_WorkspaceBase;
56  extern void          *_RamSize;
57  extern unsigned long  _M68k_Ramsize;
58
59  _M68k_Ramsize = (unsigned long)&_RamSize;             /* RAM size set in linker script */
60
61  /*
62   *  Allocate the memory for the RTEMS Work Space.  This can come from
63   *  a variety of places: hard coded address, malloc'ed from outside
64   *  RTEMS world (e.g. simulator or primitive memory manager), or (as
65   *  typically done by stock BSPs) by subtracting the required amount
66   *  of work space from the last physical address on the CPU board.
67   */
68#if 0
69  Cpu_table.interrupt_vector_table = (mc68000_isr *) 0/*&M68Kvec*/;
70#endif
71
72  /*
73   *  Need to "allocate" the memory for the RTEMS Workspace and
74   *  tell the RTEMS configuration where it is.  This memory is
75   *  not malloc'ed.  It is just "pulled from the air".
76   */
77
78  BSP_Configuration.work_space_start = (void *)&_WorkspaceBase;
79
80  /*
81   *  initialize the CPU table for this BSP
82   */
83
84  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
85  Cpu_table.postdriver_hook = bsp_postdriver_hook;
86  Cpu_table.do_zero_of_workspace = TRUE;
87  Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
88}
Note: See TracBrowser for help on using the repository browser.