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

4.115
Last change on this file since 66402ef2 was 66402ef2, checked in by Joel Sherrill <joel.sherrill@…>, on 10/12/14 at 00:09:52

m68k/mvme136: Fix warnings

  • Property mode set to 100644
File size: 1.3 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.rtems.org/license/LICENSE.
10 */
11
12#include <bsp.h>
13#include <bsp/bootcard.h>
14#include <rtems/zilog/z8036.h>
15
16void start(void);
17
18static rtems_isr bsp_return_to_monitor_trap(rtems_vector_number ignored)
19{
20  register volatile void *start_addr;
21
22  m68k_set_vbr( 0 );                  /* restore 135Bug vectors */
23  __asm__ volatile( "trap   #15"  );  /* trap to 135Bug */
24  __asm__ volatile( ".short 0x63" );  /* return to 135Bug (.RETURN) */
25                                      /* restart program */
26  start_addr = start;
27
28  __asm__ volatile ( "jmp %0@" : "=a" (start_addr) : "0" (start_addr) );
29}
30
31#define TIMER   0xfffb0000
32
33void bsp_fatal_extension(
34  rtems_fatal_source source,
35  bool is_internal,
36  rtems_fatal_code error
37)
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.