source: rtems/c/src/lib/libbsp/m68k/idp/startup/bspstart.c @ 09b6a093

Last change on this file since 09b6a093 was 09b6a093, checked in by Joel Sherrill <joel.sherrill@…>, on 05/24/00 at 17:06:54

Significantly lowered the default memory requirements:

  • CONFIGURE_RTEMS_INIT_TASKS_TABLE was 10 now 0
  • CONFIGURE_POSIX_INIT_THREAD_TABLE was 10 now 0
  • CONFIGURE_ITRON_INIT_TASK_TABLE was 10 now 0
  • CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS was 20 now 3
  • added CONFIGURE_NUMBER_OF_TERMIOS_PORTS and defaulted to 1
  • added CONFIGURE_TERMIOS_DISABLED defaulted to "enabled"
  • miniIMFS is now the default

Added configuration error checks that:

+ Ensure > 0 tasks/threads are configured
+ Ensure at least one inititalization task/thread is defined

bsp.h now defines these so BSP specific requirements
are accounted for.

+ CONFIGURE_NUMBER_OF_TERMIOS_PORTS
+ CONFIGURE_INTERRUPT_STACK_MEMORY

console_reserve_resources and rtems_termios_reserve_resources
are no longer required and considered obsolete. Calls to
rtems_termios_reserve_resources have been eliminated although
the routine is still there and the body "if 0'ed".

We are very close to having NO reason to modify the
configuration tables in the BSP. Be warned that eventually
we would like to see the need for BSP_Configuration
eliminated!

  • Property mode set to 100644
File size: 2.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-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.OARcorp.com/rtems/license.html.
13 *
14 *  $Id$
15 */
16
17#include <bsp.h>
18#include <rtems/libio.h>
19 
20#include <libcsupport.h>
21 
22#include <string.h>
23 
24unsigned char *duart_base;
25extern struct duart_regs duart_info;
26
27#define DELAY 5000
28
29void led_putnum();
30
31/*
32 *  The original table from the application and our copy of it with
33 *  some changes.
34 */
35 
36extern rtems_configuration_table  Configuration;
37rtems_configuration_table         BSP_Configuration;
38
39rtems_cpu_table Cpu_table;
40 
41char *rtems_progname;
42
43/*
44 *  Use the shared implementations of the following routines
45 */
46 
47void bsp_postdriver_hook(void);
48void bsp_libc_init( void *, unsigned32, int );
49void bsp_pretasking_hook(void);               /* m68k version */
50
51/*
52 *  bsp_start
53 *
54 *  This routine does the bulk of the system initialization.
55 */
56
57void bsp_start( void )
58{
59  m68k_isr_entry *monitors_vector_table;
60  int             index;
61  extern void          *_WorkspaceBase;
62  extern void          *_RamSize;
63  extern unsigned long  _M68k_Ramsize;
64
65  _M68k_Ramsize = (unsigned long)&_RamSize;             /* RAM size set in linker script */
66
67  duart_base = (unsigned char *)DUART_ADDR;
68
69  /*
70   *  Set the VBR here to the monitor's default.
71   */
72
73  monitors_vector_table = (m68k_isr_entry *)0;
74   /* This is where you set vector base register = 0 */
75  m68k_set_vbr( monitors_vector_table );
76
77  /* The vector interrupt table for the 680x0 is in appendix B-2
78         of the M68000 Family Programmer's reference table */
79  for ( index=2 ; index<=255 ; index++ )
80    M68Kvec[ index ] = monitors_vector_table[ 32 ];
81
82
83  M68Kvec[  2 ] = monitors_vector_table[  2 ];   /* bus error vector */
84  M68Kvec[  4 ] = monitors_vector_table[  4 ];   /* breakpoints vector */
85  M68Kvec[  9 ] = monitors_vector_table[  9 ];   /* trace vector */
86
87  /*
88   *  Set the VBR here if you do not want to use the monitor's vector table.
89   */
90
91  m68k_set_vbr( &M68Kvec );
92
93  m68k_enable_caching();
94
95  /*
96   *  we only use a hook to get the C library initialized.
97   */
98 
99  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
100  Cpu_table.postdriver_hook = bsp_postdriver_hook;
101  Cpu_table.interrupt_vector_table = (m68k_isr_entry *) &M68Kvec;
102  Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
103
104  BSP_Configuration.work_space_start = (void *) &_WorkspaceBase;
105 
106/*  led_putnum('e'); * for debugging purposes only */
107
108  /* Clock_exit is done as an atexit() function */
109}
Note: See TracBrowser for help on using the repository browser.