source: rtems/c/src/lib/libbsp/m68k/mvme147/startup/bspclean.c @ 08311cc3

4.104.114.84.95
Last change on this file since 08311cc3 was 08311cc3, checked in by Joel Sherrill <joel.sherrill@…>, on 11/17/99 at 17:51:34

Updated copyright notice.

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