2 ## This file is part of the coreboot project.
4 ## Copyright (C) 2008 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
22 ## CONFIG_XIP_ROM_SIZE must be a power of 2.
23 default CONFIG_XIP_ROM_SIZE = 64 * 1024
24 include /config/nofailovercalculation.lb
29 ## Build the objects we have code for in this directory.
39 if CONFIG_GENERATE_MP_TABLE object mptable.o end
40 if CONFIG_GENERATE_PIRQ_TABLE
45 if CONFIG_GENERATE_ACPI_TABLES
49 depends "$(CONFIG_MAINBOARD)/acpi/*.asl"
50 action "iasl -p $(CURDIR)/dsdt -tc $(CONFIG_MAINBOARD)/acpi/dsdt.asl"
51 action "mv dsdt.hex dsdt.c"
58 makerule ./cache_as_ram_auto.o
59 depends "$(CONFIG_MAINBOARD)/cache_as_ram_auto.c option_table.h"
60 action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) -I$(TOP)/src -I. -c $(CONFIG_MAINBOARD)/cache_as_ram_auto.c -o $@"
65 makerule ./cache_as_ram_auto.inc
66 depends "$(CONFIG_MAINBOARD)/cache_as_ram_auto.c option_table.h"
67 action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(TOP)/src -I. -c -S $(CONFIG_MAINBOARD)/cache_as_ram_auto.c -o $@"
68 action "perl -e 's/\.rodata/.rom.data/g' -pi $@"
69 action "perl -e 's/\.text/.section .rom.text/g' -pi $@"
75 ## Build our 16 bit and 32 bit coreboot entry code
77 mainboardinit cpu/x86/16bit/entry16.inc
78 mainboardinit cpu/x86/32bit/entry32.inc
79 ldscript /cpu/x86/16bit/entry16.lds
81 ldscript /cpu/x86/32bit/entry32.lds
85 ldscript /cpu/amd/car/cache_as_ram.lds
89 ## Build our reset vector (This is where coreboot is entered)
91 if CONFIG_USE_FALLBACK_IMAGE
92 mainboardinit cpu/x86/16bit/reset16.inc
93 ldscript /cpu/x86/16bit/reset16.lds
95 mainboardinit cpu/x86/32bit/reset32.inc
96 ldscript /cpu/x86/32bit/reset32.lds
100 ## Include an id string (For safe flashing)
102 mainboardinit arch/i386/lib/id.inc
103 ldscript /arch/i386/lib/id.lds
106 ## Setup Cache-As-Ram
108 mainboardinit cpu/amd/car/cache_as_ram.inc
111 ### This is the early phase of coreboot startup
112 ### Things are delicate and we test to see if we should
113 ### failover to another image.
115 if CONFIG_USE_FALLBACK_IMAGE
116 ldscript /arch/i386/lib/failover.lds
120 ### O.k. We aren't just an intermediary anymore!
127 initobject cache_as_ram_auto.o
129 mainboardinit ./cache_as_ram_auto.inc
133 ## Include the secondary Configuration files
137 #The variables belong to mainboard are defined here.
139 #Define gpp_configuration, A=0, B=1, C=2, D=3, E=4(default)
140 #Define port_enable, (bit map): GFX(2,3), GPP(4,5,6,7)
141 #Define gfx_dev2_dev3, 0: a link will never be established on Dev2 or Dev3,
142 # 1: the system allows a PCIE link to be established on Dev2 or Dev3.
143 #Define gfx_dual_slot, 0: single slot, 1: dual slot
144 #Define gfx_lane_reversal, 0: disable lane reversal, 1: enable
145 #Define gfx_tmds, 0: didn't support TMDS, 1: support
146 #Define gfx_compliance, 0: didn't support compliance, 1: support
147 #Define gfx_reconfiguration, 0: short reconfiguration, 1(default): long reconfiguration
148 #Define gfx_link_width, 0: x16, 1: x1, 2: x2, 3: x4, 4: x8, 5: x12 (not supported), 6: x16
149 chip northbridge/amd/amdk8/root_complex
150 device apic_cluster 0 on
151 chip cpu/amd/socket_S1G1
155 device pci_domain 0 on
156 chip northbridge/amd/amdk8
157 device pci 18.0 on # southbridge
158 chip southbridge/amd/rs690
159 device pci 0.0 on end # HT 0x7910
160 device pci 1.0 on # Internal Graphics P2P bridge 0x7912
161 device pci 5.0 on end # Internal Graphics 0x791F
163 device pci 2.0 on end # PCIE P2P bridge (external graphics) 0x7913
164 device pci 3.0 off end # PCIE P2P bridge 0x791b
165 device pci 4.0 on end # PCIE P2P bridge 0x7914
166 device pci 5.0 on end # PCIE P2P bridge 0x7915
167 device pci 6.0 on end # PCIE P2P bridge 0x7916
168 device pci 7.0 on end # PCIE P2P bridge 0x7917
169 device pci 8.0 off end # NB/SB Link P2P bridge
170 register "gpp_configuration" = "4"
171 register "port_enable" = "0xfc"
172 register "gfx_dev2_dev3" = "1"
173 register "gfx_dual_slot" = "0"
174 register "gfx_lane_reversal" = "0"
175 register "gfx_tmds" = "1"
176 register "gfx_compliance" = "0"
177 register "gfx_reconfiguration" = "0"
178 register "gfx_link_width" = "0"
180 chip southbridge/amd/sb600 # it is under NB/SB Link, but on the same pri bus
181 device pci 12.0 on end # SATA 0x4380
182 device pci 13.0 on end # USB 0x4387
183 device pci 13.1 on end # USB 0x4388
184 device pci 13.2 on end # USB 0x4389
185 device pci 13.3 on end # USB 0x438a
186 device pci 13.4 on end # USB 0x438b
187 device pci 13.5 on end # USB 2 0x4386
188 device pci 14.0 on # SM 0x4385
189 chip drivers/generic/generic #dimm 0-0-0
192 chip drivers/generic/generic #dimm 0-0-1
195 chip drivers/generic/generic #dimm 0-1-0
198 chip drivers/generic/generic #dimm 0-1-1
202 device pci 14.1 on end # IDE 0x438c
203 device pci 14.2 on end # HDA 0x4383
204 device pci 14.3 on # LPC 0x438d
205 chip superio/ite/it8712f
206 device pnp 2e.0 off # Floppy
211 device pnp 2e.1 on # Com1
215 device pnp 2e.2 on # Com2
219 device pnp 2e.3 on # Parallel Port
223 device pnp 2e.4 off end # EC
224 device pnp 2e.5 on # Keyboard
229 device pnp 2e.6 on # Mouse
232 device pnp 2e.7 off # GPIO, must be closed for unresolved reason.
234 device pnp 2e.8 off # MIDI
238 device pnp 2e.9 off # GAME
241 device pnp 2e.a off end # CIR
242 end #superio/ite/it8712f
244 device pci 14.4 on end # PCI 0x4384
245 device pci 14.5 on end # ACI 0x4382
246 device pci 14.6 on end # MCI 0x438e
247 register "ide0_enable" = "1"
248 register "sata0_enable" = "1"
249 register "hda_viddid" = "0x10ec0882"
250 end #southbridge/amd/sb600
251 end # device pci 18.0
253 device pci 18.0 on end
254 device pci 18.0 on end
255 device pci 18.1 on end
256 device pci 18.2 on end
257 device pci 18.3 on end
258 end #northbridge/amd/amdk8
260 end #northbridge/amd/amdk8/root_complex