2 ## This file is part of the coreboot project.
4 ## Copyright (C) 2007 AMD
5 ## Written by Yinghai Lu <yinghailu@amd.com> for AMD.
7 ## This program is free software; you can redistribute it and/or modify
8 ## it under the terms of the GNU General Public License as published by
9 ## the Free Software Foundation; either version 2 of the License, or
10 ## (at your option) any later version.
12 ## This program is distributed in the hope that it will be useful,
13 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ## GNU General Public License for more details.
17 ## You should have received a copy of the GNU General Public License
18 ## along with this program; if not, write to the Free Software
19 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 ## Compute the location and size of where this firmware image
24 ## (linuxBIOS plus bootloader) will live in the boot rom chip.
27 default ROM_SECTION_SIZE = FAILOVER_SIZE
28 default ROM_SECTION_OFFSET = ( ROM_SIZE - FAILOVER_SIZE )
31 default ROM_SECTION_SIZE = FALLBACK_SIZE
32 default ROM_SECTION_OFFSET = ( ROM_SIZE - FALLBACK_SIZE - FAILOVER_SIZE )
34 default ROM_SECTION_SIZE = ( ROM_SIZE - FALLBACK_SIZE - FAILOVER_SIZE )
35 default ROM_SECTION_OFFSET = 0
40 ## Compute the start location and size size of
41 ## The linuxBIOS bootloader.
43 default PAYLOAD_SIZE = ( ROM_SECTION_SIZE - ROM_IMAGE_SIZE )
44 default CONFIG_ROM_PAYLOAD_START = (0xffffffff - ROM_SIZE + ROM_SECTION_OFFSET + 1)
47 ## Compute where this copy of linuxBIOS will start in the boot rom
49 default _ROMBASE = ( CONFIG_ROM_PAYLOAD_START + PAYLOAD_SIZE )
52 ## Compute a range of ROM that can cached to speed up linuxBIOS,
55 ## XIP_ROM_SIZE must be a power of 2.
56 ## XIP_ROM_BASE must be a multiple of XIP_ROM_SIZE
58 default XIP_ROM_SIZE=65536
61 default XIP_ROM_BASE = ( _ROMBASE - XIP_ROM_SIZE + ROM_IMAGE_SIZE)
64 default XIP_ROM_BASE = ( _ROMBASE - XIP_ROM_SIZE + ROM_IMAGE_SIZE + FAILOVER_SIZE)
66 default XIP_ROM_BASE = ( _ROMBASE - XIP_ROM_SIZE + ROM_IMAGE_SIZE)
73 ## Build the objects we have code for in this directory.
77 #needed by irq_tables and mptable and acpi_tables
80 if HAVE_MP_TABLE object mptable.o end
81 if HAVE_PIRQ_TABLE object irq_tables.o end
87 makerule ./cache_as_ram_auto.o
88 depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
89 action "$(CC) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o $@"
92 makerule ./cache_as_ram_auto.inc
93 depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
94 action "$(CC) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -S -o $@"
95 action "perl -e 's/.rodata/.rom.data/g' -pi $@"
96 action "perl -e 's/.text/.section .rom.text/g' -pi $@"
102 if USE_FAILOVER_IMAGE
104 if CONFIG_AP_CODE_IN_CAR
105 makerule ./apc_auto.o
106 depends "$(MAINBOARD)/apc_auto.c option_table.h"
107 action "$(CC) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/apc_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o $@"
109 ldscript /arch/i386/init/ldscript_apc.lb
115 ## Build our 16 bit and 32 bit linuxBIOS entry code
117 if HAVE_FAILOVER_BOOT
118 if USE_FAILOVER_IMAGE
119 mainboardinit cpu/x86/16bit/entry16.inc
120 ldscript /cpu/x86/16bit/entry16.lds
123 if USE_FALLBACK_IMAGE
124 mainboardinit cpu/x86/16bit/entry16.inc
125 ldscript /cpu/x86/16bit/entry16.lds
129 mainboardinit cpu/x86/32bit/entry32.inc
133 ldscript /cpu/x86/32bit/entry32.lds
137 ldscript /cpu/amd/car/cache_as_ram.lds
143 ## Build our reset vector (This is where linuxBIOS is entered)
145 if HAVE_FAILOVER_BOOT
146 if USE_FAILOVER_IMAGE
147 mainboardinit cpu/x86/16bit/reset16.inc
148 ldscript /cpu/x86/16bit/reset16.lds
150 mainboardinit cpu/x86/32bit/reset32.inc
151 ldscript /cpu/x86/32bit/reset32.lds
154 if USE_FALLBACK_IMAGE
155 mainboardinit cpu/x86/16bit/reset16.inc
156 ldscript /cpu/x86/16bit/reset16.lds
158 mainboardinit cpu/x86/32bit/reset32.inc
159 ldscript /cpu/x86/32bit/reset32.lds
164 ## Include an id string (For safe flashing)
166 mainboardinit southbridge/nvidia/mcp55/id.inc
167 ldscript /southbridge/nvidia/mcp55/id.lds
170 ## ROMSTRAP table for MCP55
172 if HAVE_FAILOVER_BOOT
173 if USE_FAILOVER_IMAGE
174 mainboardinit southbridge/nvidia/mcp55/romstrap.inc
175 ldscript /southbridge/nvidia/mcp55/romstrap.lds
178 if USE_FALLBACK_IMAGE
179 mainboardinit southbridge/nvidia/mcp55/romstrap.inc
180 ldscript /southbridge/nvidia/mcp55/romstrap.lds
186 ## Setup Cache-As-Ram
188 mainboardinit cpu/amd/car/cache_as_ram.inc
192 ### This is the early phase of linuxBIOS startup
193 ### Things are delicate and we test to see if we should
194 ### failover to another image.
196 if HAVE_FAILOVER_BOOT
197 if USE_FAILOVER_IMAGE
199 ldscript /arch/i386/lib/failover_failover.lds
203 if USE_FALLBACK_IMAGE
205 ldscript /arch/i386/lib/failover.lds
216 initobject cache_as_ram_auto.o
218 mainboardinit ./cache_as_ram_auto.inc
223 ## Include the secondary Configuration files
229 chip northbridge/amd/amdk8/root_complex
230 device apic_cluster 0 on
231 chip cpu/amd/socket_F
235 device pci_domain 0 on
236 chip northbridge/amd/amdk8 #mc0
237 device pci 18.0 on end
238 device pci 18.0 on end
240 # devices on link 0, link 0 == LDT 0
241 chip southbridge/nvidia/mcp55
242 device pci 0.0 on end # HT
243 device pci 1.0 on # LPC
244 chip superio/winbond/w83627hf
245 device pnp 2e.0 off # Floppy
250 device pnp 2e.1 off # Parallel Port
254 device pnp 2e.2 on # Com1
258 device pnp 2e.3 on # Com2
262 device pnp 2e.5 on # Keyboard
268 device pnp 2e.6 off # SFI
271 device pnp 2e.7 off # GPIO_GAME_MIDI
276 device pnp 2e.8 off end # WDTO_PLED
277 device pnp 2e.9 off end # GPIO_SUSLED
278 device pnp 2e.a off end # ACPI
279 device pnp 2e.b on # HW Monitor
285 device pci 1.1 on # SM 0
286 chip drivers/generic/generic #dimm 0-0-0
289 chip drivers/generic/generic #dimm 0-0-1
292 chip drivers/generic/generic #dimm 0-1-0
295 chip drivers/generic/generic #dimm 0-1-1
298 chip drivers/generic/generic #dimm 1-0-0
301 chip drivers/generic/generic #dimm 1-0-1
304 chip drivers/generic/generic #dimm 1-1-0
307 chip drivers/generic/generic #dimm 1-1-1
311 device pci 1.1 on # SM 1
312 #PCI device smbus address will depend on addon pci device, do we need to scan_smbus_bus?
313 # chip drivers/generic/generic #PCIXA Slot1
314 # device i2c 50 on end
316 # chip drivers/generic/generic #PCIXB Slot1
317 # device i2c 51 on end
319 # chip drivers/generic/generic #PCIXB Slot2
320 # device i2c 52 on end
322 # chip drivers/generic/generic #PCI Slot1
323 # device i2c 53 on end
325 # chip drivers/generic/generic #Master MCP55 PCI-E
326 # device i2c 54 on end
328 # chip drivers/generic/generic #Slave MCP55 PCI-E
329 # device i2c 55 on end
331 chip drivers/generic/generic #MAC EEPROM
336 device pci 2.0 on end # USB 1.1
337 device pci 2.1 on end # USB 2
338 device pci 4.0 on end # IDE
339 device pci 5.0 on end # SATA 0
340 device pci 5.1 on end # SATA 1
341 device pci 5.2 on end # SATA 2
342 device pci 6.0 on end # PCI
343 device pci 6.1 off end # AZA
344 device pci 8.0 on end # NIC
345 device pci 9.0 on end # NIC
346 device pci a.0 on end # PCI E 5
347 device pci b.0 off end # PCI E 4
348 device pci c.0 off end # PCI E 3
349 device pci d.0 on end # PCI E 2
350 device pci e.0 off end # PCI E 1
351 device pci f.0 on end # PCI E 0
352 register "ide0_enable" = "1"
353 register "sata0_enable" = "1"
354 register "sata1_enable" = "1"
355 register "mac_eeprom_smbus" = "3" # 1: smbus under 2e.8, 2: SM0 3: SM1
356 register "mac_eeprom_addr" = "0x51"
358 end # device pci 18.0
359 device pci 18.1 on end
360 device pci 18.2 on end
361 device pci 18.3 on end
366 # chip drivers/generic/debug
367 # device pnp 0.0 off end # chip name
368 # device pnp 0.1 on end # pci_regs_all
369 # device pnp 0.2 on end # mem
370 # device pnp 0.3 off end # cpuid
371 # device pnp 0.4 on end # smbus_regs_all
372 # device pnp 0.5 off end # dual core msr
373 # device pnp 0.6 off end # cache size
374 # device pnp 0.7 off end # tsc
375 # device pnp 0.8 off end # io
376 # device pnp 0.9 off end # io