blob: 374629c5b3fdd23c1936ef69eb2312bdb2ebf0d6 [file] [log] [blame]
Philipp Deglercd3afc02007-05-24 20:39:48 +00001##
Stefan Reinauer7e61e452008-01-18 10:35:56 +00002## This file is part of the coreboot project.
Philipp Deglercd3afc02007-05-24 20:39:48 +00003##
Uwe Hermann322076c2007-09-24 20:00:32 +00004## Copyright (C) 2007 AMD
Philipp Deglercd3afc02007-05-24 20:39:48 +00005## (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##
9## This program is free software; you can redistribute it and/or modify
10## it under the terms of the GNU General Public License as published by
11## the Free Software Foundation; either version 2 of the License, or
12## (at your option) any later version.
13##
14## This program is distributed in the hope that it will be useful,
15## but WITHOUT ANY WARRANTY; without even the implied warranty of
16## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17## GNU General Public License for more details.
18##
19## You should have received a copy of the GNU General Public License
20## along with this program; if not, write to the Free Software
21## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22##
23
Stefan Reinauer08670622009-06-30 15:17:49 +000024## CONFIG_XIP_ROM_SIZE must be a power of 2.
25default CONFIG_XIP_ROM_SIZE = 64 * 1024
Carl-Daniel Hailfingerb5e10bc2009-04-21 00:16:06 +000026include /config/failovercalculation.lb
27
Philipp Deglercd3afc02007-05-24 20:39:48 +000028arch i386 end
Philipp Deglercd3afc02007-05-24 20:39:48 +000029driver mainboard.o
Philipp Deglercd3afc02007-05-24 20:39:48 +000030# Needed by irq_tables and mptable and acpi_tables.
31object get_bus_conf.o
Myles Watsonb8e20272009-10-15 13:35:47 +000032if CONFIG_GENERATE_MP_TABLE object mptable.o end
33if CONFIG_GENERATE_PIRQ_TABLE object irq_tables.o end
Philipp Deglercd3afc02007-05-24 20:39:48 +000034 if CONFIG_USE_INIT
35 makerule ./auto.o
Stefan Reinauer08670622009-06-30 15:17:49 +000036 depends "$(CONFIG_MAINBOARD)/cache_as_ram_auto.c option_table.h"
37 action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) -I$(TOP)/src -I. -c $(CONFIG_MAINBOARD)/cache_as_ram_auto.c -o $@"
Philipp Deglercd3afc02007-05-24 20:39:48 +000038 end
39 else
40 makerule ./auto.inc
Stefan Reinauer08670622009-06-30 15:17:49 +000041 depends "$(CONFIG_MAINBOARD)/cache_as_ram_auto.c option_table.h"
42 action "$(CC) $(DISTRO_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(DEBUG_CFLAGS) -I$(TOP)/src -I. -c -S $(CONFIG_MAINBOARD)/cache_as_ram_auto.c -o $@"
Stefan Reinauer4ed326b2008-11-28 12:09:17 +000043 action "perl -e 's/\.rodata/.rom.data/g' -pi $@"
44 action "perl -e 's/\.text/.section .rom.text/g' -pi $@"
Philipp Deglercd3afc02007-05-24 20:39:48 +000045 end
46 end
Stefan Reinauer08670622009-06-30 15:17:49 +000047if CONFIG_HAVE_FAILOVER_BOOT
48 if CONFIG_USE_FAILOVER_IMAGE
Uwe Hermann322076c2007-09-24 20:00:32 +000049 mainboardinit cpu/x86/16bit/entry16.inc
50 ldscript /cpu/x86/16bit/entry16.lds
51 end
Philipp Deglercd3afc02007-05-24 20:39:48 +000052else
Stefan Reinauer08670622009-06-30 15:17:49 +000053 if CONFIG_USE_FALLBACK_IMAGE
Uwe Hermann322076c2007-09-24 20:00:32 +000054 mainboardinit cpu/x86/16bit/entry16.inc
55 ldscript /cpu/x86/16bit/entry16.lds
56 end
Philipp Deglercd3afc02007-05-24 20:39:48 +000057end
Philipp Deglercd3afc02007-05-24 20:39:48 +000058mainboardinit cpu/x86/32bit/entry32.inc
Uwe Hermann322076c2007-09-24 20:00:32 +000059 if CONFIG_USE_INIT
60 ldscript /cpu/x86/32bit/entry32.lds
61 ldscript /cpu/amd/car/cache_as_ram.lds
62 end
Stefan Reinauer08670622009-06-30 15:17:49 +000063if CONFIG_HAVE_FAILOVER_BOOT
64 if CONFIG_USE_FAILOVER_IMAGE
Uwe Hermann322076c2007-09-24 20:00:32 +000065 mainboardinit cpu/x86/16bit/reset16.inc
66 ldscript /cpu/x86/16bit/reset16.lds
67 else
68 mainboardinit cpu/x86/32bit/reset32.inc
69 ldscript /cpu/x86/32bit/reset32.lds
70 end
Philipp Deglercd3afc02007-05-24 20:39:48 +000071else
Stefan Reinauer08670622009-06-30 15:17:49 +000072 if CONFIG_USE_FALLBACK_IMAGE
Uwe Hermann322076c2007-09-24 20:00:32 +000073 mainboardinit cpu/x86/16bit/reset16.inc
74 ldscript /cpu/x86/16bit/reset16.lds
75 else
76 mainboardinit cpu/x86/32bit/reset32.inc
77 ldscript /cpu/x86/32bit/reset32.lds
78 end
Philipp Deglercd3afc02007-05-24 20:39:48 +000079end
Uwe Hermann336935c2008-09-30 15:02:40 +000080# Include an ID string (for safe flashing).
Patrick Georgi436f99b2009-11-27 16:55:13 +000081mainboardinit arch/i386/lib/id.inc
82ldscript /arch/i386/lib/id.lds
Uwe Hermann336935c2008-09-30 15:02:40 +000083# ROMSTRAP table for CK804.
Stefan Reinauer08670622009-06-30 15:17:49 +000084if CONFIG_HAVE_FAILOVER_BOOT
85 if CONFIG_USE_FAILOVER_IMAGE
Philipp Deglercd3afc02007-05-24 20:39:48 +000086 mainboardinit southbridge/nvidia/ck804/romstrap.inc
87 ldscript /southbridge/nvidia/ck804/romstrap.lds
88 end
89else
Stefan Reinauer08670622009-06-30 15:17:49 +000090 if CONFIG_USE_FALLBACK_IMAGE
Philipp Deglercd3afc02007-05-24 20:39:48 +000091 mainboardinit southbridge/nvidia/ck804/romstrap.inc
92 ldscript /southbridge/nvidia/ck804/romstrap.lds
93 end
94end
Philipp Deglercd3afc02007-05-24 20:39:48 +000095 mainboardinit cpu/amd/car/cache_as_ram.inc
Stefan Reinauer08670622009-06-30 15:17:49 +000096if CONFIG_HAVE_FAILOVER_BOOT
97 if CONFIG_USE_FAILOVER_IMAGE
Uwe Hermann322076c2007-09-24 20:00:32 +000098 ldscript /arch/i386/lib/failover_failover.lds
Uwe Hermann322076c2007-09-24 20:00:32 +000099 end
Philipp Deglercd3afc02007-05-24 20:39:48 +0000100else
Stefan Reinauer08670622009-06-30 15:17:49 +0000101 if CONFIG_USE_FALLBACK_IMAGE
Uwe Hermann322076c2007-09-24 20:00:32 +0000102 ldscript /arch/i386/lib/failover.lds
Uwe Hermann322076c2007-09-24 20:00:32 +0000103 end
Philipp Deglercd3afc02007-05-24 20:39:48 +0000104end
Philipp Deglercd3afc02007-05-24 20:39:48 +0000105 if CONFIG_USE_INIT
106 initobject auto.o
107 else
108 mainboardinit ./auto.inc
109 end
Stefan Reinauer3081bdf2009-04-01 13:43:21 +0000110config chip.h
Philipp Deglercd3afc02007-05-24 20:39:48 +0000111
Uwe Hermann322076c2007-09-24 20:00:32 +0000112chip northbridge/amd/amdk8/root_complex # Root complex
113 device apic_cluster 0 on # APIC cluster
114 chip cpu/amd/socket_939 # Socket 939 CPU
115 device apic 0 on end # APIC
116 end
117 end
Philipp Deglercd3afc02007-05-24 20:39:48 +0000118
Uwe Hermann322076c2007-09-24 20:00:32 +0000119 device pci_domain 0 on # PCI domain
120 chip northbridge/amd/amdk8 # mc0
121 device pci 18.0 on # Northbridge
122 # Devices on link 0, link 0 == LDT 0
123 chip southbridge/nvidia/ck804 # Southbridge
124 device pci 0.0 on end # HT
125 device pci 1.0 on # LPC
126 chip superio/ite/it8712f # Super I/O
Uwe Hermannb816d332008-10-01 13:10:39 +0000127 device pnp 2e.0 on # Floppy
Uwe Hermann322076c2007-09-24 20:00:32 +0000128 io 0x60 = 0x3f0
129 irq 0x70 = 6
130 drq 0x74 = 2
131 end
132 device pnp 2e.1 on # Com1
133 io 0x60 = 0x3f8
134 irq 0x70 = 4
135 end
Uwe Hermannb816d332008-10-01 13:10:39 +0000136 device pnp 2e.2 off # Com2 (N/A on this board)
Uwe Hermann322076c2007-09-24 20:00:32 +0000137 io 0x60 = 0x2f8
138 irq 0x70 = 3
139 end
140 device pnp 2e.3 on # Parallel port
141 io 0x60 = 0x378
142 irq 0x70 = 7
Uwe Hermannb816d332008-10-01 13:10:39 +0000143 drq 0x74 = 3
Uwe Hermann322076c2007-09-24 20:00:32 +0000144 end
145 device pnp 2e.4 on # Environment controller
146 io 0x60 = 0x290
147 io 0x62 = 0x0000
148 irq 0x70 = 0x00
149 end
150 device pnp 2e.5 on # PS/2 keyboard
151 io 0x60 = 0x60
152 io 0x62 = 0x64
153 irq 0x70 = 1
154 irq 0x71 = 2
155 end
156 device pnp 2e.6 on # PS/2 mouse
157 irq 0x70 = 12
158 irq 0x71 = 2
159 end
160 device pnp 2e.7 on # GPIO config
Uwe Hermannb816d332008-10-01 13:10:39 +0000161 io 0x60 = 0x0800
Uwe Hermann322076c2007-09-24 20:00:32 +0000162 # Set GPIO 1 & 2
163 io 0x25 = 0x0000
164 # Set GPIO 3 & 4
165 io 0x27 = 0x2540
166 # GPIO Polarity for Set 3
167 io 0xb2 = 0x2100
168 # GPIO Pin Internal Pull up for Set 3
169 io 0xba = 0x0100
170 # Simple I/O register config
171 io 0xc0 = 0x0000
172 io 0xc2 = 0x2540
173 io 0xc8 = 0x0000
174 io 0xca = 0x0500
175 end
Uwe Hermannb816d332008-10-01 13:10:39 +0000176 device pnp 2e.8 on # Midi port
177 io 0x60 = 0x300
178 irq 0x70 = 10
179 end
180 device pnp 2e.9 on # Game port
181 io 0x60 = 0x201
182 end
183 device pnp 2e.a off # IR (N/A on this board)
184 io 0x60 = 0x310
185 irq 0x70 = 11
186 end
Uwe Hermann322076c2007-09-24 20:00:32 +0000187 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 # chip drivers/generic/generic #dimm 1-0-0
203 # device i2c 54 on end
204 # end
205 # chip drivers/generic/generic #dimm 1-0-1
206 # device i2c 55 on end
207 # end
208 # chip drivers/generic/generic #dimm 1-1-0
209 # device i2c 56 on end
210 # end
211 # chip drivers/generic/generic #dimm 1-1-1
212 # device i2c 57 on end
213 # end
214 end
215 device pci 2.0 on end # USB 1.1
216 device pci 2.1 on end # USB 2
Uwe Hermannb816d332008-10-01 13:10:39 +0000217 device pci 4.0 on end # Onboard audio (ACI)
218 device pci 4.1 off end # Onboard modem (MCI), N/A
Uwe Hermann322076c2007-09-24 20:00:32 +0000219 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 on end # PCI E 3
225 device pci c.0 on end # PCI E 2
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"
234 end
235 end
236 device pci 18.1 on end
237 device pci 18.2 on end
238 device pci 18.3 on end
239 end
240 end
241end