OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [m68k/] [mvme162/] [startup/] [bspclean.c] - Blame information for rev 173

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*
2
 *  This routine returns control to 162Bug.
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
 *
12
 *  Modifications of respective RTEMS file: COPYRIGHT (c) 1994.
13
 *  EISCAT Scientific Association. M.Savitski
14
 *
15
 *  This material is a part of the MVME162 Board Support Package
16
 *  for the RTEMS executive. Its licensing policies are those of the
17
 *  RTEMS above.
18
 *
19
 *  $Id: bspclean.c,v 1.2 2001-09-27 12:00:18 chris Exp $
20
 */
21
 
22
#include <rtems.h>
23
#include <bsp.h>
24
#include <zilog/z8036.h>
25
#include <page_table.h>
26
 
27
void bsp_return_to_monitor_trap()
28
{
29
  extern void start( void  );
30
 
31
  page_table_teardown();
32
 
33
  lcsr->intr_ena = 0;               /* disable interrupts */
34
#if defined(mvme162lx)
35
  m68k_set_vbr(0x00000000);         /* restore 162Bug vectors */
36
#else
37
  m68k_set_vbr(0xFFE00000);         /* restore 162Bug vectors */
38
#endif
39
 
40
  asm volatile( "trap   #15"  );    /* trap to 162Bug */
41
  asm volatile( ".short 0x63" );    /* return to 162Bug (.RETURN) */
42
                                    /* restart program */
43
  /*
44
   *  This does not work on the 162....
45
   */
46
#if 0
47
  {  register volatile void *start_addr;
48
 
49
     start_addr = start;
50
 
51
     asm volatile ( "jmp %0@" : "=a" (start_addr) : "0" (start_addr) );
52
  }
53
#endif
54
}
55
 
56
void bsp_cleanup( void )
57
{
58
   M68Kvec[ 45 ] = bsp_return_to_monitor_trap;   /* install handler */
59
   asm volatile( "trap #13" );  /* insures SUPV mode */
60
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.