2 ## This file is part of the coreboot project.
4 ## This program is free software; you can redistribute it and/or modify
5 ## it under the terms of the GNU General Public License as published by
6 ## the Free Software Foundation; either version 2 of the License, or
7 ## (at your option) any later version.
9 ## This program is distributed in the hope that it will be useful,
10 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ## GNU General Public License for more details.
14 ## You should have received a copy of the GNU General Public License
15 ## along with this program; if not, write to the Free Software
16 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 ## Compute the location and size of where this firmware image
21 ## (coreboot plus bootloader) will live in the boot rom chip.
24 default ROM_SECTION_SIZE = FAILOVER_SIZE
25 default ROM_SECTION_OFFSET = ( ROM_SIZE - FAILOVER_SIZE )
28 default ROM_SECTION_SIZE = FALLBACK_SIZE
29 default ROM_SECTION_OFFSET = ( ROM_SIZE - FALLBACK_SIZE - FAILOVER_SIZE )
31 default ROM_SECTION_SIZE = ( ROM_SIZE - FALLBACK_SIZE - FAILOVER_SIZE )
32 default ROM_SECTION_OFFSET = 0
37 ## Compute the start location and size size of
38 ## The coreboot bootloader.
40 default PAYLOAD_SIZE = ( ROM_SECTION_SIZE - ROM_IMAGE_SIZE )
41 default CONFIG_ROM_PAYLOAD_START = (0xffffffff - ROM_SIZE + ROM_SECTION_OFFSET + 1)
44 ## Compute where this copy of coreboot will start in the boot rom
46 default _ROMBASE = ( CONFIG_ROM_PAYLOAD_START + PAYLOAD_SIZE )
49 ## Compute a range of ROM that can cached to speed up coreboot,
52 ## XIP_ROM_SIZE must be a power of 2.
53 ## XIP_ROM_BASE must be a multiple of XIP_ROM_SIZE
55 default XIP_ROM_SIZE=65536
58 default XIP_ROM_BASE = ( _ROMBASE - XIP_ROM_SIZE + ROM_IMAGE_SIZE)
61 default XIP_ROM_BASE = ( _ROMBASE - XIP_ROM_SIZE + ROM_IMAGE_SIZE + FAILOVER_SIZE)
63 default XIP_ROM_BASE = ( _ROMBASE - XIP_ROM_SIZE + ROM_IMAGE_SIZE)
70 ## Build the objects we have code for in this directory.
74 #needed by irq_tables and mptable and acpi_tables
77 if HAVE_MP_TABLE object mptable.o end
78 if HAVE_PIRQ_TABLE object irq_tables.o end
84 depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
85 action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o auto.o"
89 depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
90 action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -g -dA -fverbose-asm -c -S -o $@"
91 action "perl -e 's/\.rodata/.rom.data/g' -pi $@"
92 action "perl -e 's/\.text/.section .rom.text/g' -pi $@"
100 if CONFIG_AP_CODE_IN_CAR
101 makerule ./apc_auto.o
102 depends "$(MAINBOARD)/apc_auto.c option_table.h"
103 action "$(CC) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/apc_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o $@"
105 ldscript /arch/i386/init/ldscript_apc.lb
111 ## Build our 16 bit and 32 bit coreboot entry code
113 if HAVE_FAILOVER_BOOT
114 if USE_FAILOVER_IMAGE
115 mainboardinit cpu/x86/16bit/entry16.inc
116 ldscript /cpu/x86/16bit/entry16.lds
119 if USE_FALLBACK_IMAGE
120 mainboardinit cpu/x86/16bit/entry16.inc
121 ldscript /cpu/x86/16bit/entry16.lds
125 mainboardinit cpu/x86/32bit/entry32.inc
129 ldscript /cpu/x86/32bit/entry32.lds
133 ldscript /cpu/amd/car/cache_as_ram.lds
139 ## Build our reset vector (This is where coreboot is entered)
141 if HAVE_FAILOVER_BOOT
142 if USE_FAILOVER_IMAGE
143 mainboardinit cpu/x86/16bit/reset16.inc
144 ldscript /cpu/x86/16bit/reset16.lds
146 mainboardinit cpu/x86/32bit/reset32.inc
147 ldscript /cpu/x86/32bit/reset32.lds
150 if USE_FALLBACK_IMAGE
151 mainboardinit cpu/x86/16bit/reset16.inc
152 ldscript /cpu/x86/16bit/reset16.lds
154 mainboardinit cpu/x86/32bit/reset32.inc
155 ldscript /cpu/x86/32bit/reset32.lds
160 ## Include an id string (For safe flashing)
162 mainboardinit southbridge/nvidia/mcp55/id.inc
163 ldscript /southbridge/nvidia/mcp55/id.lds
166 ## ROMSTRAP table for MCP55
168 if HAVE_FAILOVER_BOOT
169 if USE_FAILOVER_IMAGE
170 mainboardinit southbridge/nvidia/mcp55/romstrap.inc
171 ldscript /southbridge/nvidia/mcp55/romstrap.lds
174 if USE_FALLBACK_IMAGE
175 mainboardinit southbridge/nvidia/mcp55/romstrap.inc
176 ldscript /southbridge/nvidia/mcp55/romstrap.lds
182 ## Setup Cache-As-Ram
184 mainboardinit cpu/amd/car/cache_as_ram.inc
188 ### This is the early phase of coreboot startup
189 ### Things are delicate and we test to see if we should
190 ### failover to another image.
192 if HAVE_FAILOVER_BOOT
193 if USE_FAILOVER_IMAGE
195 ldscript /arch/i386/lib/failover_failover.lds
199 if USE_FALLBACK_IMAGE
201 ldscript /arch/i386/lib/failover.lds
214 mainboardinit ./auto.inc
219 ## Include the secondary Configuration files
223 chip northbridge/amd/amdk8/root_complex
224 device apic_cluster 0 on
225 chip cpu/amd/socket_F
229 device pci_domain 0 on
230 chip northbridge/amd/amdk8 #mc0
231 device pci 18.0 on end
232 device pci 18.0 on end
234 # devices on link 0, link 0 == LDT 0
235 chip southbridge/nvidia/mcp55
236 device pci 0.0 on end # HT
237 device pci 1.0 on # LPC
238 chip superio/winbond/w83627hf
239 device pnp 2e.0 off # Floppy
244 device pnp 2e.1 off # Parallel Port
248 device pnp 2e.2 on # Com1
252 device pnp 2e.3 off # Com2
256 device pnp 2e.5 on # Keyboard
262 device pnp 2e.6 off # SFI
265 device pnp 2e.7 off # GPIO_GAME_MIDI
270 device pnp 2e.8 off end # WDTO_PLED
271 device pnp 2e.9 off end # GPIO_SUSLED
272 device pnp 2e.a off end # ACPI
273 device pnp 2e.b on # HW Monitor
279 device pci 1.1 on # SM 0
280 chip drivers/i2c/i2cmux2
281 device i2c 48 off end
282 device i2c 49 off end
285 device pci 1.1 on # SM 1
286 #PCI device smbus address will depend on addon pci device, do we need to scan_smbus_bus?
287 # chip drivers/generic/generic #PCIXA Slot1
288 # device i2c 50 on end
290 # chip drivers/generic/generic #PCIXB Slot1
291 # device i2c 51 on end
293 # chip drivers/generic/generic #PCIXB Slot2
294 # device i2c 52 on end
296 # chip drivers/generic/generic #PCI Slot1
297 # device i2c 53 on end
299 # chip drivers/generic/generic #Master MCP55 PCI-E
300 # device i2c 54 on end
302 # chip drivers/generic/generic #Slave MCP55 PCI-E
303 # device i2c 55 on end
305 chip drivers/generic/generic #MAC EEPROM
310 device pci 2.0 on end # USB 1.1
311 device pci 2.1 on end # USB 2
312 device pci 4.0 on end # IDE
313 device pci 5.0 on end # SATA 0
314 device pci 5.1 on end # SATA 1
315 device pci 5.2 on end # SATA 2
316 device pci 6.0 on # PCI
317 chip drivers/pci/onboard
318 device pci 6.0 on end
319 register "rom_address" = "0xfff00000" #for 1M
320 # register "rom_address" = "0xfff80000" #for 512K
323 device pci 6.1 on end # AZA
324 device pci 8.0 on end # NIC
325 device pci 9.0 on end # NIC
326 device pci a.0 on # PCI E 5
327 device pci 0.0 on #nec pci-x
329 device pci 0.1 on #nec pci-x
330 device pci 4.0 on end #scsi
331 device pci 4.1 on end #scsi
334 device pci b.0 on end # PCI E 4
335 device pci c.0 on end # PCI E 3
336 device pci d.0 on end # PCI E 2
337 device pci e.0 on end # PCI E 1
338 device pci f.0 on end # PCI E 0
339 register "ide0_enable" = "1"
340 register "sata0_enable" = "1"
341 register "sata1_enable" = "1"
342 register "mac_eeprom_smbus" = "3" # 1: smbus under 2e.8, 2: SM0 3: SM1
343 register "mac_eeprom_addr" = "0x51"
345 end # device pci 18.0
346 device pci 18.1 on end
347 device pci 18.2 on end
348 device pci 18.3 on end
353 # chip drivers/generic/debug
354 # device pnp 0.0 off end # chip name
355 # device pnp 0.1 on end # pci_regs_all
356 # device pnp 0.2 off end # mem
357 # device pnp 0.3 off end # cpuid
358 # device pnp 0.4 on end # smbus_regs_all
359 # device pnp 0.5 off end # dual core msr
360 # device pnp 0.6 off end # cache size
361 # device pnp 0.7 off end # tsc
362 # device pnp 0.8 off end # io
363 # device pnp 0.9 on end # io