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

4.104.114.84.95
Last change on this file since f4fe0092 was f4fe0092, checked in by Joel Sherrill <joel.sherrill@…>, on 09/04/03 at 18:52:04

2003-09-04 Joel Sherrill <joel@…>

  • clock/ckinit.c, console/console.c, consolex/cTest.c, consolex/consolex.c, consolex/consolex.h, include/bsp.h, include/coverhd.h, include/tod.h, startup/bspclean.c, startup/bspstart.c, startup/linkcmds, timer/timer.c, timer/timerisr.S, tod/tod.c: URL for license changed.
  • Property mode set to 100644
File size: 1.5 KB
RevLine 
[ac7d5ef0]1/*
2 *  This routine returns control to 162Bug.
3 *
[08311cc3]4 *  COPYRIGHT (c) 1989-1999.
[ac7d5ef0]5 *  On-Line Applications Research Corporation (OAR).
6 *
[98e4ebf5]7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
[f4fe0092]9 *  http://www.rtems.com/license/LICENSE.
[ac7d5ef0]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>
[81d96577]24#include <zilog/z8036.h>
[2938c1a3]25#include <page_table.h>
[ac7d5ef0]26
27void bsp_return_to_monitor_trap()
28{
29  extern void start( void  );
30
[5c491aef]31  page_table_teardown();
32
[ac7d5ef0]33  lcsr->intr_ena = 0;               /* disable interrupts */
[49c2f589]34#if defined(mvme162lx)
35  m68k_set_vbr(0x00000000);         /* restore 162Bug vectors */
36#else
[ac7d5ef0]37  m68k_set_vbr(0xFFE00000);         /* restore 162Bug vectors */
[49c2f589]38#endif
39
[ac7d5ef0]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.