2 # This file is part of the coreboot project.
4 # Copyright (C) 2007 Advanced Micro Devices, Inc.
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; version 2 of the License.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 include /config/failovercalculation.lb
25 ## Build the objects we have code for in this directory.
31 #needed by irq_tables and mptable and acpi_tables
46 depends "$(MAINBOARD)/dx/dsdt_lb.dsl"
47 action "iasl -p $(CURDIR)/dsdt_lb -tc $(MAINBOARD)/dx/dsdt_lb.dsl"
48 action "mv dsdt_lb.hex dsdt.c"
52 #./ssdt.o is moved to northbridge/amd/amdk8/Config.lb
56 depends "$(MAINBOARD)/dx/pci2.asl"
57 action "iasl -p $(CURDIR)/pci2 -tc $(MAINBOARD)/dx/pci2.asl"
58 action "perl -pi -e 's/AmlCode/AmlCode_ssdt2/g' pci2.hex"
59 action "mv pci2.hex ssdt2.c"
63 depends "$(MAINBOARD)/dx/pci3.asl"
64 action "iasl -p $(CURDIR)/pci3 -tc $(MAINBOARD)/dx/pci3.asl"
65 action "perl -pi -e 's/AmlCode/AmlCode_ssdt3/g' pci3.hex"
66 action "mv pci3.hex ssdt3.c"
70 depends "$(MAINBOARD)/dx/pci4.asl"
71 action "iasl -p $(CURDIR)/pci4 -tc $(MAINBOARD)/dx/pci4.asl"
72 action "perl -pi -e 's/AmlCode/AmlCode_ssdt4/g' pci4.hex"
73 action "mv pci4.hex ssdt4.c"
77 depends "$(MAINBOARD)/dx/pci5.asl"
78 action "iasl -p $(CURDIR)/pci5 -tc $(MAINBOARD)/dx/pci5.asl"
79 action "perl -pi -e 's/AmlCode/AmlCode_ssdt5/g' pci5.hex"
80 action "mv pci5.hex ssdt5.c"
87 # compile cache_as_ram.c to auto.o
88 makerule ./cache_as_ram_auto.o
89 depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
90 action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) -I$(TOP)/src -I. -c $(MAINBOARD)/cache_as_ram_auto.c -o $@"
94 #compile cache_as_ram.c to auto.inc
95 makerule ./cache_as_ram_auto.inc
96 depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
97 action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(TOP)/src -I. -c -S $(MAINBOARD)/cache_as_ram_auto.c -o $@"
98 action "perl -e 's/\.rodata/.rom.data/g' -pi $@"
99 action "perl -e 's/\.text/.section .rom.text/g' -pi $@"
104 if USE_FAILOVER_IMAGE
106 if CONFIG_AP_CODE_IN_CAR
107 makerule ./apc_auto.o
108 depends "$(MAINBOARD)/apc_auto.c option_table.h"
109 action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) -I$(TOP)/src -I. -c $(MAINBOARD)/apc_auto.c -o $@"
111 ldscript /arch/i386/init/ldscript_apc.lb
116 ## Build our 16 bit and 32 bit coreboot entry code
119 if HAVE_FAILOVER_BOOT
120 if USE_FAILOVER_IMAGE
121 mainboardinit cpu/x86/16bit/entry16.inc
122 ldscript /cpu/x86/16bit/entry16.lds
125 if USE_FALLBACK_IMAGE
126 mainboardinit cpu/x86/16bit/entry16.inc
127 ldscript /cpu/x86/16bit/entry16.lds
131 mainboardinit cpu/x86/32bit/entry32.inc
133 ldscript /cpu/x86/32bit/entry32.lds
137 ldscript /cpu/amd/car/cache_as_ram.lds
141 ## Build our reset vector (This is where coreboot is entered)
143 if HAVE_FAILOVER_BOOT
144 if USE_FAILOVER_IMAGE
145 mainboardinit cpu/x86/16bit/reset16.inc
146 ldscript /cpu/x86/16bit/reset16.lds
148 mainboardinit cpu/x86/32bit/reset32.inc
149 ldscript /cpu/x86/32bit/reset32.lds
152 if USE_FALLBACK_IMAGE
153 mainboardinit cpu/x86/16bit/reset16.inc
154 ldscript /cpu/x86/16bit/reset16.lds
156 mainboardinit cpu/x86/32bit/reset32.inc
157 ldscript /cpu/x86/32bit/reset32.lds
163 ## Include an id string (For safe flashing)
165 mainboardinit arch/i386/lib/id.inc
166 ldscript /arch/i386/lib/id.lds
169 ## Setup Cache-As-Ram
171 mainboardinit cpu/amd/car/cache_as_ram.inc
174 ### This is the early phase of coreboot startup
175 ### Things are delicate and we test to see if we should
176 ### failover to another image.
178 if HAVE_FAILOVER_BOOT
179 if USE_FAILOVER_IMAGE
180 ldscript /arch/i386/lib/failover_failover.lds
183 if USE_FALLBACK_IMAGE
184 ldscript /arch/i386/lib/failover.lds
189 ### O.k. We aren't just an intermediary anymore!
196 initobject cache_as_ram_auto.o
198 mainboardinit ./cache_as_ram_auto.inc
202 ## Include the secondary Configuration files
206 dir /southbridge/amd/amd8151
208 # sample config for amd/serengeti_cheetah_fam10
209 chip northbridge/amd/amdfam10/root_complex
210 device apic_cluster 0 on
211 chip cpu/amd/socket_F_1207 #L1 and DDR2
215 device pci_domain 0 on
216 chip northbridge/amd/amdfam10
217 device pci 18.0 on # northbridge
218 # devices on link 0, link 0 == LDT 0
219 chip southbridge/amd/amd8132
220 # the on/off keyword is mandatory
221 device pci 0.0 on end
222 device pci 0.1 on end
223 device pci 1.0 on end
224 device pci 1.1 on end
226 chip southbridge/amd/amd8111
227 # this "device pci 0.0" is the parent the next one
230 device pci 0.0 on end
231 device pci 0.1 on end
232 device pci 0.2 off end
233 device pci 1.0 off end
236 chip superio/winbond/w83627hf
237 device pnp 2e.0 off # Floppy
242 device pnp 2e.1 off # Parallel Port
246 device pnp 2e.2 on # Com1
250 device pnp 2e.3 off # Com2
254 device pnp 2e.5 on # Keyboard
260 device pnp 2e.6 off # CIR
263 device pnp 2e.7 off # GAME_MIDI_GIPO1
268 device pnp 2e.8 off end # GPIO2
269 device pnp 2e.9 off end # GPIO3
270 device pnp 2e.a off end # ACPI
271 device pnp 2e.b on # HW Monitor
277 device pci 1.1 on end
278 device pci 1.2 on end
280 chip drivers/i2c/i2cmux2 # pca9556 smbus mux
281 chip drivers/i2c/i2cmux2 # pca9556 smbus mux
282 device i2c 18 on #0 pca9516 1
283 chip drivers/generic/generic #dimm 0-0-0
286 chip drivers/generic/generic #dimm 0-0-1
289 chip drivers/generic/generic #dimm 0-1-0
292 chip drivers/generic/generic #dimm 0-1-1
296 device i2c 18 on #1 pca9516 2
297 chip drivers/generic/generic #dimm 1-0-0
300 chip drivers/generic/generic #dimm 1-0-1
303 chip drivers/generic/generic #dimm 1-1-0
306 chip drivers/generic/generic #dimm 1-1-1
313 device pci 1.5 off end
314 device pci 1.6 off end
315 register "ide0_enable" = "1"
316 register "ide1_enable" = "1"
318 end # device pci 18.0
320 device pci 18.0 on end
321 device pci 18.0 on end
322 device pci 18.1 on end
323 device pci 18.2 on end
324 device pci 18.3 on end
325 device pci 18.4 on end
326 # device pci 00.5 on end
329 #for node 32 to node 63
330 # device pci_domain 0 on
331 # chip northbridge/amd/amdfam10
332 # device pci 00.0 on end# northbridge
333 # device pci 00.0 on end
334 # device pci 00.0 on end
335 # device pci 00.0 on end
336 # device pci 00.1 on end
337 # device pci 00.2 on end
338 # device pci 00.3 on end
339 # device pci 00.4 on end
340 # device pci 00.5 on end
344 # chip drivers/generic/debug
345 # device pnp 0.0 off end # chip name
346 # device pnp 0.1 on end # pci_regs_all
347 # device pnp 0.2 off end # mem
348 # device pnp 0.3 off end # cpuid
349 # device pnp 0.4 off end # smbus_regs_all
350 # device pnp 0.5 off end # dual core msr
351 # device pnp 0.6 off end # cache size
352 # device pnp 0.7 off end # tsc
353 # device pnp 0.8 off end # hard reset
354 # device pnp 0.9 off end # mcp55
355 # device pnp 0.a on end # GH ext table