source: rtems/c/src/lib/libbsp/m68k/mvme136/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 Apr 22, 1997 at 5:20:27 PM

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.2 KB
Line 
1/*
2 *  This routine returns control to 135Bug.
3 *
4 *  COPYRIGHT (c) 1989-1997.
5 *  On-Line Applications Research Corporation (OAR).
6 *  Copyright assigned to U.S. Government, 1994.
7 *
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.
11 *
12 *  $Id$
13 */
14
15#include <rtems.h>
16#include <bsp.h>
17#include <clockdrv.h>
18#include <z8036.h>
19
20void bsp_return_to_monitor_trap()
21{
22  extern void start( void  );
23
24  register volatile void *start_addr;
25
26  m68k_set_vbr( 0 );                /* restore 135Bug vectors */
27  asm volatile( "trap   #15"  );    /* trap to 135Bug */
28  asm volatile( ".short 0x63" );    /* return to 135Bug (.RETURN) */
29                                    /* restart program */
30  start_addr = start;
31
32  asm volatile ( "jmp %0@" : "=a" (start_addr) : "0" (start_addr) );
33}
34
35#define TIMER   0xfffb0000
36
37void bsp_cleanup( void )
38{
39   Z8x36_WRITE( TIMER, MASTER_INTR,    0x62 );   /* redo timer */
40   Z8x36_WRITE( TIMER, CT1_MODE_SPEC,  0x00 );
41   Z8x36_WRITE( TIMER, MASTER_CFG,     0xf4 );
42   Z8x36_WRITE( TIMER, CT1_CMD_STATUS, 0x00 );
43
44   M68Kvec[ 45 ] = bsp_return_to_monitor_trap;   /* install handler */
45   asm volatile( "trap #13" );  /* insures SUPV mode */
46}
Note: See TracBrowser for help on using the repository browser.