OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [i960/] [rxgen960/] [startup/] [rxgen_romld.S] - Blame information for rev 173

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.