source: rtems/c/src/lib/libbsp/m68k/mvme136/startup/bspclean.c @ f52111f

4.104.114.84.95
Last change on this file since f52111f was 08311cc3, checked in by Joel Sherrill <joel.sherrill@…>, on Nov 17, 1999 at 5:51:34 PM

Updated copyright notice.

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