source: rtems/c/src/lib/libbsp/i960/rxgen960/startup/rxgen_romld.S @ 8ac4213

4.104.114.84.95
Last change on this file since 8ac4213 was bf71be9e, checked in by Joel Sherrill <joel.sherrill@…>, on 10/27/99 at 15:57:17

Moved rxgen_romld.s to rxgen_romld.S per GNU conventions.

  • Property mode set to 100644
File size: 2.1 KB
Line 
1#include "asm.h"
2
3        BEGIN_CODE
4
5        .globl _romStart
6        .globl _start
7        .globl _romFaultStart
8        .globl _led_array
9        .text   
10SYM(romStart ):
11SYM(_romStart ):
12          # This line is to make compiler happy.
13        mov     0, g14
14        ldconst 0x120f,r10   # BIST register
15/*
16         Setup code for in memory loaded image
17*/
18/*
19          # Interrupt stack is used by default.
20          # Copy all code (except Fault Table and Fault Handler)
21          # from EPROM into DRAM.
22*/
23        ldconst 0x120f,r10   //# BIST register
24        ldconst 0x2,r3
25        stob    r3,0(r10)       //# 2->LED
26/*
27          # Zero all uninitialized data
28*/
29        callx   _zeroBss
30        ldconst 0x120f,r10   //# BIST register
31        ldconst 0x3,r3
32        stob    r3,0(r10)       //# 3->LED
33/*
34          # And reinitialize processor.
35          # _start is a few lines below.
36          # _prcb is RAM-based struct PRCB.
37*/
38        ldconst 0x300, r4
39        ldconst _pmc_start, r5
40        ldconst _ram_prcb, r6
41        sysctl  r4, r5, r6
42/*
43          # This point will never be reached.
44*/
45
46SYM(_pmc_start) : 
47SYM(pmc_start) : 
48        ldconst 0x120f,r10   # BIST register
49        ldconst 0x4,r3
50        stob    r3,0(r10)       //# 4->LED
51        mov     0, g14
52/*
53          # To get ready to invoke procedures.
54          # I'll use supervisor stack.
55*/
56
57        ldconst _svrStackPtr, fp
58        lda     16*4(fp), sp
59        ldconst 0x5,r3
60        stob    r3,0(r10)       //# 5->LED
61
62        ldconst 0x1F0000, r4
63        ldconst 0x1F2000, r3
64        ldconst 0, r5
65        modpc   r4, r3, r5
66
67        ldconst 7,r3
68        stob    r3,0(r10)       //# 7->LED
69
70        callx   _rx_boot_card
71/*        # if _romMain ever returns ...        */
72        b       _romExit
73
74SYM(romFaultStart) : 
75SYM(_romFaultStart) : 
76
77        mov     0, g14
78
79        ldconst 0, sf0
80/*
81          # To get ready to invoke procedures.
82          # I'll use supervisor stack.
83          # _svrStackPtr is defined directly in rom.ld.
84*/
85        ldconst _svrStackPtr, fp
86        lda     16*4(fp), sp
87/*
88          # Set processor priority to zero.
89*/
90        ldconst 0x1F0000, r4
91        ldconst 0, r5
92        modpc   r4, r4, r5
93//        # Now to real code
94// Fix this up  callx   _romFaultMain
95        callx   _rx_boot_card
96//        # if _romMain ever returns ...       
97        b       _romExit
98
99_romExit :
100//        # if _romMain ever returns ...
101//      fmark
102        b       _romExit
103
104
105
106SYM(led_array):
107        .byte 99
108        .byte 1
109        .byte 2
110        .byte 3
111        .byte 4
112        .byte 5
113        .byte 6
114        .byte 7
115        .byte 8
116        .byte 9
117        .byte 0xa
118        .byte 0xb
119        .byte 0xc
Note: See TracBrowser for help on using the repository browser.