2 ## This file is part of the coreboot project.
4 ## Copyright (C) 2006 AMD
5 ## Written by Yinghai Lu <yinghailu@gmail.com> for AMD.
7 ## Copyright (C) 2006 MSI
8 ## Written by bxshi <bingxunshi@gmail.com> for MSI.
10 ## This program is free software; you can redistribute it and/or modify
11 ## it under the terms of the GNU General Public License as published by
12 ## the Free Software Foundation; either version 2 of the License, or
13 ## (at your option) any later version.
15 ## This program is distributed in the hope that it will be useful,
16 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ## GNU General Public License for more details.
20 ## You should have received a copy of the GNU General Public License
21 ## along with this program; if not, write to the Free Software
22 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 ## Compute the location and size of where this firmware image
27 ## (coreboot plus bootloader) will live in the boot rom chip.
30 default ROM_SECTION_SIZE = FALLBACK_SIZE
31 default ROM_SECTION_OFFSET = ( ROM_SIZE - FALLBACK_SIZE )
33 default ROM_SECTION_SIZE = ( ROM_SIZE - FALLBACK_SIZE )
34 default ROM_SECTION_OFFSET = 0
38 ## Compute the start location and size size of
39 ## The coreboot bootloader.
41 default PAYLOAD_SIZE = ( ROM_SECTION_SIZE - ROM_IMAGE_SIZE )
42 default CONFIG_ROM_PAYLOAD_START = (0xffffffff - ROM_SIZE + ROM_SECTION_OFFSET + 1)
45 ## Compute where this copy of coreboot will start in the boot rom
47 default _ROMBASE = ( CONFIG_ROM_PAYLOAD_START + PAYLOAD_SIZE )
50 ## Compute a range of ROM that can cached to speed up coreboot,
53 ## XIP_ROM_SIZE must be a power of 2.
54 ## XIP_ROM_BASE must be a multiple of XIP_ROM_SIZE
56 default XIP_ROM_SIZE=65536
57 default XIP_ROM_BASE = ( _ROMBASE + ROM_IMAGE_SIZE - XIP_ROM_SIZE )
62 ## Build the objects we have code for in this directory.
69 #needed by irq_tables and mptable and acpi_tables
83 # compile cache_as_ram.c to auto.o
84 makerule ./cache_as_ram_auto.o
85 depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
86 action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o $@"
90 #compile cache_as_ram.c to auto.inc
91 makerule ./cache_as_ram_auto.inc
92 depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
93 action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall $(DEBUG_CFLAGS) -c -S -o $@"
94 action "perl -e 's/\.rodata/.rom.data/g' -pi $@"
95 action "perl -e 's/\.text/.section .rom.text/g' -pi $@"
101 ## Build our 16 bit and 32 bit coreboot entry code
104 if USE_FALLBACK_IMAGE
105 mainboardinit cpu/x86/16bit/entry16.inc
106 ldscript /cpu/x86/16bit/entry16.lds
109 mainboardinit cpu/x86/32bit/entry32.inc
112 ldscript /cpu/x86/32bit/entry32.lds
116 ldscript /cpu/amd/car/cache_as_ram.lds
121 ## Build our reset vector (This is where coreboot is entered)
123 if USE_FALLBACK_IMAGE
124 mainboardinit cpu/x86/16bit/reset16.inc
125 ldscript /cpu/x86/16bit/reset16.lds
127 mainboardinit cpu/x86/32bit/reset32.inc
128 ldscript /cpu/x86/32bit/reset32.lds
132 ## Include an id string (For safe flashing)
134 mainboardinit arch/i386/lib/id.inc
135 ldscript /arch/i386/lib/id.lds
139 ## Setup Cache-As-Ram
141 mainboardinit cpu/amd/car/cache_as_ram.inc
145 ### This is the early phase of coreboot startup
146 ### Things are delicate and we test to see if we should
147 ### failover to another image.
149 if USE_FALLBACK_IMAGE
151 ldscript /arch/i386/lib/failover.lds
156 ### O.k. We aren't just an intermediary anymore!
165 initobject cache_as_ram_auto.o
167 mainboardinit ./cache_as_ram_auto.inc
173 ## Include the secondary Configuration files
177 # sample config for amd/serengeti_cheetah
178 chip northbridge/amd/amdk8/root_complex
179 device apic_cluster 0 on
180 chip cpu/amd/socket_F
184 device pci_domain 0 on
185 chip northbridge/amd/amdk8
186 device pci 18.0 on end
187 device pci 18.0 on end
188 device pci 18.0 on # northbridge
190 chip southbridge/broadcom/bcm5780 # HT2000
191 device pci 0.0 on end # PXB 1 0x0130
192 device pci 1.0 on # PXB 2 0x0130
193 device pci 4.0 on end # GB E 0x1668 vid = 0x14e4
194 device pci 4.1 on end # GB E 0x1669 vid = 0x14e4
196 device pci 2.0 on end # PCI E 1 #0x0132
197 device pci 3.0 on end # PCI E 2
198 device pci 4.0 on end # PCI E 3
199 device pci 5.0 on end # PCI E 4
201 chip southbridge/broadcom/bcm5785 # HT1000
202 device pci 0.0 on # HT PXB 0x0036
203 device pci d.0 on end # PPBX 0x0104
204 device pci e.0 on end # SATA 0x024a
205 device pci e.1 on end # SATA 0x024a bx_a001
206 device pci e.2 on end # SATA 0x024a bx_a001
207 device pci e.3 on end # SATA 0x024a bx_a001
209 device pci 1.0 on # Legacy pci main 0x0205
211 device pci 1.1 on end # IDE 0x0214
212 device pci 1.2 on # LPC 0x0234
213 chip superio/nsc/pc87417
214 device pnp 2e.0 off # Floppy
219 device pnp 2e.1 off # Parallel Port
223 device pnp 2e.2 off # Com 2
227 device pnp 2e.3 on # Com 1
231 device pnp 2e.4 off end # SWC
232 device pnp 2e.5 off end # Mouse
233 device pnp 2e.6 on # Keyboard
238 device pnp 2e.7 off end # GPIO
239 device pnp 2e.f off end # XBUS
240 device pnp 2e.10 on #RTC
246 device pci 1.3 on end # WDTimer 0x0238
247 device pci 1.4 on end # XIOAPIC0 0x0235
248 device pci 1.5 on end # XIOAPIC1
249 device pci 1.6 on end # XIOAPIC2
250 device pci 2.0 on end # USB 0x0223
251 device pci 2.1 on end # USB
252 device pci 2.2 on end # USB
253 #when HT_CHAIN_END_UNITID_BASE (0,1) < HT_CHAIN_UNITID_BASE (6,,,,),
254 chip drivers/pci/onboard
255 device pci 3.0 on end # it is in bcm5785_0 bus, but the device id can not be changed even unitid is changed, fake one to get the rom_address
256 # if HT_CHAIN_END_UNITID_BASE=0, it is 4, if HT_CHAIN_END_UNITID_BASE=1, it is 3
257 register "rom_address" = "0xfff80000"
260 #chip drivers/pci/onboard #SATA2
261 # device pci 5.0 on end
262 # device pci 5.1 on end
263 # device pci 5.2 on end
264 # device pci 5.3 on end
269 #when HT_CHAIN_END_UNITID_BASE > HT_CHAIN_UNITID_BASE (6, ,,,,)
270 # chip drivers/pci/onboard
271 # device pci 0.0 on end # fake, will be disabled
273 # chip drivers/pci/onboard
274 # device pci 4.0 on end # it is in bcm5785_0 bus, but the device id can not be changed even unitid is changed
275 # register "rom_address" = "0xfff80000"
278 end # device pci 18.0
279 device pci 18.1 on end
280 device pci 18.2 on end
281 device pci 18.3 on end
284 # chip drivers/generic/debug
285 # device pnp 0.0 off end # chip name
286 # device pnp 0.1 on end # pci_regs_all
287 # device pnp 0.2 off end # mem
288 # device pnp 0.3 off end # cpuid
289 # device pnp 0.4 off end # smbus_regs_all
290 # device pnp 0.5 off end # dual core msr
291 # device pnp 0.6 off end # cache size
292 # device pnp 0.7 off end # tsc