source: rtems/bsps/m68k/shared/start/start.S @ ff081aee

5
Last change on this file since ff081aee was ff081aee, checked in by Sebastian Huber <sebastian.huber@…>, on 11/06/18 at 15:58:02

score: Rename interrupt stack symbols

Rename

  • _Configuration_Interrupt_stack_area_begin in _ISR_Stack_area_begin,
  • _Configuration_Interrupt_stack_area_end in _ISR_Stack_area_end, and
  • _Configuration_Interrupt_stack_size in _ISR_Stack_size.

Move definitions to <rtems/score/isr.h>. The new names are considerable
shorter and in the right namespace.

Update #3459.

  • Property mode set to 100644
File size: 3.9 KB
Line 
1/*  entry.s
2 *
3 *  This file contains the entry point for the application.
4 *  The name of this entry point is compiler dependent.
5 *  It jumps to the BSP which is responsible for performing
6 *  all initialization.
7 *
8 *  COPYRIGHT (c) 1989-1999.
9 *  On-Line Applications Research Corporation (OAR).
10 *
11 *  The license and distribution terms for this file may be
12 *  found in the file LICENSE in this distribution or at
13 *  http://www.rtems.org/license/LICENSE.
14 */
15
16#include <rtems/asm.h>
17
18#if (M68K_COLDFIRE_ARCH == 0) /* All ColdFire BSPs must provide their own start vector */
19
20BEGIN_CODE
21                                        | Default entry points for:
22         PUBLIC (start)                 |   GNU
23         PUBLIC (M68Kvec)               |   Vector Table
24
25SYM (start):
26SYM (M68Kvec):                          | standard location for vectors
27        nop                             | for linkers with problem
28                                        | location zero
29        jmp      SYM (start_around)
30
31     /*
32      *  We can use the following space as our vector table
33      *  if the CPU has a VBR or we can save vector table in it
34      *  if the CPU does not.
35      */
36
37        .space   4088                   | to avoid initial intr stack
38                                        |   from 135BUG on MVME13?
39                                        |   and start code at 0x4000
40SYM (vectors):
41        .space   1016                   | reserve space for rest of vectors
42
43#if ( M68K_HAS_SEPARATE_STACKS == 1 )
44SYM (lowintstack):
45        .space   4092                   | reserve for interrupt stack
46SYM (hiintstack):
47        .space   4                      | end of interrupt stack
48#endif
49
50        PUBLIC (start_around)
51SYM (start_around):
52        move.w  sr, SYM (initial_sr)
53        oriw    #0x3700,sr              | SUPV MODE,INTERRUPTS OFF!!!
54#if ( M68K_HAS_SEPARATE_STACKS == 1 )
55        movec   isp,a0
56        move.l  a0, SYM (initial_isp)
57        movec   usp,a0
58        move.l  a0, SYM (initial_usp)
59        movec   msp,a0
60        move.l  a0, SYM (initial_msp)
61#else
62        move.l  a7, SYM (initial_msp)
63#endif
64
65        |
66        | zero out uninitialized data area
67        |
68zerobss:
69        moveal  # SYM (bsp_section_bss_end),a0     | find end of .bss
70        moveal  # SYM (bsp_section_bss_begin),a1   | find beginning of .bss
71        movel   #0,d0
72
73loop:   movel   #0,a1@+                 | to zero out uninitialized
74        cmpal   a0,a1
75        jlt     loop                    | loop until _end reached
76
77        movel   # SYM (_ISR_Stack_area_end),d0 | d0 = stop of stack
78        movw    #0x3700,sr              | SUPV MODE,INTERRUPTS OFF!!!
79        movel   d0,a7                   | set master stack pointer
80        movel   d0,a6                   | set base pointer
81
82      /*
83       *  RTEMS should maintain a separate interrupt stack on CPUs
84       *  without one in hardware.  This is currently not supported
85       *  on versions of the m68k without a HW intr stack.
86       */
87
88#if ( M68K_HAS_SEPARATE_STACKS == 1 )
89        lea     SYM (hiintstack),a0   | a0 = high end of intr stack
90        movec   a0,isp                | set interrupt stack
91#endif
92
93        movel   #0,a7@-               | push command line
94        jsr     SYM (boot_card)
95        addl    #12,a7
96
97#if ( M68K_HAS_SEPARATE_STACKS == 1 )
98        move.l  SYM (initial_isp),a0
99        movec   a0,isp
100        move.l  SYM (initial_usp),a0
101        movec   a0,usp
102        move.l  SYM (initial_msp),a0
103        movec   a0,msp
104#else
105        movea.l SYM (initial_msp),a7
106#endif
107        move.w  SYM (initial_sr),sr
108        rts
109
110END_CODE
111
112BEGIN_DATA
113
114        PUBLIC (start_frame)
115SYM (start_frame):
116        .space  4,0
117
118END_DATA
119
120BEGIN_BSS
121
122        PUBLIC (initial_isp)
123SYM (initial_isp):
124        .space  4
125
126        PUBLIC (initial_msp)
127SYM (initial_msp):
128        .space  4
129
130        PUBLIC (initial_usp)
131SYM (initial_usp):
132        .space  4
133
134         PUBLIC (initial_sr)
135SYM (initial_sr):
136        .space  2
137
138END_DATA
139#endif
140END
Note: See TracBrowser for help on using the repository browser.