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

4.104.114.84.95
Last change on this file since 7068e246 was 0074691, checked in by Joel Sherrill <joel.sherrill@…>, on Jul 31, 1997 at 10:13:29 PM

Merged very large and much appreciated patch from Chris Johns
<cjohns@…>. This patch includes the ods68302 bsp,
the RTEMS++ class library, and the rtems++ test.

  • Property mode set to 100644
File size: 2.5 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  #end,%a0                        | find end of .bss
51        moveal  #bss_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   #end,%d0                        | d0 = end of bss/start of heap
61        addl    #heap_size,%d0                  | d0 = end of heap
62
63        movel   %d0,stack_start                 | Save for brk() routine
64        addl    #stack_size,%d0                 | make room for stack
65        andl    #0xffffffc0,%d0                 | align it on 16 byte boundary
66
67        movw    #0x3700,%sr                     | SUPV MODE,INTERRUPTS OFF!!!
68        movel   %d0,%a7                         | set master stack pointer
69        movel   %d0,%a6                         | set base pointer
70
71        jsr     boot_phase_3
72
73|               
74| Initialised data
75|
76
77        .sect   .data
78       
79        .global start_frame
80       
81start_frame:
82        .space  4,0
83
84        .global stack_start
85       
86stack_start:
87        .space  4,0
88
89|
90| Uninitialised data
91|
92
93        .sect   .bss
94       
95        .global environ
96        .align  2
97       
98environ:
99        .long   0
100
101        .global heap_size
102        .set    heap_size,0x2000
103
104        .global stack_size
105        .set    stack_size,0x1000
106
107
Note: See TracBrowser for help on using the repository browser.