45672e99c6f295a6e5afb43c9deee0695b8286cc
[coreboot.git] / src / mainboard / tyan / s2892 / Config.lb
1 ## XIP_ROM_SIZE must be a power of 2.
2 default XIP_ROM_SIZE = 64 * 1024
3 include /config/nofailovercalculation.lb
4 default CONFIG_ROM_PAYLOAD = 1
5
6 arch i386 end
7
8
9 ##
10 ## Build the objects we have code for in this directory.
11 ##
12
13 driver mainboard.o
14
15 #dir /drivers/ati/ragexl
16
17 #needed by irq_tables and mptable and acpi_tables
18 object get_bus_conf.o
19
20 if HAVE_MP_TABLE object mptable.o end
21 if HAVE_PIRQ_TABLE object irq_tables.o end
22 #object reset.o
23
24 if HAVE_ACPI_TABLES
25         object acpi_tables.o
26         makerule dsdt.c
27                 depends "$(MAINBOARD)/dsdt.dsl"
28                 action  "iasl -p $(CURDIR)/dsdt -tc $(MAINBOARD)/dsdt.dsl"
29                 action  "mv dsdt.hex dsdt.c"
30         end
31         object ./dsdt.o
32         #./ssdt.o is moved to northbridge/amd/amdk8/Config.lb
33         #./fadt.o is moved to southbridge/nvidia/ck804/Config.lb
34 end
35
36 if CONFIG_USE_INIT
37         makerule ./auto.o
38                 depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
39                 action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) -I$(TOP)/src -I. -c $(MAINBOARD)/cache_as_ram_auto.c -o $@"
40         end
41 else
42         makerule ./auto.inc
43                 depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
44                 action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(TOP)/src -I. -c -S $(MAINBOARD)/cache_as_ram_auto.c -o $@"
45                 action "perl -e 's/\.rodata/.rom.data/g' -pi $@"
46                 action "perl -e 's/\.text/.section .rom.text/g' -pi $@"
47         end
48 end
49
50 ##
51 ## Build our 16 bit and 32 bit coreboot entry code
52 ##
53 if USE_FALLBACK_IMAGE
54         mainboardinit cpu/x86/16bit/entry16.inc
55         ldscript /cpu/x86/16bit/entry16.lds
56 end
57
58 mainboardinit cpu/x86/32bit/entry32.inc
59
60         if CONFIG_USE_INIT
61                 ldscript /cpu/x86/32bit/entry32.lds
62         end
63
64         if CONFIG_USE_INIT
65                 ldscript /cpu/amd/car/cache_as_ram.lds
66         end
67
68 ##
69 ## Build our reset vector (This is where coreboot is entered)
70 ##
71 if USE_FALLBACK_IMAGE
72         mainboardinit cpu/x86/16bit/reset16.inc
73         ldscript /cpu/x86/16bit/reset16.lds
74 else
75         mainboardinit cpu/x86/32bit/reset32.inc
76         ldscript /cpu/x86/32bit/reset32.lds
77 end
78
79 ##
80 ## Include an id string (For safe flashing)
81 ##
82 mainboardinit southbridge/nvidia/ck804/id.inc
83 ldscript /southbridge/nvidia/ck804/id.lds
84
85 ##
86 ## ROMSTRAP table for CK804
87 ##
88 if USE_FALLBACK_IMAGE
89         mainboardinit southbridge/nvidia/ck804/romstrap.inc
90         ldscript /southbridge/nvidia/ck804/romstrap.lds
91 end
92
93         ##
94         ## Setup Cache-As-Ram
95         ##
96         mainboardinit cpu/amd/car/cache_as_ram.inc
97
98 ###
99 ### This is the early phase of coreboot startup
100 ### Things are delicate and we test to see if we should
101 ### failover to another image.
102 ###
103 if USE_FALLBACK_IMAGE
104                 ldscript /arch/i386/lib/failover.lds
105 end
106
107 ###
108 ### O.k. We aren't just an intermediary anymore!
109 ###
110
111 ##
112 ## Setup RAM
113 ##
114         if CONFIG_USE_INIT
115                 initobject auto.o
116         else
117                 mainboardinit ./auto.inc
118         end
119
120 ##
121 ## Include the secondary Configuration files
122 ##
123 config chip.h
124
125 # sample config for tyan/s2892
126 chip northbridge/amd/amdk8/root_complex
127         device apic_cluster 0 on
128                 chip cpu/amd/socket_940
129                         device apic 0 on end
130                 end
131         end
132         device pci_domain 0 on
133                 chip northbridge/amd/amdk8 #mc0
134                         device pci 18.0 on #  northbridge
135                                 #  devices on link 0, link 0 == LDT 0
136                                 chip southbridge/nvidia/ck804
137                                         device pci 0.0 on end   # HT
138                                         device pci 1.0 on # LPC
139                                                 chip superio/winbond/w83627hf
140                                                         device pnp 2e.0 on #  Floppy
141                                                                 io 0x60 = 0x3f0
142                                                                 irq 0x70 = 6
143                                                                 drq 0x74 = 2
144                                                         end
145                                                         device pnp 2e.1 on #  Parallel Port
146                                                                 io 0x60 = 0x378
147                                                                 irq 0x70 = 7
148                                                                 drq 0x74 = 3
149                                                         end
150                                                         device pnp 2e.2 on #  Com1
151                                                                 io 0x60 = 0x3f8
152                                                                 irq 0x70 = 4
153                                                         end
154                                                         device pnp 2e.3 off #  Com2
155                                                                 io 0x60 = 0x2f8
156                                                                 irq 0x70 = 3
157                                                         end
158                                                         device pnp 2e.5 on #  Keyboard
159                                                                 io 0x60 = 0x60
160                                                                 io 0x62 = 0x64
161                                                                 irq 0x70 = 1
162                                                                 irq 0x72 = 12
163                                                         end
164                                                         device pnp 2e.6 off #  CIR
165                                                                 io 0x60 = 0x100
166                                                         end
167                                                         device pnp 2e.7 off #  GAME_MIDI_GIPO1
168                                                                 io 0x60 = 0x220
169                                                                 io 0x62 = 0x300
170                                                                 irq 0x70 = 9
171                                                         end
172                                                         device pnp 2e.8 off end #  GPIO2
173                                                         device pnp 2e.9 off end #  GPIO3
174                                                         device pnp 2e.a off end #  ACPI
175                                                         device pnp 2e.b on #  HW Monitor
176                                                                 io 0x60 = 0x290
177                                                                 irq 0x70 = 5
178                                                         end
179                                                 end
180                                         end
181                                         device pci 1.1 on # SM 0
182                                                 chip drivers/generic/generic #dimm 0-0-0
183                                                         device i2c 50 on end
184                                                 end
185                                                 chip drivers/generic/generic #dimm 0-0-1
186                                                         device i2c 51 on end
187                                                 end
188                                                 chip drivers/generic/generic #dimm 0-1-0
189                                                         device i2c 52 on end
190                                                 end
191                                                 chip drivers/generic/generic #dimm 0-1-1
192                                                         device i2c 53 on end
193                                                 end
194                                                 chip drivers/generic/generic #dimm 1-0-0
195                                                         device i2c 54 on end
196                                                 end
197                                                 chip drivers/generic/generic #dimm 1-0-1
198                                                         device i2c 55 on end
199                                                 end
200                                                 chip drivers/generic/generic #dimm 1-1-0
201                                                         device i2c 56 on end
202                                                 end
203                                                 chip drivers/generic/generic #dimm 1-1-1
204                                                         device i2c 57 on end
205                                                 end
206                                         end # SM
207                                         device pci 1.1 on # SM 1
208                                                 chip drivers/i2c/adm1027 # ADT7463A CPU0 temp, SYS FAN 2/3/4
209                                                         device i2c 2d on end
210                                                 end
211                                                 chip drivers/i2c/adm1027 # ADT7463A CPU1 temp, CPU0/1 FAN , SYS FAN 1/5
212                                                         device i2c 2e on end
213                                                 end
214                                                 chip drivers/generic/generic # Winbond HWM 0x54 CPU0/1 VRM temp, SYSFAN 6/7, SB FAN
215                                                         device i2c 2a on end
216                                                 end
217                                                 chip drivers/generic/generic # Winbond HWM 0x92
218                                                         device i2c 49 on end
219                                                 end
220                                                 chip drivers/generic/generic # Winbond HWM 0x94
221                                                         device i2c 4a on end
222                                                 end
223                                         end #SM
224                                         device pci 2.0 on end # USB 1.1
225                                         device pci 2.1 on end # USB 2
226                                         device pci 4.0 off end # ACI
227                                         device pci 4.1 off end # MCI
228                                         device pci 6.0 on end # IDE
229                                         device pci 7.0 on end # SATA 1
230                                         device pci 8.0 on end # SATA 0
231                                         device pci 9.0 on  # PCI
232                                         #       chip drivers/ati/ragexl
233                                                 chip drivers/pci/onboard
234                                                         device pci 6.0 on end
235                                                         register "rom_address" = "0xfff80000"
236                                                 end
237                                                 chip drivers/pci/onboard
238                                                         device pci 8.0 on end
239                                                 end
240                                         end
241                                         device pci a.0 off end # NIC
242                                         device pci b.0 off end # PCI E 3
243                                         device pci c.0 off end # PCI E 2
244                                         device pci d.0 on end # PCI E 1
245                                         device pci e.0 on end # PCI E 0
246                                         register "ide0_enable" = "1"
247                                         register "ide1_enable" = "1"
248                                         register "sata0_enable" = "1"
249                                         register "sata1_enable" = "1"
250                                 end
251                         end #  device pci 18.0
252                         device pci 18.0 on end # Link 1
253                         device pci 18.0 on
254                         #  devices on link 2, link 2 == LDT 2
255                                 chip southbridge/amd/amd8131
256                                         # the on/off keyword is mandatory
257                                         device pci 0.0 on end
258                                         device pci 0.1 on end
259                                         device pci 1.0 on
260                                                 chip drivers/pci/onboard
261                                                         device pci 9.0 on end # broadcom 5704
262                                                         device pci 9.1 on end
263                                                 end
264                                         end
265                                         device pci 1.1 on end
266                                 end
267                         end # device pci 18.0
268                         device pci 18.1 on end
269                         device pci 18.2 on end
270                         device pci 18.3 on end
271                 end #mc0
272
273         end # pci_domain
274
275 #       chip drivers/generic/debug
276 #               device pnp 0.0 off end
277 #               device pnp 0.1 off end
278 #               device pnp 0.2 off end
279 #               device pnp 0.3 off end
280 #               device pnp 0.4 off end
281 #               device pnp 0.5 on end
282 #       end
283 end # root_complex