1 | /*------------------------------------*/ |
---|
2 | /* rom.ld */ |
---|
3 | /* Last change : 19. 4.95 */ |
---|
4 | /*------------------------------------* |
---|
5 | * To build ROM based i960 image. |
---|
6 | *------------------------------------*/ |
---|
7 | /* |
---|
8 | * $Id$ |
---|
9 | */ |
---|
10 | |
---|
11 | |
---|
12 | |
---|
13 | MEMORY |
---|
14 | { |
---|
15 | dram : org = 0xa2000000, len = 120K |
---|
16 | } |
---|
17 | |
---|
18 | |
---|
19 | _bootAddr = 0xa0200000; |
---|
20 | _HEAP = 0xA0100000 ; |
---|
21 | |
---|
22 | SECTIONS |
---|
23 | { |
---|
24 | /* Only monitor start point and fault handler |
---|
25 | * will live in ROM as far as text is concerned. |
---|
26 | * Only fault table will live in ROM as far as data |
---|
27 | * is concerned. |
---|
28 | */ |
---|
29 | romCode : |
---|
30 | { |
---|
31 | /* Make sure that the monitor start point |
---|
32 | * is the first location in EPROM. |
---|
33 | */ |
---|
34 | rommon.o960(.text) |
---|
35 | /* Procedures to copy code and |
---|
36 | * initialize bss in RAM. |
---|
37 | */ |
---|
38 | sctns.o960(.text) |
---|
39 | /* Make Sure Fault Table (and its handler's data) |
---|
40 | * live here so that they wouldn't get destroyed). |
---|
41 | */ |
---|
42 | asmfault.o960 |
---|
43 | flttbl.o960 |
---|
44 | /* 16 byte aligned PRCB. |
---|
45 | */ |
---|
46 | . = ALIGN(16); |
---|
47 | rom_prcb.o960(.data) |
---|
48 | /* 16 byte aligned Control Table. |
---|
49 | */ |
---|
50 | . = ALIGN(16); |
---|
51 | rom_cntrltbl.o960(.data) |
---|
52 | . = ALIGN(16); |
---|
53 | intrtbl.o960(.data) |
---|
54 | . = ALIGN(16); |
---|
55 | nulsystbl.o960(.data) |
---|
56 | . = ALIGN(16); |
---|
57 | /* I need this symbol to know where code which is |
---|
58 | * to be copied reside in ROM. Align it on a 16 |
---|
59 | * boundary. |
---|
60 | */ |
---|
61 | . = ALIGN(16); |
---|
62 | _codeRomStart = .; |
---|
63 | } > dram |
---|
64 | |
---|
65 | /* All the rest of the code will live in RAM. |
---|
66 | * Relocation are created as though code resides |
---|
67 | * in RAM, while code is placed right after romCode. |
---|
68 | * This is responsiblity of the ROM monitor to |
---|
69 | * copy code into ROM. |
---|
70 | */ |
---|
71 | ramCode : AT(ADDR(romCode) + SIZEOF(romCode)) |
---|
72 | { |
---|
73 | /* RAM-based code section start. |
---|
74 | * I need this symbol to know where to copy code |
---|
75 | * at initialization time . |
---|
76 | */ |
---|
77 | _codeRamStart = .; |
---|
78 | /* RAM based fault recovery stuff. |
---|
79 | */ |
---|
80 | _faultStart = .; |
---|
81 | fault.o960 |
---|
82 | _faultEnd = .; |
---|
83 | /* Check sum to gurantee that |
---|
84 | * the above section wasn't broken. |
---|
85 | */ |
---|
86 | . = ALIGN(16); |
---|
87 | _faultCheckSum = .; |
---|
88 | . += 4; |
---|
89 | /* Fault Buffer to keep the state of |
---|
90 | * the fauled procedure. |
---|
91 | */ |
---|
92 | _faultBuffer = .; |
---|
93 | . += 256; |
---|
94 | /* All the rest of the text goes here. |
---|
95 | */ |
---|
96 | . = ALIGN(16); |
---|
97 | *(.text) |
---|
98 | /* 16 byte aligned PRCB. |
---|
99 | */ |
---|
100 | . = ALIGN(16); |
---|
101 | prcb.o960(.data) |
---|
102 | /* 16 byte aligned Control Table. |
---|
103 | */ |
---|
104 | . = ALIGN(16); |
---|
105 | cntrltbl.o960(.data) |
---|
106 | . = ALIGN(16); |
---|
107 | systbl.o960(.data) |
---|
108 | /* All the rest of program defined data goes here. |
---|
109 | */ |
---|
110 | *(.data) |
---|
111 | /* RAM-based code section end. |
---|
112 | * I need this symbol to know where to copy code |
---|
113 | * at initialization time . |
---|
114 | */ |
---|
115 | _codeRamEnd = .; |
---|
116 | } > sram |
---|
117 | |
---|
118 | /* RAM based uninitialized data. |
---|
119 | */ |
---|
120 | bss (NOLOAD) : |
---|
121 | { |
---|
122 | /* BSS section start. I need this symbol to |
---|
123 | * zero BSS on initialization. |
---|
124 | */ |
---|
125 | _bssStart = .; |
---|
126 | /* Supervisor Stack. Aligned on a 16 boundary. |
---|
127 | */ |
---|
128 | . = ALIGN(16); |
---|
129 | _svrStackPtr = .; |
---|
130 | . += 4K; |
---|
131 | /* Interrupt Stack. Aligned on a 16 boundary. |
---|
132 | */ |
---|
133 | . = ALIGN(16); |
---|
134 | _intStackPtr = .; |
---|
135 | . += 4K; |
---|
136 | /* Program defined BSS. |
---|
137 | */ |
---|
138 | *(.bss) |
---|
139 | /* Program defined COMMON. |
---|
140 | */ |
---|
141 | *(COMMON) |
---|
142 | /* BSS section end. I need this symbol to |
---|
143 | * zero BSS on initialization. |
---|
144 | */ |
---|
145 | _bssEnd = .; |
---|
146 | _bssStart_1 = .; |
---|
147 | _bssEnd_1 = .; |
---|
148 | } > dram |
---|
149 | |
---|
150 | } |
---|
151 | |
---|
152 | /*-------------*/ |
---|
153 | /* End of file */ |
---|
154 | /*-------------*/ |
---|