4.104.114.84.95
Last change
on this file since 6fd3979 was
98e4ebf5,
checked in by Joel Sherrill <joel.sherrill@…>, on 10/08/97 at 15:45:54
|
Fixed typo in the pointer to the license terms.
|
-
Property mode set to
100644
|
File size:
1.3 KB
|
Rev | Line | |
---|
[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 | * |
---|
[98e4ebf5] | 8 | * The license and distribution terms for this file may be |
---|
| 9 | * found in the file LICENSE in this distribution or at |
---|
[03f2154e] | 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 | |
---|
| 20 | void 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 | |
---|
| 37 | void 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.