source: rtems/c/src/lib/libbsp/i960/rxgen960/start/rxgen_romld.S @ a41943ec

4.104.114.84.95
Last change on this file since a41943ec was 80e24f1f, checked in by Joel Sherrill <joel.sherrill@…>, on 06/15/00 at 22:22:00

rxgen960 compiles and links.

  • Property mode set to 100644
File size: 2.9 KB
Line 
1/*
2 *  $Id$
3 */
4
5#include "asm.h"
6
7        BEGIN_CODE
8
9        .globl _romStart
10        .globl start
11        .globl _start
12        .globl _romFaultStart
13        .globl _led_array
14        .text   
15start:  /* JRS */
16_start:  /* JRS */
17SYM(romStart ):
18SYM(_romStart ):
19          # This line is to make compiler happy.
20        mov     0, g14
21        ldconst 0x120f,r10   # BIST register
22/*
23         Setup code for in memory loaded image
24*/
25/*
26          # Interrupt stack is used by default.
27          # Copy all code (except Fault Table and Fault Handler)
28          # from EPROM into DRAM.
29*/
30        ldconst 0x120f,r10   //# BIST register
31        ldconst 0x2,r3
32        stob    r3,0(r10)       //# 2->LED
33/*
34          # Zero all uninitialized data
35*/
36        callx   _zeroBss
37        ldconst 0x120f,r10   //# BIST register
38        ldconst 0x3,r3
39        stob    r3,0(r10)       //# 3->LED
40/*
41          # And reinitialize processor.
42          # _start is a few lines below.
43          # _prcb is RAM-based struct PRCB.
44*/
45        ldconst 0x300, r4
46        ldconst _pmc_start, r5
47        ldconst _ram_prcb, r6
48        sysctl  r4, r5, r6
49/*
50          # This point will never be reached.
51*/
52
53SYM(_pmc_start) : 
54SYM(pmc_start) : 
55        ldconst 0x120f,r10   # BIST register
56        ldconst 0x4,r3
57        stob    r3,0(r10)       //# 4->LED
58        mov     0, g14
59/*
60          # To get ready to invoke procedures.
61          # I'll use supervisor stack.
62*/
63
64        ldconst _svrStackPtr, fp
65        lda     16*4(fp), sp
66        ldconst 0x5,r3
67        stob    r3,0(r10)       //# 5->LED
68
69        ldconst 0x1F0000, r4
70        ldconst 0x1F2000, r3
71        ldconst 0, r5
72        modpc   r4, r3, r5
73
74        ldconst 7,r3
75        stob    r3,0(r10)       //# 7->LED
76
77        callx   _rx_boot_card
78/*        # if _romMain ever returns ...        */
79        b       _romExit
80
81SYM(romFaultStart) : 
82SYM(_romFaultStart) : 
83
84        mov     0, g14
85
86        /* ldconst      0, sf0 XXX JRS */
87/*
88          # To get ready to invoke procedures.
89          # I'll use supervisor stack.
90          # _svrStackPtr is defined directly in rom.ld.
91*/
92        ldconst _svrStackPtr, fp
93        lda     16*4(fp), sp
94/*
95          # Set processor priority to zero.
96*/
97        ldconst 0x1F0000, r4
98        ldconst 0, r5
99        modpc   r4, r4, r5
100//        # Now to real code
101// Fix this up  callx   _romFaultMain
102        callx   _rx_boot_card
103//        # if _romMain ever returns ...       
104        b       _romExit
105
106_romExit :
107//        # if _romMain ever returns ...
108//      fmark
109        b       _romExit
110
111
112
113SYM(led_array):
114        .byte 99
115        .byte 1
116        .byte 2
117        .byte 3
118        .byte 4
119        .byte 5
120        .byte 6
121        .byte 7
122        .byte 8
123        .byte 9
124        .byte 0xa
125        .byte 0xb
126        .byte 0xc
127
128
129/* just to compile and link application XXX JOEL */
130        .globl _faultStart
131        .globl _faultEnd
132        .globl _faultCheckSum
133        .globl _faultBuffer
134        .globl _svrStackPtr
135        .globl _console_pmr_getc
136        .globl _console_pmr_kbhit
137        .globl _console_pmr_init
138        .globl _console_pmr_putc
139        .globl _DBGConsole_make_sync
140        .globl _codeRamStart
141        .globl _codeRomStart
142        .globl _codeRamEnd
143        .globl _codeRomEnd
144        .globl _bssStart
145        .globl _bssEnd
146        .globl _bssStart_1
147        .globl _bssEnd_1
148        .globl _intStackPtr
149       
150_faultStart:
151_faultEnd:
152_faultCheckSum:
153_faultBuffer:
154_svrStackPtr:
155_console_pmr_getc:
156_console_pmr_kbhit:
157_console_pmr_init:
158_console_pmr_putc:
159_DBGConsole_make_sync:
160_codeRamStart:
161_codeRomStart:
162_codeRamEnd:
163_codeRomEnd:
164_bssStart:
165_bssEnd:
166_bssStart_1:
167_bssEnd_1:
168_intStackPtr:
169
Note: See TracBrowser for help on using the repository browser.