Thanks to Myles' patch adding support for include statements,
[coreboot.git] / src / mainboard / tyan / s2882 / Config.lb
1 include /config/nofailovercalculation.lb
2
3 arch i386 end 
4
5 ##
6 ## Build the objects we have code for in this directory.
7 ##
8
9 driver mainboard.o
10
11 #dir /drivers/si/3114
12
13 if HAVE_MP_TABLE object mptable.o end
14 if HAVE_PIRQ_TABLE object irq_tables.o end
15
16 if CONFIG_USE_INIT
17
18 makerule ./auto.o
19         depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
20         action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) -I$(TOP)/src -I. -nostdinc -nostdlib -fno-builtin -Wall -Os -c $(MAINBOARD)/cache_as_ram_auto.c -o $@"
21 end
22
23 else    
24                 
25 makerule ./auto.inc
26         depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
27         action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(TOP)/src -I. -nostdinc -nostdlib -fno-builtin -Wall -Os -c -S $(MAINBOARD)/cache_as_ram_auto.c -o $@"
28         action "perl -e 's/\.rodata/.rom.data/g' -pi $@"
29         action "perl -e 's/\.text/.section .rom.text/g' -pi $@"
30 end
31
32 end
33 ##
34 ## Build our 16 bit and 32 bit coreboot entry code
35 ##
36 if USE_FALLBACK_IMAGE
37         mainboardinit cpu/x86/16bit/entry16.inc
38         ldscript /cpu/x86/16bit/entry16.lds
39 end
40
41 mainboardinit cpu/x86/32bit/entry32.inc
42
43         if CONFIG_USE_INIT
44                 ldscript /cpu/x86/32bit/entry32.lds
45         end
46
47         if CONFIG_USE_INIT
48                 ldscript      /cpu/amd/car/cache_as_ram.lds
49         end
50
51 ##
52 ## Build our reset vector (This is where coreboot is entered)
53 ##
54 if USE_FALLBACK_IMAGE 
55         mainboardinit cpu/x86/16bit/reset16.inc 
56         ldscript /cpu/x86/16bit/reset16.lds 
57 else
58         mainboardinit cpu/x86/32bit/reset32.inc 
59         ldscript /cpu/x86/32bit/reset32.lds 
60 end
61
62 ##
63 ## Include an id string (For safe flashing)
64 ##
65 mainboardinit arch/i386/lib/id.inc
66 ldscript /arch/i386/lib/id.lds
67
68 ##
69 ## Setup Cache-As-Ram
70 ##
71 mainboardinit cpu/amd/car/cache_as_ram.inc
72
73 ###
74 ### This is the early phase of coreboot startup 
75 ### Things are delicate and we test to see if we should
76 ### failover to another image.
77 ###
78 if USE_FALLBACK_IMAGE
79        ldscript /arch/i386/lib/failover.lds
80 end
81
82 ###
83 ### O.k. We aren't just an intermediary anymore!
84 ###
85
86 ##
87 ## Setup RAM
88 ##
89 if CONFIG_USE_INIT
90 initobject auto.o
91 else
92 mainboardinit ./auto.inc
93 end
94
95 ##
96 ## Include the secondary Configuration files 
97 ##
98 config chip.h
99
100 # sample config for tyan/s2882
101 chip northbridge/amd/amdk8/root_complex
102         device apic_cluster 0 on
103                 chip cpu/amd/socket_940
104                         device apic 0 on end
105                 end
106         end
107
108         device pci_domain 0 on
109                 chip northbridge/amd/amdk8
110                         device pci 18.0 on #  northbridge 
111                                 #  devices on link 0, link 0 == LDT 0
112                                 chip southbridge/amd/amd8131
113                                         # the on/off keyword is mandatory
114                                         device pci 0.0 on
115                                                 chip drivers/pci/onboard 
116                                                         device pci 6.0 on end # adaptec
117                                                         device pci 6.1 on end
118                                                 end 
119                                                 chip drivers/pci/onboard
120                                                         device pci 9.0 on end # broadcom 5704
121                                                         device pci 9.1 on end
122                                                 end
123                                         end
124                                         device pci 0.1 on end
125                                         device pci 1.0 on end
126                                         device pci 1.1 on end
127                                 end
128                                 chip southbridge/amd/amd8111
129                                         # this "device pci 0.0" is the parent the next one
130                                         # PCI bridge
131                                         device pci 0.0 on
132                                                 device pci 0.0 on end
133                                                 device pci 0.1 on end
134                                                 device pci 0.2 off end
135                                                 device pci 1.0 off end
136                                                 chip drivers/pci/onboard  
137                                                         device pci 5.0 on end
138                                                 end
139                                         #       chip drivers/ati/ragexl
140                                                 chip drivers/pci/onboard
141                                                         device pci 6.0 on end
142                                                         register "rom_address" = "0xfff00000"
143                                                 end
144                                                 chip drivers/pci/onboard 
145                                                         device pci 8.0 on end #intel 10/100
146                                                 end
147                                         end
148                                         device pci 1.0 on
149                                                 chip superio/winbond/w83627hf
150                                                         device pnp 2e.0 on #  Floppy
151                                                                 io 0x60 = 0x3f0
152                                                                 irq 0x70 = 6
153                                                                 drq 0x74 = 2
154                                                         end
155                                                         device pnp 2e.1 off #  Parallel Port
156                                                                 io 0x60 = 0x378
157                                                                 irq 0x70 = 7
158                                                         end
159                                                         device pnp 2e.2 on #  Com1
160                                                                 io 0x60 = 0x3f8
161                                                                 irq 0x70 = 4
162                                                         end
163                                                         device pnp 2e.3 off #  Com2
164                                                                 io 0x60 = 0x2f8
165                                                                 irq 0x70 = 3
166                                                         end
167                                                         device pnp 2e.5 on #  Keyboard
168                                                                 io 0x60 = 0x60
169                                                                 io 0x62 = 0x64
170                                                                 irq 0x70 = 1
171                                                                 irq 0x72 = 12
172                                                         end
173                                                         device pnp 2e.6 off #  CIR
174                                                                 io 0x60 = 0x100
175                                                         end
176                                                         device pnp 2e.7 off #  GAME_MIDI_GIPO1
177                                                                 io 0x60 = 0x220
178                                                                 io 0x62 = 0x300
179                                                                 irq 0x70 = 9
180                                                         end  
181                                                         device pnp 2e.8 off end #  GPIO2
182                                                         device pnp 2e.9 off end #  GPIO3
183                                                         device pnp 2e.a off end #  ACPI
184                                                         device pnp 2e.b on #  HW Monitor
185                                                                 io 0x60 = 0x290
186                                                                 irq 0x70 = 5
187                                                         end
188                                                 end
189                                         end
190                                         device pci 1.1 on end
191                                         device pci 1.2 on end
192                                         device pci 1.3 on end
193                                         device pci 1.3 on 
194 #                                                chip drivers/generic/generic #dimm 0-0-0
195 #                                                        device i2c 50 on end
196 #                                                end
197 #                                                chip drivers/generic/generic #dimm 0-0-1
198 #                                                        device i2c 51 on end
199 #                                                end     
200 #                                                chip drivers/generic/generic #dimm 0-1-0
201 #                                                        device i2c 52 on end
202 #                                                end
203 #                                                chip drivers/generic/generic #dimm 0-1-1
204 #                                                        device i2c 53 on end
205 #                                                end
206 #                                                chip drivers/generic/generic #dimm 1-0-0
207 #                                                        device i2c 54 on end
208 #                                                end
209 #                                                chip drivers/generic/generic #dimm 1-0-1
210 #                                                        device i2c 55 on end
211 #                                                end
212 #                                                chip drivers/generic/generic #dimm 1-1-0
213 #                                                        device i2c 56 on end
214 #                                                end
215 #                                                chip drivers/generic/generic #dimm 1-1-1
216 #                                                        device i2c 57 on end
217 #                                                end
218                                         end # acpi
219                                         device pci 1.5 off end
220                                         device pci 1.6 off end
221                                         register "ide0_enable" = "1"
222                                         register "ide1_enable" = "1"
223                                 end
224                         end #  device pci 18.0 
225                         
226                         device pci 18.0 on end
227                         device pci 18.0 on end
228                         
229                         device pci 18.1 on end
230                         device pci 18.2 on end
231                         device pci 18.3 on end
232                 end # NB
233         end #pci_domain
234 end
235