1ecfee7d28b0144eea06a4754cc86d96940a1fd9
[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 ##
26 ## Compute the location and size of where this firmware image
27 ## (coreboot plus bootloader) will live in the boot rom chip.
28 ##
29 if USE_FALLBACK_IMAGE
30        default ROM_SECTION_SIZE   = FALLBACK_SIZE
31        default ROM_SECTION_OFFSET = ( ROM_SIZE - FALLBACK_SIZE )
32 else
33        default ROM_SECTION_SIZE   = ( ROM_SIZE - FALLBACK_SIZE )
34        default ROM_SECTION_OFFSET = 0
35 end
36
37 ##
38 ## Compute the start location and size size of
39 ## The coreboot bootloader.
40 ##
41 default PAYLOAD_SIZE            = ( ROM_SECTION_SIZE - ROM_IMAGE_SIZE )
42 default CONFIG_ROM_PAYLOAD_START = (0xffffffff - ROM_SIZE + ROM_SECTION_OFFSET + 1)
43 default CONFIG_ROM_PAYLOAD     = 1
44
45 ##
46 ## Compute where this copy of coreboot will start in the boot rom
47 ##
48 default _ROMBASE      = ( CONFIG_ROM_PAYLOAD_START + PAYLOAD_SIZE )
49
50 ##
51 ## Compute a range of ROM that can cached to speed up coreboot,
52 ## execution speed.
53 ##
54 ## XIP_ROM_SIZE must be a power of 2.
55 ## XIP_ROM_BASE must be a multiple of XIP_ROM_SIZE
56 ##
57 default XIP_ROM_SIZE=65536
58 default XIP_ROM_BASE = ( _ROMBASE + ROM_IMAGE_SIZE - XIP_ROM_SIZE )
59
60 arch i386 end
61
62
63 ##
64 ## Build the objects we have code for in this directory.
65 ##
66
67 driver mainboard.o
68
69 #dir /drivers/ati/ragexl
70 #needed by irq_tables and mptable and acpi_tables
71 object get_bus_conf.o
72
73
74 if HAVE_MP_TABLE object mptable.o end
75 if HAVE_PIRQ_TABLE object irq_tables.o end
76 #object reset.o
77
78 if CONFIG_USE_INIT
79
80 makerule ./auto.o
81         depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
82         action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) -I$(TOP)/src -I. -nostdinc -nostdlib -fno-builtin -Wall -Os -c $(MAINBOARD)/cache_as_ram_auto.c -o $@"
83 end
84
85 else
86
87 makerule ./auto.inc
88         depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
89         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 $@"
90        action "perl -e 's/\.rodata/.rom.data/g' -pi $@"
91        action "perl -e 's/\.text/.section .rom.text/g' -pi $@"
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 CONFIG_USE_INIT
107                ldscript /cpu/x86/32bit/entry32.lds
108        end
109
110        if CONFIG_USE_INIT
111                ldscript      /cpu/amd/car/cache_as_ram.lds
112        end
113
114 ##
115 ## Build our reset vector (This is where coreboot is entered)
116 ##
117 if USE_FALLBACK_IMAGE
118        mainboardinit cpu/x86/16bit/reset16.inc
119        ldscript /cpu/x86/16bit/reset16.lds
120 else
121        mainboardinit cpu/x86/32bit/reset32.inc
122        ldscript /cpu/x86/32bit/reset32.lds
123 end
124
125 ##
126 ## Include an id string (For safe flashing)
127 ##
128 mainboardinit southbridge/nvidia/mcp55/id.inc
129 ldscript /southbridge/nvidia/mcp55/id.lds
130
131 ##
132 ## ROMSTRAP table for MCP55
133 ##
134 if USE_FALLBACK_IMAGE
135        mainboardinit southbridge/nvidia/mcp55/romstrap.inc
136        ldscript /southbridge/nvidia/mcp55/romstrap.lds
137 end
138
139 ##
140 ## Setup Cache-As-Ram
141 ##
142 mainboardinit cpu/amd/car/cache_as_ram.inc
143
144 ###
145 ### This is the early phase of coreboot startup
146 ### Things are delicate and we test to see if we should
147 ### failover to another image.
148 ###
149 if USE_FALLBACK_IMAGE
150        ldscript /arch/i386/lib/failover.lds
151 end
152
153 ###
154 ### O.k. We aren't just an intermediary anymore!
155 ###
156
157 ##
158 ## Setup RAM
159 ##
160 if CONFIG_USE_INIT
161 initobject auto.o
162 else
163 mainboardinit ./auto.inc
164 end
165
166 ##
167 ## Include the secondary Configuration files
168 ##
169 config chip.h
170
171
172 # sample config for msi/ms9282
173 chip northbridge/amd/amdk8/root_complex
174         device apic_cluster 0 on
175                 chip cpu/amd/socket_F
176                         device apic 0 on end
177                 end
178         end
179
180        device pci_domain 0 on
181                chip northbridge/amd/amdk8 #mc0
182                        device pci 18.0 on #  northbridge
183                                #  devices on link 0, link 0 == LDT 0
184                                chip southbridge/nvidia/mcp55
185                                        device pci 0.0 on end   # HT
186                                        device pci 1.0 on # LPC
187                                                chip superio/winbond/w83627ehg
188                                                        device pnp 2e.0 on #  Floppy
189                                                                io 0x60 = 0x3f0
190                                                                irq 0x70 = 6
191                                                                drq 0x74 = 2
192                                                        end
193                                                        device pnp 2e.1 off #  Parallel Port
194                                                                io 0x60 = 0x378
195                                                                irq 0x70 = 7
196                                                        end
197                                                        device pnp 2e.2 on #  Com1
198                                                                io 0x60 = 0x3f8
199                                                                irq 0x70 = 4
200                                                        end
201                                                        device pnp 2e.3 off #  Com2
202                                                                io 0x60 = 0x2f8
203                                                                irq 0x70 = 3
204                                                        end
205                                                        device pnp 2e.5 on #  Keyboard
206                                                                io 0x60 = 0x60
207                                                                io 0x62 = 0x64
208                                                                irq 0x70 = 1
209                                                                irq 0x72 = 12
210                                                        end
211                                                        device pnp 2e.6 off #  SERIAL_FALSH
212                                                                io 0x60 = 0x100
213                                                        end
214                                                        device pnp 2e.7 off #  GAME_MIDI_GIPO1
215                                                                io 0x60 = 0x220
216                                                                io 0x62 = 0x300
217                                                                irq 0x70 = 9
218                                                        end
219                                                        device pnp 2e.8 off end #  WDTO_PLED
220                                                        device pnp 2e.9 off end #  GPIO2_GPIO3_GPIO4_GPIO5
221                                                        device pnp 2e.a off end #  ACPI
222                                                        device pnp 2e.b on #  HW Monitor
223                                                                io 0x60 = 0x290
224                                                                irq 0x70 = 5
225                                                        end
226                                                end
227                                        end
228                                         device pci 1.1 on # SM 0
229                                                chip drivers/i2c/i2cmux2 # pca9554 smbus mux
230                                                        device i2c 70 on  #0 pca9554 1
231                                                                chip drivers/generic/generic #dimm 0-0-0
232                                                                         device i2c 50 on end
233                                                                 end
234                                                                 chip drivers/generic/generic #dimm 0-0-1
235                                                                         device i2c 51 on end
236                                                                 end
237                                                                 chip drivers/generic/generic #dimm 0-1-0
238                                                                         device i2c 52 on end
239                                                                 end
240                                                                 chip drivers/generic/generic #dimm 0-1-1
241                                                                         device i2c 53 on end
242                                                                 end
243                                                                chip drivers/generic/generic #dimm 0-0-0
244                                                                         device i2c 54 on end
245                                                                 end
246                                                                 chip drivers/generic/generic #dimm 0-0-1
247                                                                         device i2c 55 on end
248                                                                 end
249                                                                 chip drivers/generic/generic #dimm 0-1-0
250                                                                         device i2c 56 on end
251                                                                 end
252                                                                 chip drivers/generic/generic #dimm 0-1-1
253                                                                         device i2c 57 on end
254                                                                 end
255                                                        end
256                                                        device i2c 70 on  #0 pca9554 2
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 0-0-0
270                                                                         device i2c 54 on end
271                                                                 end
272                                                                 chip drivers/generic/generic #dimm 0-0-1
273                                                                         device i2c 55 on end
274                                                                 end
275                                                                 chip drivers/generic/generic #dimm 0-1-0
276                                                                         device i2c 56 on end
277                                                                 end
278                                                                 chip drivers/generic/generic #dimm 0-1-1
279                                                                         device i2c 57 on end
280                                                                 end
281                                                        end
282                                                end
283                                        end
284                                        device pci 1.1 on # SM 1
285                                                chip drivers/i2c/i2cmux2 # pca9554 smbus mux
286                                                        device i2c 72 on     #pca9554 channle1
287                                                                chip drivers/i2c/adm1027   #HWM ADT7476 1
288                                                                        device i2c 2e on end
289                                                                end
290                                                        end
291                                                        device i2c 72 on     #pca9545 channel 2
292                                                                chip drivers/i2c/adm1027   #HWM ADT7463
293                                                                        device i2c 2e on end
294                                                                end
295                                                        end
296                                                        device i2c 72 on end  #pca9545 channel 3
297                                                        device i2c 72 on      #pca9545 channel 4
298                                                                chip drivers/i2c/adm1027   #HWM ADT7476 2
299                                                                        device i2c 2e on end
300                                                                end
301                                                        end
302                                                end
303                                        end
304
305                                        device pci 2.0 on end # USB 1.1
306                                        device pci 2.1 on end # USB 2
307                                        device pci 4.0 on  end # IDE
308                                                device pci 5.0 on  end # SATA 0
309                                        device pci 5.1 on  end # SATA 1
310                                        device pci 5.2 on  end # SATA 2
311                                        device pci 6.0 on  #P2P
312                                                chip drivers/pci/onboard
313                                                        device pci 4.0 on end
314                                                        register "rom_address" = "0xfff80000"
315                                                end
316                                        end # P2P
317                                        device pci 7.0 on end # reserve
318                                        device pci 8.0 on end # MAC0
319                                        device pci 9.0 on end # MAC1
320                                        device pci a.0 on
321                                                device pci 0.0 on
322                                                        chip drivers/pci/onboard
323                                                                device pci 4.0 on end  #pci_E lan1
324                                                                device pci 4.1 on end  #pci_E lan2
325                                                        end
326                                                end
327                                        end # 0x376
328                                                device pci b.0 on  end # PCI E 0x374
329                                        device pci c.0 on  end
330                                        device pci d.0 on   #SAS
331                                                chip drivers/pci/onboard
332                                                        device pci 0.0 on end
333                                                end
334                                        end # PCI E 1 0x378
335                                        device pci e.0 on end # PCI E 0 0x375
336                                        device pci f.0 on end   #PCI E 0x377  pci_E slot
337                                        register "ide0_enable" = "1"
338                                        register "ide1_enable" = "1"
339                                        register "sata0_enable" = "1"
340                                        register "sata1_enable" = "1"
341                                end
342                        end #  device pci 18.0
343                        device pci 18.0 on end # Link 1
344                        device pci 18.0 on end
345                        device pci 18.1 on end
346                        device pci 18.2 on end
347                        device pci 18.3 on end
348                end #mc0
349
350        end # pci_domain
351
352 #        chip drivers/generic/debug
353 #                device pnp 0.0 off end
354 #                device pnp 0.1 off end
355 #                device pnp 0.2 off end
356 #                device pnp 0.3 off end
357 #                device pnp 0.4 off end
358 #              device pnp 0.5 on end
359 #        end
360 end # root_complex