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.2 KB
|
Line | |
---|
1 | /* |
---|
2 | * This routine returns control to 147Bug. |
---|
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 | * MVME147 port for TNI - Telecom Bretagne |
---|
12 | * by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr) |
---|
13 | * May 1996 |
---|
14 | * |
---|
15 | * $Id$ |
---|
16 | */ |
---|
17 | |
---|
18 | #include <rtems.h> |
---|
19 | #include <bsp.h> |
---|
20 | #include <rtems/clockdrv.h> |
---|
21 | |
---|
22 | extern void start( void ); |
---|
23 | |
---|
24 | void bsp_return_to_monitor_trap(void) |
---|
25 | { |
---|
26 | register volatile void *start_addr; |
---|
27 | |
---|
28 | m68k_set_vbr( 0 ); /* restore 147Bug vectors */ |
---|
29 | __asm__ volatile( "trap #15" ); /* trap to 147Bug */ |
---|
30 | __asm__ volatile( ".short 0x63" ); /* return to 147Bug (.RETURN) */ |
---|
31 | /* restart program */ |
---|
32 | start_addr = start; |
---|
33 | |
---|
34 | __asm__ volatile ( "jmp %0@" : "=a" (start_addr) : "0" (start_addr) ); |
---|
35 | } |
---|
36 | |
---|
37 | void bsp_cleanup( |
---|
38 | uint32_t status |
---|
39 | ) |
---|
40 | { |
---|
41 | pcc->timer1_int_control = 0; /* Disable Timer 1 */ |
---|
42 | pcc->timer2_int_control = 0; /* Disable Timer 2 */ |
---|
43 | |
---|
44 | M68Kvec[ 45 ] = bsp_return_to_monitor_trap; /* install handler */ |
---|
45 | __asm__ volatile( "trap #13" ); /* ensures SUPV mode */ |
---|
46 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.