source: rtems/c/src/lib/libbsp/m68k/ods68302/start/debugreset.S @ b8c9883

4.104.114.84.95
Last change on this file since b8c9883 was b8c9883, checked in by Joel Sherrill <joel.sherrill@…>, on 01/13/00 at 20:45:07

All m68k BSPs now build with new ELF style linkcmds.

  • Property mode set to 100644
File size: 2.2 KB
Line 
1/* 
2 *  $Id$
3 *
4 *  Re-written the gen68302 start-up code.
5 * 
6 *  Uses gas syntax only, removed the OAR asm.h.
7 * 
8 *  Supplies a complete vector table in ROM.
9 * 
10 *  Manages all vectors with seperate handlers to trap unhandled
11 *  execptions.
12 * 
13 *  Uses the target specific header file to get the runtime
14 *  configuration
15 * 
16 *  COPYRIGHT (c) 1996
17 *  Objective Design Systems Pty Ltd (ODS)
18 *       
19 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
20 *  On-Line Applications Research Corporation (OAR).
21 *  All rights assigned to U.S. Government, 1994.
22 *
23 *  This material may be reproduced by or for the U.S. Government pursuant
24 *  to the copyright license under the clause at DFARS 252.227-7013.  This
25 *  notice must appear in all copies of this file and its derivatives.
26 *
27 */
28
29|
30| Entry from debugger
31|
32        .sect   .text
33
34|
35| Start
36|
37| Entered from a hardware reset.
38|
39       
40        .global start                           | Default entry point for GNU
41start:
42
43        move.w  #0x2700,%sr                     | Disable all interrupts
44
45        |
46        | zero out uninitialized data area
47        |
48
49zerobss:
50        moveal  #_clear_end,%a0                 | find end of .bss
51        moveal  #_clear_start,%a1               | find beginning of .bss
52        moveq   #0,%d0
53       
54zerobss_loop:
55       
56        movel   %d0,%a1@+                       | to zero out uninitialized
57        cmpal   %a0,%a1
58        jlt     zerobss_loop                    | loop until end reached
59
60        movel   %d0,_stack_init                 | load stack top
61
62        movw    #0x3700,%sr                     | SUPV MODE,INTERRUPTS OFF!!!
63        movel   %d0,%a7                         | set master stack pointer
64        movel   %d0,%a6                         | set base pointer
65
66        jsr     boot_phase_3
67
68|               
69| Initialised data
70|
71
72        .sect   .data
73       
74        .global start_frame
75       
76start_frame:
77        .space  4,0
78
79|
80| Uninitialised data
81|
82
83        .sect   .bss
84       
85        .global environ
86        .align  2
87       
88environ:
89        .long   0
90
91        .global heap_size
92        .set    heap_size,0x2000
93
94        .global stack_size
95        .set    stack_size,0x1000
96
97
Note: See TracBrowser for help on using the repository browser.