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

4.104.114.84.95
Last change on this file since e4c07444 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.5 KB
Line 
1/*
2 *  This routine returns control to 162Bug.
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 *
12 *  Modifications of respective RTEMS file: COPYRIGHT (c) 1994.
13 *  EISCAT Scientific Association. M.Savitski
14 *
15 *  This material is a part of the MVME162 Board Support Package
16 *  for the RTEMS executive. Its licensing policies are those of the
17 *  RTEMS above.
18 *
19 *  $Id$
20 */
21
22#include <rtems.h>
23#include <bsp.h>
24#include <zilog/z8036.h>
25#include <page_table.h>
26
27void bsp_return_to_monitor_trap()
28{
29  extern void start( void  );
30
31  page_table_teardown();
32
33  lcsr->intr_ena = 0;               /* disable interrupts */
34#if defined(mvme162lx)
35  m68k_set_vbr(0x00000000);         /* restore 162Bug vectors */
36#else
37  m68k_set_vbr(0xFFE00000);         /* restore 162Bug vectors */
38#endif
39
40  asm volatile( "trap   #15"  );    /* trap to 162Bug */
41  asm volatile( ".short 0x63" );    /* return to 162Bug (.RETURN) */
42                                    /* restart program */
43  /*
44   *  This does not work on the 162....
45   */
46#if 0
47  {  register volatile void *start_addr;
48
49     start_addr = start;
50
51     asm volatile ( "jmp %0@" : "=a" (start_addr) : "0" (start_addr) );
52  }
53#endif
54}
55
56void bsp_cleanup( void )
57{
58   M68Kvec[ 45 ] = bsp_return_to_monitor_trap;   /* install handler */
59   asm volatile( "trap #13" );  /* insures SUPV mode */
60}
Note: See TracBrowser for help on using the repository browser.