source: rtems/c/src/lib/libbsp/m68k/mvme162/startup/bspclean.c @ 1bdfd262

4.115
Last change on this file since 1bdfd262 was 8c38031, checked in by Ralf Corsepius <ralf.corsepius@…>, on 02/11/11 at 12:37:56

2011-02-11 Ralf Corsépius <ralf.corsepius@…>

  • startup/bspclean.c, startup/page_table.c: Use "asm" instead of "asm" for improved c99-compliance.
  • Property mode set to 100644
File size: 1.5 KB
Line 
1/*
2 *  This routine returns control to 162Bug.
3 *
4 *  COPYRIGHT (c) 1989-2010.
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.com/license/LICENSE.
10 *
11 *  Modifications of respective RTEMS file: COPYRIGHT (c) 1994.
12 *  EISCAT Scientific Association. M.Savitski
13 *
14 *  This material is a part of the MVME162 Board Support Package
15 *  for the RTEMS executive. Its licensing policies are those of the
16 *  RTEMS above.
17 *
18 *  $Id$
19 */
20
21#include <rtems.h>
22#include <bsp.h>
23#include <rtems/zilog/z8036.h>
24#include <page_table.h>
25
26extern void start( void  );
27
28void bsp_return_to_monitor_trap(void)
29{
30  page_table_teardown();
31
32  lcsr->intr_ena = 0;               /* disable interrupts */
33#if defined(mvme162lx)
34  m68k_set_vbr(0x00000000);         /* restore 162Bug vectors */
35#else
36  m68k_set_vbr(0xFFE00000);         /* restore 162Bug vectors */
37#endif
38
39  __asm__ volatile( "trap   #15"  );    /* trap to 162Bug */
40  __asm__ volatile( ".short 0x63" );    /* return to 162Bug (.RETURN) */
41                                    /* restart program */
42  /*
43   *  This does not work on the 162....
44   */
45#if 0
46  {  register volatile void *start_addr;
47
48     start_addr = start;
49
50     __asm__ volatile ( "jmp %0@" : "=a" (start_addr) : "0" (start_addr) );
51  }
52#endif
53}
54
55void bsp_cleanup( void )
56{
57   M68Kvec[ 45 ] = bsp_return_to_monitor_trap;   /* install handler */
58   __asm__ volatile( "trap #13" );  /* insures SUPV mode */
59}
Note: See TracBrowser for help on using the repository browser.