This patch unifies the use of config options in v2 to all start with CONFIG_
[coreboot.git] / src / mainboard / msi / ms7260 / Config.lb
1 ##
2 ## This file is part of the coreboot project.
3 ##
4 ## Copyright (C) 2007 Uwe Hermann <uwe@hermann-uwe.de>
5 ##
6 ## This program is free software; you can redistribute it and/or modify
7 ## it under the terms of the GNU General Public License as published by
8 ## the Free Software Foundation; either version 2 of the License, or
9 ## (at your option) any later version.
10 ##
11 ## This program is distributed in the hope that it will be useful,
12 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 ## GNU General Public License for more details.
15 ##
16 ## You should have received a copy of the GNU General Public License
17 ## along with this program; if not, write to the Free Software
18 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
19 ##
20
21 ## CONFIG_XIP_ROM_SIZE must be a power of 2.
22 default CONFIG_XIP_ROM_SIZE = 64 * 1024
23 include /config/failovercalculation.lb
24
25 arch i386 end
26
27 driver mainboard.o
28 object get_bus_conf.o # Needed by irq_tables and mptable (and acpi_tables).
29 if CONFIG_HAVE_MP_TABLE object mptable.o end
30 if CONFIG_HAVE_PIRQ_TABLE object irq_tables.o end
31 # object reset.o
32
33   if CONFIG_USE_INIT
34     makerule ./cache_as_ram_auto.o
35       depends "$(CONFIG_MAINBOARD)/cache_as_ram_auto.c option_table.h"
36       action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) -I$(TOP)/src -I. -c $(CONFIG_MAINBOARD)/cache_as_ram_auto.c -o $@"
37     end
38   else
39     makerule ./cache_as_ram_auto.inc
40       depends "$(CONFIG_MAINBOARD)/cache_as_ram_auto.c option_table.h"
41       action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(TOP)/src -I. -c -S $(CONFIG_MAINBOARD)/cache_as_ram_auto.c -o $@"
42       action "perl -e 's/\.rodata/.rom.data/g' -pi $@"
43       action "perl -e 's/\.text/.section .rom.text/g' -pi $@"
44     end
45   end
46
47 if CONFIG_USE_FAILOVER_IMAGE
48 else
49   if CONFIG_AP_CODE_IN_CAR
50     makerule ./apc_auto.o
51       depends "$(CONFIG_MAINBOARD)/apc_auto.c option_table.h"
52       action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) -I$(TOP)/src -I. -c $(CONFIG_MAINBOARD)/apc_auto.c -o $@"
53     end
54     ldscript /arch/i386/init/ldscript_apc.lb
55   end
56 end
57
58 if CONFIG_HAVE_FAILOVER_BOOT
59   if CONFIG_USE_FAILOVER_IMAGE
60     mainboardinit cpu/x86/16bit/entry16.inc
61     ldscript /cpu/x86/16bit/entry16.lds
62   end
63 else
64   if CONFIG_USE_FALLBACK_IMAGE
65     mainboardinit cpu/x86/16bit/entry16.inc
66     ldscript /cpu/x86/16bit/entry16.lds
67   end
68 end
69
70 mainboardinit cpu/x86/32bit/entry32.inc
71
72   if CONFIG_USE_INIT
73     ldscript /cpu/x86/32bit/entry32.lds
74   end
75   if CONFIG_USE_INIT
76     ldscript /cpu/amd/car/cache_as_ram.lds
77   end
78
79 if CONFIG_HAVE_FAILOVER_BOOT
80   if CONFIG_USE_FAILOVER_IMAGE
81     mainboardinit cpu/x86/16bit/reset16.inc
82     ldscript /cpu/x86/16bit/reset16.lds
83   else
84     mainboardinit cpu/x86/32bit/reset32.inc
85     ldscript /cpu/x86/32bit/reset32.lds
86   end
87 else
88   if CONFIG_USE_FALLBACK_IMAGE
89     mainboardinit cpu/x86/16bit/reset16.inc
90     ldscript /cpu/x86/16bit/reset16.lds
91   else
92     mainboardinit cpu/x86/32bit/reset32.inc
93     ldscript /cpu/x86/32bit/reset32.lds
94   end
95 end
96
97 mainboardinit southbridge/nvidia/mcp55/id.inc
98 ldscript /southbridge/nvidia/mcp55/id.lds
99
100 # ROMSTRAP table for MCP55.
101 if CONFIG_HAVE_FAILOVER_BOOT
102   if CONFIG_USE_FAILOVER_IMAGE
103     mainboardinit southbridge/nvidia/mcp55/romstrap.inc
104     ldscript /southbridge/nvidia/mcp55/romstrap.lds
105   end
106 else
107   if CONFIG_USE_FALLBACK_IMAGE
108     mainboardinit southbridge/nvidia/mcp55/romstrap.inc
109     ldscript /southbridge/nvidia/mcp55/romstrap.lds
110   end
111 end
112
113   mainboardinit cpu/amd/car/cache_as_ram.inc
114
115 if CONFIG_HAVE_FAILOVER_BOOT
116   if CONFIG_USE_FAILOVER_IMAGE
117       ldscript /arch/i386/lib/failover_failover.lds
118   end
119 else
120   if CONFIG_USE_FALLBACK_IMAGE
121       ldscript /arch/i386/lib/failover.lds
122   end
123 end
124
125   if CONFIG_USE_INIT
126     initobject cache_as_ram_auto.o
127   else
128     mainboardinit ./cache_as_ram_auto.inc
129   end
130
131 config chip.h
132
133 chip northbridge/amd/amdk8/root_complex         # Root complex
134   device apic_cluster 0 on                      # APIC cluster
135     chip cpu/amd/socket_AM2                     # CPU
136       device apic 0 on end                      # APIC
137     end
138   end
139   device pci_domain 0 on                        # PCI domain
140     chip northbridge/amd/amdk8                  # Northbridge / mc0
141       device pci 18.0 on
142         # Devices on link 0, link 0 == LDT 0
143         chip southbridge/nvidia/mcp55           # Southbridge
144           device pci 0.0 on end                 # HT
145           device pci 1.0 on                     # LPC
146             chip superio/winbond/w83627ehg      # Super I/O
147               device pnp 4e.0 on                # Floppy
148                 io 0x60 = 0x3f0
149                 irq 0x70 = 6
150                 drq 0x74 = 2
151               end
152               device pnp 4e.1 on                # Parallel port
153                 io 0x60 = 0x378
154                 irq 0x70 = 7
155               end
156               device pnp 4e.2 on                # Com1
157                 io 0x60 = 0x3f8
158                 irq 0x70 = 4
159               end
160               device pnp 4e.3 on                # Com2 / IrDA
161                 io 0x60 = 0x2f8
162                 irq 0x70 = 3
163               end
164               device pnp 4e.5 on                # PS/2 keyboard
165                 io 0x60 = 0x60
166                 io 0x62 = 0x64
167                 irq 0x70 = 1                    # PS/2 keyboard IRQ
168                 irq 0x72 = 12                   # PS/2 mouse IRQ
169               end
170               device pnp 4e.6 off               # Serial flash interface
171                 # io 0x62 = 0x100
172               end
173               device pnp 4e.7 off               # GPIO1/6, game port, MIDI port
174                 # io 0x60 = 0x220               # Datasheet: 0x201
175                 # io 0x62 = 0x300               # Datasheet: 0x330
176                 # irq 0x70 = 9
177               end
178               device pnp 4e.8 off               # WDTO#, PLED
179               end
180               device pnp 4e.9 off               # GPIO2/3/4/5, SUSLED
181               end
182               device pnp 4e.a off               # ACPI
183               end
184               device pnp 4e.b on                # HWM (for lm-sensors)
185                 io 0x60 = 0xa10
186               end
187             end
188           end
189           device pci 1.1 on                     # SM 0
190             chip drivers/generic/generic        # DIMM 0-0-0
191               device i2c 50 on end
192             end
193             chip drivers/generic/generic        # DIMM 0-0-1
194               device i2c 51 on end
195             end
196             chip drivers/generic/generic        # DIMM 0-1-0
197               device i2c 52 on end
198             end
199             chip drivers/generic/generic        # DIMM 0-1-1
200               device i2c 53 on end
201             end
202             # TODO: Needed?
203             # chip drivers/generic/generic      # DIMM 1-0-0
204             #   device i2c 54 on end
205             # end
206             # chip drivers/generic/generic      # DIMM 1-0-1
207             #   device i2c 55 on end
208             # end
209             # chip drivers/generic/generic      # DIMM 1-1-0
210             #   device i2c 56 on end
211             # end
212             # chip drivers/generic/generic      # DIMM 1-1-1
213             #   device i2c 57 on end
214             # end
215           end
216           # TODO: Check if the stuff below is correct / needed.
217           device pci 1.1 on                     # SM 1
218             # PCI device SMBus address will depend on addon PCI device,
219             # do we need to scan_smbus_bus?
220
221             # chip drivers/generic/generic      # PCIXA Slot1
222             #   device i2c 50 on end
223             # end
224             # chip drivers/generic/generic      # PCIXB Slot1
225             #   device i2c 51 on end
226             # end
227             # chip drivers/generic/generic      # PCIXB Slot2
228             #   device i2c 52 on end
229             # end
230             # chip drivers/generic/generic      # PCI Slot1
231             #   device i2c 53 on end
232             # end
233             # chip drivers/generic/generic      # Master MCP55 PCI-E
234             #   device i2c 54 on end
235             # end
236             # chip drivers/generic/generic      # Slave MCP55 PCI-E
237             #   device i2c 55 on end
238             # end
239             chip drivers/generic/generic        # MAC EEPROM
240               device i2c 51 on end
241             end
242           end
243           device pci 2.0 on end                 # USB 1.1
244           device pci 2.1 on end                 # USB 2
245           device pci 4.0 on end                 # IDE
246           device pci 5.0 on end                 # SATA 0
247           device pci 5.1 on end                 # SATA 1
248           device pci 5.2 off end                # SATA 2 (N/A on this board)
249           device pci 6.0 on end                 # PCI
250           device pci 6.1 on end                 # AZA (HD Audio)
251           device pci 8.0 on end                 # NIC
252           device pci 9.0 off end                # NIC (N/A on this board)
253           device pci a.0 off end                # PCI E 5 (N/A on this board?)
254           device pci b.0 on end                 # PCI E 4
255           device pci c.0 on end                 # PCI E 3
256           device pci d.0 on end                 # PCI E 2
257           device pci e.0 on end                 # PCI E 1
258           device pci f.0 on end                 # PCI E 0
259           register "ide0_enable" = "1"
260           register "sata0_enable" = "1"
261           register "sata1_enable" = "1"
262           # TODO: Check the two lines below.
263           register "mac_eeprom_smbus" = "3"     # 1: SMBus under 2e.8, 2: SM0 3: SM1
264           register "mac_eeprom_addr" = "0x51"
265         end
266       end
267       device pci 18.0 on end                    # Link 1
268       device pci 18.0 on end
269       device pci 18.1 on end
270       device pci 18.2 on end
271       device pci 18.3 on end
272     end
273   end
274
275 # TODO
276 #  chip drivers/generic/debug
277 #    device pnp 0.0 off end                     # chip name
278 #    device pnp 0.1 on end                      # pci_regs_all
279 #    device pnp 0.2 on end                      # mem
280 #    device pnp 0.3 off end                     # cpuid
281 #    device pnp 0.4 on end                      # smbus_regs_all
282 #    device pnp 0.5 off end                     # dual core msr
283 #    device pnp 0.6 off end                     # cache size
284 #    device pnp 0.7 off end                     # tsc
285 #    device pnp 0.8 off end                     # io
286 #    device pnp 0.9 off end                     # io
287 #  end
288
289 end