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)
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.
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.
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
25 ## Compute the location and size of where this firmware image
26 ## (linuxBIOS plus bootloader) will live in the boot rom chip.
29 default ROM_SECTION_SIZE = FAILOVER_SIZE
30 default ROM_SECTION_OFFSET = (ROM_SIZE - FAILOVER_SIZE)
33 default ROM_SECTION_SIZE = FALLBACK_SIZE
34 default ROM_SECTION_OFFSET = (ROM_SIZE - FALLBACK_SIZE - FAILOVER_SIZE)
36 default ROM_SECTION_SIZE = (ROM_SIZE - FALLBACK_SIZE - FAILOVER_SIZE)
37 default ROM_SECTION_OFFSET = 0
42 ## Compute the start location and size size of the LinuxBIOS bootloader.
44 default PAYLOAD_SIZE = (ROM_SECTION_SIZE - ROM_IMAGE_SIZE)
45 default CONFIG_ROM_PAYLOAD_START = (0xffffffff - ROM_SIZE + ROM_SECTION_OFFSET + 1)
48 ## Compute where this copy of LinuxBIOS will start in the boot ROM.
50 default _ROMBASE = ( CONFIG_ROM_PAYLOAD_START + PAYLOAD_SIZE )
53 ## Compute a range of ROM that can be cached to speed up LinuxBIOS
56 ## XIP_ROM_SIZE must be a power of 2 (here 64 Kbyte)
57 ## XIP_ROM_BASE must be a multiple of XIP_ROM_SIZE
59 default XIP_ROM_SIZE = (64 * 1024)
62 default XIP_ROM_BASE = (_ROMBASE - XIP_ROM_SIZE + ROM_IMAGE_SIZE)
65 default XIP_ROM_BASE = (_ROMBASE - XIP_ROM_SIZE + ROM_IMAGE_SIZE + FAILOVER_SIZE)
67 default XIP_ROM_BASE = (_ROMBASE - XIP_ROM_SIZE + ROM_IMAGE_SIZE)
74 ## Build the objects we have code for in this directory.
79 #dir /drivers/ati/ragexl
81 # Needed by irq_tables and mptable and acpi_tables.
95 depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
96 action "$(CC) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o $@"
100 depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
101 action "$(CC) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -S -o $@"
102 action "perl -e 's/.rodata/.rom.data/g' -pi $@"
103 action "perl -e 's/.text/.section .rom.text/g' -pi $@"
109 ## Build our 16 bit and 32 bit LinuxBIOS entry code.
111 if HAVE_FAILOVER_BOOT
112 if USE_FAILOVER_IMAGE
113 mainboardinit cpu/x86/16bit/entry16.inc
114 ldscript /cpu/x86/16bit/entry16.lds
117 if USE_FALLBACK_IMAGE
118 mainboardinit cpu/x86/16bit/entry16.inc
119 ldscript /cpu/x86/16bit/entry16.lds
123 mainboardinit cpu/x86/32bit/entry32.inc
127 ldscript /cpu/x86/32bit/entry32.lds
128 ldscript /cpu/amd/car/cache_as_ram.lds
133 ## Build our reset vector (this is where LinuxBIOS is entered).
135 if HAVE_FAILOVER_BOOT
136 if USE_FAILOVER_IMAGE
137 mainboardinit cpu/x86/16bit/reset16.inc
138 ldscript /cpu/x86/16bit/reset16.lds
140 mainboardinit cpu/x86/32bit/reset32.inc
141 ldscript /cpu/x86/32bit/reset32.lds
144 if USE_FALLBACK_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
155 ### Should this be in the northbridge code?
156 mainboardinit arch/i386/lib/cpu_reset.inc
160 ## Include an ID string (for safe flashing).
162 mainboardinit southbridge/nvidia/ck804/id.inc
163 ldscript /southbridge/nvidia/ck804/id.lds
166 ## ROMSTRAP table for CK804
168 if HAVE_FAILOVER_BOOT
169 if USE_FAILOVER_IMAGE
170 mainboardinit southbridge/nvidia/ck804/romstrap.inc
171 ldscript /southbridge/nvidia/ck804/romstrap.lds
174 if USE_FALLBACK_IMAGE
175 mainboardinit southbridge/nvidia/ck804/romstrap.inc
176 ldscript /southbridge/nvidia/ck804/romstrap.lds
182 ## Setup Cache-As-Ram
184 mainboardinit cpu/amd/car/cache_as_ram.inc
189 ### This is the early phase of LinuxBIOS startup.
190 ### Things are delicate and we test to see if we should
191 ### failover to another image.
193 if HAVE_FAILOVER_BOOT
194 if USE_FAILOVER_IMAGE
196 ldscript /arch/i386/lib/failover_failover.lds
200 if USE_FALLBACK_IMAGE
202 ldscript /arch/i386/lib/failover.lds
208 ### O.k. We aren't just an intermediary anymore!
218 mainboardinit ./auto.inc
223 ## Include the secondary configuration files
229 chip northbridge/amd/amdk8/root_complex # Root complex
230 device apic_cluster 0 on # APIC cluster
231 chip cpu/amd/socket_939 # Socket 939 CPU
232 device apic 0 on end # APIC
236 device pci_domain 0 on # PCI domain
237 chip northbridge/amd/amdk8 # mc0
238 device pci 18.0 on # Northbridge
239 # Devices on link 0, link 0 == LDT 0
240 chip southbridge/nvidia/ck804 # Southbridge
241 device pci 0.0 on end # HT
242 device pci 1.0 on # LPC
243 chip superio/ite/it8712f # Super I/O
244 device pnp 2e.0 off # Floppy
249 device pnp 2e.1 on # Com1
253 device pnp 2e.2 off # Com2
257 device pnp 2e.3 on # Parallel port
261 device pnp 2e.4 on # Environment controller
266 device pnp 2e.5 on # PS/2 keyboard
272 device pnp 2e.6 on # PS/2 mouse
276 device pnp 2e.7 on # GPIO config
281 # GPIO Polarity for Set 3
283 # GPIO Pin Internal Pull up for Set 3
285 # Simple I/O register config
291 device pnp 2e.8 off end # Midi port
292 device pnp 2e.9 off end # Game port
293 device pnp 2e.a off end # IR
296 device pci 1.1 on # SM 0
297 # chip drivers/generic/generic #dimm 0-0-0
298 # device i2c 50 on end
300 # chip drivers/generic/generic #dimm 0-0-1
301 # device i2c 51 on end
303 # chip drivers/generic/generic #dimm 0-1-0
304 # device i2c 52 on end
306 # chip drivers/generic/generic #dimm 0-1-1
307 # device i2c 53 on end
309 # chip drivers/generic/generic #dimm 1-0-0
310 # device i2c 54 on end
312 # chip drivers/generic/generic #dimm 1-0-1
313 # device i2c 55 on end
315 # chip drivers/generic/generic #dimm 1-1-0
316 # device i2c 56 on end
318 # chip drivers/generic/generic #dimm 1-1-1
319 # device i2c 57 on end
322 device pci 2.0 on end # USB 1.1
323 device pci 2.1 on end # USB 2
324 device pci 4.0 off end # Onboard audio (ACI)
325 device pci 4.1 off end # Onboard modem (MCI)
326 device pci 6.0 on end # IDE
327 device pci 7.0 on end # SATA 1
328 device pci 8.0 on end # SATA 0
329 device pci 9.0 on end # PCI
330 device pci a.0 on end # NIC
331 device pci b.0 on end # PCI E 3
332 device pci c.0 on end # PCI E 2
333 device pci d.0 on end # PCI E 1
334 device pci e.0 on end # PCI E 0
335 register "ide0_enable" = "1"
336 register "ide1_enable" = "1"
337 register "sata0_enable" = "1"
338 register "sata1_enable" = "1"
339 # register "mac_eeprom_smbus" = "3"
340 # register "mac_eeprom_addr" = "0x51"
343 device pci 18.1 on end
344 device pci 18.2 on end
345 device pci 18.3 on end