source: rtems/c/src/lib/libbsp/m68k/mvme162/startup/bspclean.c @ ac7d5ef0

4.104.114.84.95
Last change on this file since ac7d5ef0 was ac7d5ef0, checked in by Joel Sherrill <joel.sherrill@…>, on 05/11/95 at 17:39:37

Initial revision

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/*
2 *  This routine returns control to 162Bug.
3 *
4 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
5 *  On-Line Applications Research Corporation (OAR).
6 *  All rights assigned to U.S. Government, 1994.
7 *
8 *  This material may be reproduced by or for the U.S. Government pursuant
9 *  to the copyright license under the clause at DFARS 252.227-7013.  This
10 *  notice must appear in all copies of this file and its derivatives.
11 *
12 *
13 *  Modifications of respective RTEMS file: COPYRIGHT (c) 1994.
14 *  EISCAT Scientific Association. M.Savitski
15 *
16 *  This material is a part of the MVME162 Board Support Package
17 *  for the RTEMS executive. Its licensing policies are those of the
18 *  RTEMS above.
19 *
20 *  $Id$
21 */
22
23#include <rtems.h>
24#include <bsp.h>
25#include <z8036.h>
26
27void bsp_return_to_monitor_trap()
28{
29  extern void start( void  );
30
31  lcsr->intr_ena = 0;               /* disable interrupts */
32  m68k_set_vbr(0xFFE00000);         /* restore 162Bug vectors */
33  asm volatile( "trap   #15"  );    /* trap to 162Bug */
34  asm volatile( ".short 0x63" );    /* return to 162Bug (.RETURN) */
35                                    /* restart program */
36  /*
37   *  This does not work on the 162....
38   */
39#if 0
40  {  register volatile void *start_addr;
41
42     start_addr = start;
43
44     asm volatile ( "jmp %0@" : "=a" (start_addr) : "0" (start_addr) );
45  }
46#endif
47}
48
49void bsp_cleanup( void )
50{
51   M68Kvec[ 45 ] = bsp_return_to_monitor_trap;   /* install handler */
52   asm volatile( "trap #13" );  /* insures SUPV mode */
53}
Note: See TracBrowser for help on using the repository browser.