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

4.104.114.84.95
Last change on this file since a2016b99 was 81d96577, checked in by Joel Sherrill <joel.sherrill@…>, on 08/04/97 at 21:55:30

moved header files into the motorola and zilog subdirectories

  • Property mode set to 100644
File size: 1.3 KB
RevLine 
[ac7d5ef0]1/*
2 *  This routine returns control to 135Bug.
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 *  $Id$
13 */
14
15#include <rtems.h>
16#include <bsp.h>
17#include <clockdrv.h>
[81d96577]18#include <zilog/z8036.h>
[ac7d5ef0]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.