Thanks to Myles' patch adding support for include statements,
[coreboot.git] / src / mainboard / msi / ms9282 / Config.lb
1 ##
2 ## This file is part of the coreboot project.
3 ##
4 ## Copyright (C) 2006 AMD
5 ## Written by Yinghai Lu <yinghailu@gmail.com> for AMD.
6 ##
7 ## Copyright (C) 2006 MSI
8 ## Written by Bingxun Shi <bingxunshi@gmail.com> for MSI.
9 ##
10 ## This program is free software; you can redistribute it and/or modify
11 ## it under the terms of the GNU General Public License as published by
12 ## the Free Software Foundation; either version 2 of the License, or
13 ## (at your option) any later version.
14 ##
15 ## This program is distributed in the hope that it will be useful,
16 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 ## GNU General Public License for more details.
19 ##
20 ## You should have received a copy of the GNU General Public License
21 ## along with this program; if not, write to the Free Software
22 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
23 ##
24
25 include /config/nofailovercalculation.lb
26 default CONFIG_ROM_PAYLOAD = 1
27
28 arch i386 end
29
30
31 ##
32 ## Build the objects we have code for in this directory.
33 ##
34
35 driver mainboard.o
36
37 #dir /drivers/ati/ragexl
38 #needed by irq_tables and mptable and acpi_tables
39 object get_bus_conf.o
40
41
42 if HAVE_MP_TABLE object mptable.o end
43 if HAVE_PIRQ_TABLE object irq_tables.o end
44 #object reset.o
45
46 if CONFIG_USE_INIT
47
48 makerule ./auto.o
49         depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
50         action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) -I$(TOP)/src -I. -nostdinc -nostdlib -fno-builtin -Wall -Os -c $(MAINBOARD)/cache_as_ram_auto.c -o $@"
51 end
52
53 else
54
55 makerule ./auto.inc
56         depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
57         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 $@"
58        action "perl -e 's/\.rodata/.rom.data/g' -pi $@"
59        action "perl -e 's/\.text/.section .rom.text/g' -pi $@"
60 end
61
62 end
63
64 ##
65 ## Build our 16 bit and 32 bit coreboot entry code
66 ##
67 if USE_FALLBACK_IMAGE
68         mainboardinit cpu/x86/16bit/entry16.inc
69         ldscript /cpu/x86/16bit/entry16.lds
70 end
71
72 mainboardinit cpu/x86/32bit/entry32.inc
73
74        if CONFIG_USE_INIT
75                ldscript /cpu/x86/32bit/entry32.lds
76        end
77
78        if CONFIG_USE_INIT
79                ldscript      /cpu/amd/car/cache_as_ram.lds
80        end
81
82 ##
83 ## Build our reset vector (This is where coreboot is entered)
84 ##
85 if USE_FALLBACK_IMAGE
86        mainboardinit cpu/x86/16bit/reset16.inc
87        ldscript /cpu/x86/16bit/reset16.lds
88 else
89        mainboardinit cpu/x86/32bit/reset32.inc
90        ldscript /cpu/x86/32bit/reset32.lds
91 end
92
93 ##
94 ## Include an id string (For safe flashing)
95 ##
96 mainboardinit southbridge/nvidia/mcp55/id.inc
97 ldscript /southbridge/nvidia/mcp55/id.lds
98
99 ##
100 ## ROMSTRAP table for MCP55
101 ##
102 if USE_FALLBACK_IMAGE
103        mainboardinit southbridge/nvidia/mcp55/romstrap.inc
104        ldscript /southbridge/nvidia/mcp55/romstrap.lds
105 end
106
107 ##
108 ## Setup Cache-As-Ram
109 ##
110 mainboardinit cpu/amd/car/cache_as_ram.inc
111
112 ###
113 ### This is the early phase of coreboot startup
114 ### Things are delicate and we test to see if we should
115 ### failover to another image.
116 ###
117 if USE_FALLBACK_IMAGE
118        ldscript /arch/i386/lib/failover.lds
119 end
120
121 ###
122 ### O.k. We aren't just an intermediary anymore!
123 ###
124
125 ##
126 ## Setup RAM
127 ##
128 if CONFIG_USE_INIT
129 initobject auto.o
130 else
131 mainboardinit ./auto.inc
132 end
133
134 ##
135 ## Include the secondary Configuration files
136 ##
137 config chip.h
138
139
140 # sample config for msi/ms9282
141 chip northbridge/amd/amdk8/root_complex
142         device apic_cluster 0 on
143                 chip cpu/amd/socket_F
144                         device apic 0 on end
145                 end
146         end
147
148        device pci_domain 0 on
149                chip northbridge/amd/amdk8 #mc0
150                        device pci 18.0 on #  northbridge
151                                #  devices on link 0, link 0 == LDT 0
152                                chip southbridge/nvidia/mcp55
153                                        device pci 0.0 on end   # HT
154                                        device pci 1.0 on # LPC
155                                                chip superio/winbond/w83627ehg
156                                                        device pnp 2e.0 on #  Floppy
157                                                                io 0x60 = 0x3f0
158                                                                irq 0x70 = 6
159                                                                drq 0x74 = 2
160                                                        end
161                                                        device pnp 2e.1 off #  Parallel Port
162                                                                io 0x60 = 0x378
163                                                                irq 0x70 = 7
164                                                        end
165                                                        device pnp 2e.2 on #  Com1
166                                                                io 0x60 = 0x3f8
167                                                                irq 0x70 = 4
168                                                        end
169                                                        device pnp 2e.3 off #  Com2
170                                                                io 0x60 = 0x2f8
171                                                                irq 0x70 = 3
172                                                        end
173                                                        device pnp 2e.5 on #  Keyboard
174                                                                io 0x60 = 0x60
175                                                                io 0x62 = 0x64
176                                                                irq 0x70 = 1
177                                                                irq 0x72 = 12
178                                                        end
179                                                        device pnp 2e.6 off #  SERIAL_FALSH
180                                                                io 0x60 = 0x100
181                                                        end
182                                                        device pnp 2e.7 off #  GAME_MIDI_GIPO1
183                                                                io 0x60 = 0x220
184                                                                io 0x62 = 0x300
185                                                                irq 0x70 = 9
186                                                        end
187                                                        device pnp 2e.8 off end #  WDTO_PLED
188                                                        device pnp 2e.9 off end #  GPIO2_GPIO3_GPIO4_GPIO5
189                                                        device pnp 2e.a off end #  ACPI
190                                                        device pnp 2e.b on #  HW Monitor
191                                                                io 0x60 = 0x290
192                                                                irq 0x70 = 5
193                                                        end
194                                                end
195                                        end
196                                         device pci 1.1 on # SM 0
197                                                chip drivers/i2c/i2cmux2 # pca9554 smbus mux
198                                                        device i2c 70 on  #0 pca9554 1
199                                                                chip drivers/generic/generic #dimm 0-0-0
200                                                                         device i2c 50 on end
201                                                                 end
202                                                                 chip drivers/generic/generic #dimm 0-0-1
203                                                                         device i2c 51 on end
204                                                                 end
205                                                                 chip drivers/generic/generic #dimm 0-1-0
206                                                                         device i2c 52 on end
207                                                                 end
208                                                                 chip drivers/generic/generic #dimm 0-1-1
209                                                                         device i2c 53 on end
210                                                                 end
211                                                                chip drivers/generic/generic #dimm 0-0-0
212                                                                         device i2c 54 on end
213                                                                 end
214                                                                 chip drivers/generic/generic #dimm 0-0-1
215                                                                         device i2c 55 on end
216                                                                 end
217                                                                 chip drivers/generic/generic #dimm 0-1-0
218                                                                         device i2c 56 on end
219                                                                 end
220                                                                 chip drivers/generic/generic #dimm 0-1-1
221                                                                         device i2c 57 on end
222                                                                 end
223                                                        end
224                                                        device i2c 70 on  #0 pca9554 2
225                                                                chip drivers/generic/generic #dimm 0-0-0
226                                                                         device i2c 50 on end
227                                                                 end
228                                                                 chip drivers/generic/generic #dimm 0-0-1
229                                                                         device i2c 51 on end
230                                                                 end
231                                                                 chip drivers/generic/generic #dimm 0-1-0
232                                                                         device i2c 52 on end
233                                                                 end
234                                                                 chip drivers/generic/generic #dimm 0-1-1
235                                                                         device i2c 53 on end
236                                                                 end
237                                                                chip drivers/generic/generic #dimm 0-0-0
238                                                                         device i2c 54 on end
239                                                                 end
240                                                                 chip drivers/generic/generic #dimm 0-0-1
241                                                                         device i2c 55 on end
242                                                                 end
243                                                                 chip drivers/generic/generic #dimm 0-1-0
244                                                                         device i2c 56 on end
245                                                                 end
246                                                                 chip drivers/generic/generic #dimm 0-1-1
247                                                                         device i2c 57 on end
248                                                                 end
249                                                        end
250                                                end
251                                        end
252                                        device pci 1.1 on # SM 1
253                                                chip drivers/i2c/i2cmux2 # pca9554 smbus mux
254                                                        device i2c 72 on     #pca9554 channle1
255                                                                chip drivers/i2c/adm1027   #HWM ADT7476 1
256                                                                        device i2c 2e on end
257                                                                end
258                                                        end
259                                                        device i2c 72 on     #pca9545 channel 2
260                                                                chip drivers/i2c/adm1027   #HWM ADT7463
261                                                                        device i2c 2e on end
262                                                                end
263                                                        end
264                                                        device i2c 72 on end  #pca9545 channel 3
265                                                        device i2c 72 on      #pca9545 channel 4
266                                                                chip drivers/i2c/adm1027   #HWM ADT7476 2
267                                                                        device i2c 2e on end
268                                                                end
269                                                        end
270                                                end
271                                        end
272
273                                        device pci 2.0 on end # USB 1.1
274                                        device pci 2.1 on end # USB 2
275                                        device pci 4.0 on  end # IDE
276                                                device pci 5.0 on  end # SATA 0
277                                        device pci 5.1 on  end # SATA 1
278                                        device pci 5.2 on  end # SATA 2
279                                        device pci 6.0 on  #P2P
280                                                chip drivers/pci/onboard
281                                                        device pci 4.0 on end
282                                                        register "rom_address" = "0xfff80000"
283                                                end
284                                        end # P2P
285                                        device pci 7.0 on end # reserve
286                                        device pci 8.0 on end # MAC0
287                                        device pci 9.0 on end # MAC1
288                                        device pci a.0 on
289                                                device pci 0.0 on
290                                                        chip drivers/pci/onboard
291                                                                device pci 4.0 on end  #pci_E lan1
292                                                                device pci 4.1 on end  #pci_E lan2
293                                                        end
294                                                end
295                                        end # 0x376
296                                                device pci b.0 on  end # PCI E 0x374
297                                        device pci c.0 on  end
298                                        device pci d.0 on   #SAS
299                                                chip drivers/pci/onboard
300                                                        device pci 0.0 on end
301                                                end
302                                        end # PCI E 1 0x378
303                                        device pci e.0 on end # PCI E 0 0x375
304                                        device pci f.0 on end   #PCI E 0x377  pci_E slot
305                                        register "ide0_enable" = "1"
306                                        register "ide1_enable" = "1"
307                                        register "sata0_enable" = "1"
308                                        register "sata1_enable" = "1"
309                                end
310                        end #  device pci 18.0
311                        device pci 18.0 on end # Link 1
312                        device pci 18.0 on end
313                        device pci 18.1 on end
314                        device pci 18.2 on end
315                        device pci 18.3 on end
316                end #mc0
317
318        end # pci_domain
319
320 #        chip drivers/generic/debug
321 #                device pnp 0.0 off end
322 #                device pnp 0.1 off end
323 #                device pnp 0.2 off end
324 #                device pnp 0.3 off end
325 #                device pnp 0.4 off end
326 #              device pnp 0.5 on end
327 #        end
328 end # root_complex