source: rtems/c/src/lib/libbsp/m68k/mvme147/startup/bspclean.c @ 60b791ad

4.104.114.84.95
Last change on this file since 60b791ad was 60b791ad, checked in by Joel Sherrill <joel.sherrill@…>, on 02/17/98 at 23:46:28

updated copyright to 1998

  • Property mode set to 100644
File size: 1.2 KB
Line 
1/*
2 *  This routine returns control to 147Bug.
3 *
4 *  COPYRIGHT (c) 1989-1998.
5 *  On-Line Applications Research Corporation (OAR).
6 *  Copyright assigned to U.S. Government, 1994.
7 *
8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *  http://www.OARcorp.com/rtems/license.html.
11 *
12 *  MVME147 port for TNI - Telecom Bretagne
13 *  by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr)
14 *  May 1996
15 *
16 *  $Id$
17 */
18
19#include <rtems.h>
20#include <bsp.h>
21#include <clockdrv.h>
22
23void bsp_return_to_monitor_trap()
24{
25  extern void start( void  );
26
27  register volatile void *start_addr;
28
29  m68k_set_vbr( 0 );                /* restore 147Bug vectors */
30  asm volatile( "trap   #15"  );    /* trap to 147Bug */
31  asm volatile( ".short 0x63" );    /* return to 147Bug (.RETURN) */
32                                    /* restart program */
33  start_addr = start;
34
35  asm volatile ( "jmp %0@" : "=a" (start_addr) : "0" (start_addr) );
36}
37
38void bsp_cleanup( void )
39{
40   pcc->timer1_int_control = 0; /* Disable Timer 1 */
41   pcc->timer2_int_control = 0; /* Disable Timer 2 */
42
43   M68Kvec[ 45 ] = bsp_return_to_monitor_trap;   /* install handler */
44   asm volatile( "trap #13" );  /* insures SUPV mode */
45}
Note: See TracBrowser for help on using the repository browser.