Fix whitespace in tyan s289{1,2,5} files. Also removes some #if 0 and #if 1
[coreboot.git] / src / mainboard / tyan / s2892 / Config.lb
1 ##
2 ## Compute the location and size of where this firmware image
3 ## (coreboot plus bootloader) will live in the boot rom chip.
4 ##
5 if USE_FALLBACK_IMAGE
6         default ROM_SECTION_SIZE   = FALLBACK_SIZE
7         default ROM_SECTION_OFFSET = ( ROM_SIZE - FALLBACK_SIZE )
8 else
9         default ROM_SECTION_SIZE   = ( ROM_SIZE - FALLBACK_SIZE )
10         default ROM_SECTION_OFFSET = 0
11 end
12
13 ##
14 ## Compute the start location and size size of
15 ## The coreboot bootloader.
16 ##
17 default PAYLOAD_SIZE         = ( ROM_SECTION_SIZE - ROM_IMAGE_SIZE )
18 default CONFIG_ROM_PAYLOAD_START = (0xffffffff - ROM_SIZE + ROM_SECTION_OFFSET + 1)
19 default CONFIG_ROM_PAYLOAD       = 1
20
21 ##
22 ## Compute where this copy of coreboot will start in the boot rom
23 ##
24 default _ROMBASE      = ( CONFIG_ROM_PAYLOAD_START + PAYLOAD_SIZE )
25
26 ##
27 ## Compute a range of ROM that can cached to speed up coreboot,
28 ## execution speed.
29 ##
30 ## XIP_ROM_SIZE must be a power of 2.
31 ## XIP_ROM_BASE must be a multiple of XIP_ROM_SIZE
32 ##
33 default XIP_ROM_SIZE=65536
34 default XIP_ROM_BASE = ( _ROMBASE + ROM_IMAGE_SIZE - XIP_ROM_SIZE )
35
36 arch i386 end
37
38
39 ##
40 ## Build the objects we have code for in this directory.
41 ##
42
43 driver mainboard.o
44
45 #dir /drivers/ati/ragexl
46
47 #needed by irq_tables and mptable and acpi_tables
48 object get_bus_conf.o
49
50 if HAVE_MP_TABLE object mptable.o end
51 if HAVE_PIRQ_TABLE object irq_tables.o end
52 #object reset.o
53
54 if USE_DCACHE_RAM
55
56 if CONFIG_USE_INIT
57         makerule ./auto.o
58                 depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
59                 action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o auto.o"
60         end
61 else
62         makerule ./auto.inc
63                 depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
64                 action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -S -o $@"
65                 action "perl -e 's/.rodata/.rom.data/g' -pi $@"
66                 action "perl -e 's/.text/.section .rom.text/g' -pi $@"
67         end
68 end
69
70 else
71         ##
72         ## Romcc output
73         ##
74         makerule ./failover.E
75                 depends "$(MAINBOARD)/failover.c ../romcc"
76                 action "../romcc -E -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/failover.c -o $@"
77         end
78
79         makerule ./failover.inc
80                 depends "$(MAINBOARD)/failover.c ../romcc"
81                 action "../romcc    -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/failover.c -o $@"
82         end
83
84         makerule ./auto.E
85                 depends "$(MAINBOARD)/auto.c option_table.h ../romcc"
86                 action  "../romcc -E -mcpu=k8 -O2 -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/auto.c -o $@"
87         end
88
89         makerule ./auto.inc
90                 depends "$(MAINBOARD)/auto.c option_table.h ../romcc"
91                 action  "../romcc    -mcpu=k8 -O2 -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/auto.c -o $@"
92         end
93
94 end
95
96 ##
97 ## Build our 16 bit and 32 bit coreboot entry code
98 ##
99 if USE_FALLBACK_IMAGE
100         mainboardinit cpu/x86/16bit/entry16.inc
101         ldscript /cpu/x86/16bit/entry16.lds
102 end
103
104 mainboardinit cpu/x86/32bit/entry32.inc
105
106 if USE_DCACHE_RAM
107         if CONFIG_USE_INIT
108                 ldscript /cpu/x86/32bit/entry32.lds
109         end
110
111         if CONFIG_USE_INIT
112                 ldscript /cpu/amd/car/cache_as_ram.lds
113         end
114 end
115
116 ##
117 ## Build our reset vector (This is where coreboot is entered)
118 ##
119 if USE_FALLBACK_IMAGE
120         mainboardinit cpu/x86/16bit/reset16.inc
121         ldscript /cpu/x86/16bit/reset16.lds
122 else
123         mainboardinit cpu/x86/32bit/reset32.inc
124         ldscript /cpu/x86/32bit/reset32.lds
125 end
126
127 if USE_DCACHE_RAM
128 else
129         ### Should this be in the northbridge code?
130         mainboardinit arch/i386/lib/cpu_reset.inc
131 end
132
133 ##
134 ## Include an id string (For safe flashing)
135 ##
136 mainboardinit southbridge/nvidia/ck804/id.inc
137 ldscript /southbridge/nvidia/ck804/id.lds
138
139 ##
140 ## ROMSTRAP table for CK804
141 ##
142 if USE_FALLBACK_IMAGE
143         mainboardinit southbridge/nvidia/ck804/romstrap.inc
144         ldscript /southbridge/nvidia/ck804/romstrap.lds
145 end
146
147 if USE_DCACHE_RAM
148         ##
149         ## Setup Cache-As-Ram
150         ##
151         mainboardinit cpu/amd/car/cache_as_ram.inc
152 end
153
154 ###
155 ### This is the early phase of coreboot startup
156 ### Things are delicate and we test to see if we should
157 ### failover to another image.
158 ###
159 if USE_FALLBACK_IMAGE
160         if USE_DCACHE_RAM
161                 ldscript /arch/i386/lib/failover.lds
162         else
163                 ldscript /arch/i386/lib/failover.lds
164                 mainboardinit ./failover.inc
165         end
166 end
167
168 ###
169 ### O.k. We aren't just an intermediary anymore!
170 ###
171
172 ##
173 ## Setup RAM
174 ##
175 if USE_DCACHE_RAM
176
177         if CONFIG_USE_INIT
178                 initobject auto.o
179         else
180                 mainboardinit ./auto.inc
181         end
182
183 else
184         # ROMCC
185         mainboardinit cpu/x86/fpu/enable_fpu.inc
186         mainboardinit cpu/x86/mmx/enable_mmx.inc
187         mainboardinit cpu/x86/sse/enable_sse.inc
188         mainboardinit ./auto.inc
189         mainboardinit cpu/x86/sse/disable_sse.inc
190         mainboardinit cpu/x86/mmx/disable_mmx.inc
191
192 end
193
194 ##
195 ## Include the secondary Configuration files
196 ##
197 if CONFIG_CHIP_NAME
198         config chip.h
199 end
200
201 # sample config for tyan/s2892
202 chip northbridge/amd/amdk8/root_complex
203         device apic_cluster 0 on
204                 chip cpu/amd/socket_940
205                         device apic 0 on end
206                 end
207         end
208         device pci_domain 0 on
209                 chip northbridge/amd/amdk8 #mc0
210                         device pci 18.0 on #  northbridge
211                                 #  devices on link 0, link 0 == LDT 0
212                                 chip southbridge/nvidia/ck804
213                                         device pci 0.0 on end   # HT
214                                         device pci 1.0 on # LPC
215                                                 chip superio/winbond/w83627hf
216                                                         device pnp 2e.0 on #  Floppy
217                                                                 io 0x60 = 0x3f0
218                                                                 irq 0x70 = 6
219                                                                 drq 0x74 = 2
220                                                         end
221                                                         device pnp 2e.1 off #  Parallel Port
222                                                                 io 0x60 = 0x378
223                                                                 irq 0x70 = 7
224                                                         end
225                                                         device pnp 2e.2 on #  Com1
226                                                                 io 0x60 = 0x3f8
227                                                                 irq 0x70 = 4
228                                                         end
229                                                         device pnp 2e.3 off #  Com2
230                                                                 io 0x60 = 0x2f8
231                                                                 irq 0x70 = 3
232                                                         end
233                                                         device pnp 2e.5 on #  Keyboard
234                                                                 io 0x60 = 0x60
235                                                                 io 0x62 = 0x64
236                                                                 irq 0x70 = 1
237                                                                 irq 0x72 = 12
238                                                         end
239                                                         device pnp 2e.6 off #  CIR
240                                                                 io 0x60 = 0x100
241                                                         end
242                                                         device pnp 2e.7 off #  GAME_MIDI_GIPO1
243                                                                 io 0x60 = 0x220
244                                                                 io 0x62 = 0x300
245                                                                 irq 0x70 = 9
246                                                         end
247                                                         device pnp 2e.8 off end #  GPIO2
248                                                         device pnp 2e.9 off end #  GPIO3
249                                                         device pnp 2e.a off end #  ACPI
250                                                         device pnp 2e.b on #  HW Monitor
251                                                                 io 0x60 = 0x290
252                                                                 irq 0x70 = 5
253                                                         end
254                                                 end
255                                         end
256                                         device pci 1.1 on # SM 0
257                                                 chip drivers/generic/generic #dimm 0-0-0
258                                                         device i2c 50 on end
259                                                 end
260                                                 chip drivers/generic/generic #dimm 0-0-1
261                                                         device i2c 51 on end
262                                                 end
263                                                 chip drivers/generic/generic #dimm 0-1-0
264                                                         device i2c 52 on end
265                                                 end
266                                                 chip drivers/generic/generic #dimm 0-1-1
267                                                         device i2c 53 on end
268                                                 end
269                                                 chip drivers/generic/generic #dimm 1-0-0
270                                                         device i2c 54 on end
271                                                 end
272                                                 chip drivers/generic/generic #dimm 1-0-1
273                                                         device i2c 55 on end
274                                                 end
275                                                 chip drivers/generic/generic #dimm 1-1-0
276                                                         device i2c 56 on end
277                                                 end
278                                                 chip drivers/generic/generic #dimm 1-1-1
279                                                         device i2c 57 on end
280                                                 end
281                                         end # SM
282                                         device pci 1.1 on # SM 1
283                                                 chip drivers/i2c/adm1027 # ADT7463A CPU0 temp, SYS FAN 2/3/4
284                                                         device i2c 2d on end
285                                                 end
286                                                 chip drivers/i2c/adm1027 # ADT7463A CPU1 temp, CPU0/1 FAN , SYS FAN 1/5
287                                                         device i2c 2e on end
288                                                 end
289                                                 chip drivers/generic/generic # Winbond HWM 0x54 CPU0/1 VRM temp, SYSFAN 6/7, SB FAN
290                                                         device i2c 2a on end
291                                                 end
292                                                 chip drivers/generic/generic # Winbond HWM 0x92
293                                                         device i2c 49 on end
294                                                 end
295                                                 chip drivers/generic/generic # Winbond HWM 0x94
296                                                         device i2c 4a on end
297                                                 end
298                                         end #SM
299                                         device pci 2.0 on end # USB 1.1
300                                         device pci 2.1 on end # USB 2
301                                         device pci 4.0 off end # ACI
302                                         device pci 4.1 off end # MCI
303                                         device pci 6.0 on end # IDE
304                                         device pci 7.0 on end # SATA 1
305                                         device pci 8.0 on end # SATA 0
306                                         device pci 9.0 on  # PCI
307                                         #       chip drivers/ati/ragexl
308                                                 chip drivers/pci/onboard
309                                                         device pci 6.0 on end
310                                                         register "rom_address" = "0xfff80000"
311                                                 end
312                                                 chip drivers/pci/onboard
313                                                         device pci 8.0 on end
314                                                 end
315                                         end
316                                         device pci a.0 off end # NIC
317                                         device pci b.0 off end # PCI E 3
318                                         device pci c.0 off end # PCI E 2
319                                         device pci d.0 on end # PCI E 1
320                                         device pci e.0 on end # PCI E 0
321                                         register "ide0_enable" = "1"
322                                         register "ide1_enable" = "1"
323                                         register "sata0_enable" = "1"
324                                         register "sata1_enable" = "1"
325                                 end
326                         end #  device pci 18.0
327                         device pci 18.0 on end # Link 1
328                         device pci 18.0 on
329                         #  devices on link 2, link 2 == LDT 2
330                                 chip southbridge/amd/amd8131
331                                         # the on/off keyword is mandatory
332                                         device pci 0.0 on end
333                                         device pci 0.1 on end
334                                         device pci 1.0 on
335                                                 chip drivers/pci/onboard
336                                                         device pci 9.0 on end # broadcom 5704
337                                                         device pci 9.1 on end
338                                                 end
339                                         end
340                                         device pci 1.1 on end
341                                 end
342                         end # device pci 18.0
343                         device pci 18.1 on end
344                         device pci 18.2 on end
345                         device pci 18.3 on end
346                 end #mc0
347
348         end # pci_domain
349
350 #       chip drivers/generic/debug
351 #               device pnp 0.0 off end
352 #               device pnp 0.1 off end
353 #               device pnp 0.2 off end
354 #               device pnp 0.3 off end
355 #               device pnp 0.4 off end
356 #               device pnp 0.5 on end
357 #       end
358 end # root_complex