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

4.115
Last change on this file since f4adc0d1 was f4adc0d1, checked in by Joel Sherrill <joel.sherrill@…>, on 07/13/11 at 18:35:43

2011-07-13 Joel Sherrill <joel.sherrilL@…>

PR 1824/cpukit

  • startup/bspclean.c: Return exit/shutdown status back to boot_card(). boot_card() propagates this to bsp_cleanup() and returns it to the assembly that started the application. bsp_cleanup() prototype changed.
  • 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(
56  uint32_t status
57)
58{
59   M68Kvec[ 45 ] = bsp_return_to_monitor_trap;   /* install handler */
60   __asm__ volatile( "trap #13" );  /* insures SUPV mode */
61}
Note: See TracBrowser for help on using the repository browser.