2 ## This file is part of the coreboot project.
4 ## Copyright (C) 2007 AMD
5 ## (Written by Yinghai Lu <yinghailu@amd.com> for AMD)
6 ## Copyright (C) 2007 Philipp Degler <pdegler@rumms.uni-mannheim.de>
7 ## (Thanks to LSRA University of Mannheim for their support)
8 ## Copyright (C) 2008 Jonathan A. Kollasch <jakllsch@kollasch.net>
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.
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.
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
25 ## CONFIG_XIP_ROM_SIZE must be a power of 2.
26 default CONFIG_XIP_ROM_SIZE = 64 * 1024
27 include /config/failovercalculation.lb
32 ## Build the objects we have code for in this directory.
37 #dir /drivers/ati/ragexl
39 # Needed by irq_tables and mptable and acpi_tables.
42 if CONFIG_GENERATE_MP_TABLE
46 if CONFIG_GENERATE_PIRQ_TABLE
52 depends "$(CONFIG_MAINBOARD)/cache_as_ram_auto.c option_table.h"
53 action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) -I$(TOP)/src -I. -c $(CONFIG_MAINBOARD)/cache_as_ram_auto.c -o $@"
57 depends "$(CONFIG_MAINBOARD)/cache_as_ram_auto.c option_table.h"
58 action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(TOP)/src -I. -c -S $(CONFIG_MAINBOARD)/cache_as_ram_auto.c -o $@"
59 action "perl -e 's/\.rodata/.rom.data/g' -pi $@"
60 action "perl -e 's/\.text/.section .rom.text/g' -pi $@"
65 ## Build our 16 bit and 32 bit coreboot entry code.
67 if CONFIG_HAVE_FAILOVER_BOOT
68 if CONFIG_USE_FAILOVER_IMAGE
69 mainboardinit cpu/x86/16bit/entry16.inc
70 ldscript /cpu/x86/16bit/entry16.lds
73 if CONFIG_USE_FALLBACK_IMAGE
74 mainboardinit cpu/x86/16bit/entry16.inc
75 ldscript /cpu/x86/16bit/entry16.lds
79 mainboardinit cpu/x86/32bit/entry32.inc
82 ldscript /cpu/x86/32bit/entry32.lds
83 ldscript /cpu/amd/car/cache_as_ram.lds
87 ## Build our reset vector (this is where coreboot is entered).
89 if CONFIG_HAVE_FAILOVER_BOOT
90 if CONFIG_USE_FAILOVER_IMAGE
91 mainboardinit cpu/x86/16bit/reset16.inc
92 ldscript /cpu/x86/16bit/reset16.lds
94 mainboardinit cpu/x86/32bit/reset32.inc
95 ldscript /cpu/x86/32bit/reset32.lds
98 if CONFIG_USE_FALLBACK_IMAGE
99 mainboardinit cpu/x86/16bit/reset16.inc
100 ldscript /cpu/x86/16bit/reset16.lds
102 mainboardinit cpu/x86/32bit/reset32.inc
103 ldscript /cpu/x86/32bit/reset32.lds
108 ## Include an ID string (for safe flashing).
110 mainboardinit southbridge/nvidia/ck804/id.inc
111 ldscript /southbridge/nvidia/ck804/id.lds
114 ## ROMSTRAP table for CK804
116 if CONFIG_HAVE_FAILOVER_BOOT
117 if CONFIG_USE_FAILOVER_IMAGE
118 mainboardinit southbridge/nvidia/ck804/romstrap.inc
119 ldscript /southbridge/nvidia/ck804/romstrap.lds
122 if CONFIG_USE_FALLBACK_IMAGE
123 mainboardinit southbridge/nvidia/ck804/romstrap.inc
124 ldscript /southbridge/nvidia/ck804/romstrap.lds
129 ## Setup Cache-As-Ram
131 mainboardinit cpu/amd/car/cache_as_ram.inc
134 ### This is the early phase of coreboot startup.
135 ### Things are delicate and we test to see if we should
136 ### failover to another image.
138 if CONFIG_HAVE_FAILOVER_BOOT
139 if CONFIG_USE_FAILOVER_IMAGE
140 ldscript /arch/i386/lib/failover_failover.lds
143 if CONFIG_USE_FALLBACK_IMAGE
144 ldscript /arch/i386/lib/failover.lds
149 ### O.k. We aren't just an intermediary anymore!
158 mainboardinit ./auto.inc
162 ## Include the secondary configuration files
166 chip northbridge/amd/amdk8/root_complex # Root complex
167 device apic_cluster 0 on # APIC cluster
168 chip cpu/amd/socket_754 # Socket 754 CPU
169 device apic 0 on end # APIC
173 device pci_domain 0 on # PCI domain
174 chip northbridge/amd/amdk8 # mc0
175 device pci 18.0 on # Northbridge
176 # Devices on link 0, link 0 == LDT 0
177 chip southbridge/nvidia/ck804 # Southbridge
178 device pci 0.0 on end # HT
179 device pci 1.0 on # LPC
180 chip superio/winbond/w83627thf # Super I/O
181 device pnp 4e.0 on # Floppy
186 device pnp 4e.1 on # Parallel port
190 device pnp 4e.2 on # Com1
194 device pnp 4e.3 on # Com2
198 device pnp 4e.5 on # PS/2 keyboard
204 device pnp 4e.7 off end # Game, MIDI, GPIO 1, GPIO 5
205 device pnp 4e.8 off end # GPIO 2
206 device pnp 4e.9 off end # GPIO 3, GPIO 4
207 device pnp 4e.a off end # ACPI
208 device pnp 4e.b on # Hardware monitor
214 device pci 1.1 on end # SMbus
215 device pci 2.0 on end # USB 1.1
216 device pci 2.1 on end # USB 2
217 device pci 4.0 on end # Onboard audio (ACI)
218 device pci 4.1 off end # Onboard modem (MCI) -- not wired out
219 device pci 6.0 on end # IDE
220 device pci 7.0 on end # SATA 1
221 device pci 8.0 on end # SATA 0
222 device pci 9.0 on end # PCI
223 device pci a.0 on end # NIC
224 device pci b.0 off end # PCI E 3 -- not wired out
225 device pci c.0 off end # PCI E 2 -- not wired out
226 device pci d.0 on end # PCI E 1
227 device pci e.0 on end # PCI E 0
228 register "ide0_enable" = "1"
229 register "ide1_enable" = "1"
230 register "sata0_enable" = "1"
231 register "sata1_enable" = "1"
232 # register "mac_eeprom_smbus" = "3"
233 # register "mac_eeprom_addr" = "0x51"
236 device pci 18.1 on end
237 device pci 18.2 on end
238 device pci 18.3 on end