source: rtems/c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c @ 12bd47e

4.104.114.95
Last change on this file since 12bd47e was 12bd47e, checked in by Joel Sherrill <joel.sherrill@…>, on 12/11/07 at 15:49:53

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

  • clock/ckinit.c, include/bsp.h, startup/bspstart.c: Eliminate copies of the Configuration Table. Use the RTEMS provided accessor macros to obtain configuration fields.
  • 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-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#include <rtems/zilog/z8036.h>
23
24/*
25 *  Use the shared implementations of the following routines
26 */
27
28void bsp_postdriver_hook(void);
29void bsp_libc_init( void *, uint32_t, int );
30void bsp_pretasking_hook(void);               /* m68k version */
31
32/*
33 *  bsp_start
34 *
35 *  This routine does the bulk of the system initialization.
36 */
37
38void bsp_start( void )
39{
40  m68k_isr_entry *monitors_vector_table;
41  int             index;
42  extern void          *_WorkspaceBase;
43  extern void          *_RamSize;
44  extern unsigned long  _M68k_Ramsize;
45
46  _M68k_Ramsize = (unsigned long)&_RamSize;
47
48  monitors_vector_table = (m68k_isr_entry *)0;   /* 135Bug Vectors are at 0 */
49  m68k_set_vbr( monitors_vector_table );
50
51  for ( index=2 ; index<=255 ; index++ )
52    M68Kvec[ index ] = monitors_vector_table[ 32 ];
53
54  M68Kvec[  2 ] = monitors_vector_table[  2 ];   /* bus error vector */
55  M68Kvec[  4 ] = monitors_vector_table[  4 ];   /* breakpoints vector */
56  M68Kvec[  9 ] = monitors_vector_table[  9 ];   /* trace vector */
57  M68Kvec[ 47 ] = monitors_vector_table[ 47 ];   /* system call vector */
58
59  m68k_set_vbr( &M68Kvec );
60
61  (*(uint8_t*)0xfffb0067) = 0x7f; /* make VME access round-robin */
62
63  rtems_cache_enable_instruction();
64
65  Configuration.work_space_start = (void *) &_WorkspaceBase;
66}
Note: See TracBrowser for help on using the repository browser.