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

4.104.114.84.95
Last change on this file since 03f2154e was 03f2154e, checked in by Joel Sherrill <joel.sherrill@…>, on 04/22/97 at 17:20:27

headers updated to reflect new style copyright notice as part
of switching to the modified GNU GPL.

  • Property mode set to 100644
File size: 1.4 KB
RevLine 
[ac7d5ef0]1/*
2 *  This routine returns control to 162Bug.
3 *
[03f2154e]4 *  COPYRIGHT (c) 1989-1997.
[ac7d5ef0]5 *  On-Line Applications Research Corporation (OAR).
[03f2154e]6 *  Copyright assigned to U.S. Government, 1994.
[ac7d5ef0]7 *
[03f2154e]8 *  The license and distribution terms for this file may in
9 *  the file LICENSE in this distribution or at
10 *  http://www.OARcorp.com/rtems/license.html.
[ac7d5ef0]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>
[2938c1a3]26#include <page_table.h>
[ac7d5ef0]27
28void bsp_return_to_monitor_trap()
29{
30  extern void start( void  );
31
[5c491aef]32  page_table_teardown();
33
[ac7d5ef0]34  lcsr->intr_ena = 0;               /* disable interrupts */
35  m68k_set_vbr(0xFFE00000);         /* restore 162Bug vectors */
36  asm volatile( "trap   #15"  );    /* trap to 162Bug */
37  asm volatile( ".short 0x63" );    /* return to 162Bug (.RETURN) */
38                                    /* restart program */
39  /*
40   *  This does not work on the 162....
41   */
42#if 0
43  {  register volatile void *start_addr;
44
45     start_addr = start;
46
47     asm volatile ( "jmp %0@" : "=a" (start_addr) : "0" (start_addr) );
48  }
49#endif
50}
51
52void bsp_cleanup( void )
53{
54   M68Kvec[ 45 ] = bsp_return_to_monitor_trap;   /* install handler */
55   asm volatile( "trap #13" );  /* insures SUPV mode */
56}
Note: See TracBrowser for help on using the repository browser.