source: rtems/c/src/lib/libbsp/c4x/c4xsim/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/*
2 *  This set of routines 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 any of these are invoked.
6 *
7 *  COPYRIGHT (c) 1989-1999.
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 <string.h>
18
19#include <bsp.h>
20#include <rtems/libio.h>
21#include <rtems/libcsupport.h>
22
23/*
24 *  The original table from the application and our copy of it with
25 *  some changes.
26 */
27
28extern rtems_configuration_table  Configuration;
29rtems_configuration_table         BSP_Configuration;
30
31/*
32 *  Use the shared implementations of the following routines
33 */
34
35void bsp_postdriver_hook(void);
36void bsp_libc_init( void *, uint32_t, int );
37extern void bsp_spurious_initialize();
38
39/*
40 *  bsp_pretasking_hook
41 *
42 *  BSP pretasking hook.  Called just before drivers are initialized.
43 *  Used to setup libc and install any BSP extensions.
44 */
45
46void bsp_pretasking_hook(void)
47{
48  extern void *_HeapStart;
49  extern uint32_t         _HeapSize;
50
51  bsp_libc_init(&_HeapStart, (unsigned int) &_HeapSize, 0);
52
53#ifdef RTEMS_DEBUG
54  rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
55#endif
56
57  bsp_spurious_initialize();
58}
59
60/*
61 *  bsp_start
62 *
63 *  This routine does the bulk of the system initialization.
64 */
65
66#include <rtems/bspIo.h>
67
68BSP_output_char_function_type           BSP_output_char;
69BSP_polling_getchar_function_type       BSP_poll_char;
70extern void C4X_BSP_output_char(char c);
71
72void bsp_start( void )
73{
74  extern void     *_WorkspaceBase;
75  extern uint32_t _WorkspaceMax;
76
77  BSP_Configuration.work_space_start = (void *)&_WorkspaceBase;
78  /* XXX check to see if satisfying small memory model */
79
80  if ( BSP_Configuration.work_space_size > (int) &_WorkspaceMax )
81    rtems_fatal_error_occurred( 0x43218765 );
82
83  BSP_output_char = C4X_BSP_output_char;
84  BSP_poll_char = (BSP_polling_getchar_function_type) NULL;
85}
Note: See TracBrowser for help on using the repository browser.