2 ## Compute the location and size of where this firmware image
3 ## (linuxBIOS plus bootloader) will live in the boot rom chip.
6 default ROM_SECTION_SIZE = FAILOVER_SIZE
7 default ROM_SECTION_OFFSET = ( ROM_SIZE - FAILOVER_SIZE )
10 default ROM_SECTION_SIZE = FALLBACK_SIZE
11 default ROM_SECTION_OFFSET = ( ROM_SIZE - FALLBACK_SIZE - FAILOVER_SIZE )
13 default ROM_SECTION_SIZE = ( ROM_SIZE - FALLBACK_SIZE - FAILOVER_SIZE )
14 default ROM_SECTION_OFFSET = 0
19 ## Compute the start location and size size of
20 ## The linuxBIOS bootloader.
22 default PAYLOAD_SIZE = ( ROM_SECTION_SIZE - ROM_IMAGE_SIZE )
23 default CONFIG_ROM_STREAM_START = (0xffffffff - ROM_SIZE + ROM_SECTION_OFFSET + 1)
26 ## Compute where this copy of linuxBIOS will start in the boot rom
28 default _ROMBASE = ( CONFIG_ROM_STREAM_START + PAYLOAD_SIZE )
31 ## Compute a range of ROM that can cached to speed up linuxBIOS,
34 ## XIP_ROM_SIZE must be a power of 2.
35 ## XIP_ROM_BASE must be a multiple of XIP_ROM_SIZE
37 default XIP_ROM_SIZE=65536
40 default XIP_ROM_BASE = ( _ROMBASE - XIP_ROM_SIZE + ROM_IMAGE_SIZE)
43 default XIP_ROM_BASE = ( _ROMBASE - XIP_ROM_SIZE + ROM_IMAGE_SIZE + FAILOVER_SIZE)
45 default XIP_ROM_BASE = ( _ROMBASE - XIP_ROM_SIZE + ROM_IMAGE_SIZE)
52 ## Build the objects we have code for in this directory.
59 #needed by irq_tables and mptable and acpi_tables
71 # object acpi_tables.o
73 # if SB_HT_CHAIN_ON_BUS0
80 # if SB_HT_CHAIN_ON_BUS0
92 depends "$(MAINBOARD)/dx/dsdt_lb.dsl"
93 action "/usr/sbin/iasl -tc $(MAINBOARD)/dx/dsdt_lb.dsl"
94 action "mv dsdt_lb.hex dsdt.c"
98 #./ssdt.o is moved to northbridge/amd/amdk8/Config.lb
102 depends "$(MAINBOARD)/dx/pci2.asl"
103 action "/usr/sbin/iasl -tc $(MAINBOARD)/dx/pci2.asl"
104 action "perl -pi -e 's/AmlCode/AmlCode_ssdt2/g' pci2.hex"
105 action "mv pci2.hex ssdt2.c"
114 # compile cache_as_ram.c to auto.o
115 makerule ./cache_as_ram_auto.o
116 depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
117 action "$(CC) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o $@"
121 #compile cache_as_ram.c to auto.inc
122 makerule ./cache_as_ram_auto.inc
123 depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
124 action "$(CC) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -S -o $@"
125 action "perl -e 's/.rodata/.rom.data/g' -pi $@"
126 action "perl -e 's/.text/.section .rom.text/g' -pi $@"
132 if USE_FAILOVER_IMAGE
134 if CONFIG_AP_CODE_IN_CAR
135 makerule ./apc_auto.o
136 depends "$(MAINBOARD)/apc_auto.c option_table.h"
137 action "$(CC) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/apc_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o $@"
139 ldscript /arch/i386/init/ldscript_apc.lb
144 ## Build our 16 bit and 32 bit linuxBIOS entry code
147 if HAVE_FAILOVER_BOOT
148 if USE_FAILOVER_IMAGE
149 mainboardinit cpu/x86/16bit/entry16.inc
150 ldscript /cpu/x86/16bit/entry16.lds
153 if USE_FALLBACK_IMAGE
154 mainboardinit cpu/x86/16bit/entry16.inc
155 ldscript /cpu/x86/16bit/entry16.lds
159 mainboardinit cpu/x86/32bit/entry32.inc
162 ldscript /cpu/x86/32bit/entry32.lds
166 ldscript /cpu/amd/car/cache_as_ram.lds
171 ## Build our reset vector (This is where linuxBIOS is entered)
173 if HAVE_FAILOVER_BOOT
174 if USE_FAILOVER_IMAGE
175 mainboardinit cpu/x86/16bit/reset16.inc
176 ldscript /cpu/x86/16bit/reset16.lds
178 mainboardinit cpu/x86/32bit/reset32.inc
179 ldscript /cpu/x86/32bit/reset32.lds
182 if USE_FALLBACK_IMAGE
183 mainboardinit cpu/x86/16bit/reset16.inc
184 ldscript /cpu/x86/16bit/reset16.lds
186 mainboardinit cpu/x86/32bit/reset32.inc
187 ldscript /cpu/x86/32bit/reset32.lds
192 ## Include an id string (For safe flashing)
194 mainboardinit arch/i386/lib/id.inc
195 ldscript /arch/i386/lib/id.lds
199 ## Setup Cache-As-Ram
201 mainboardinit cpu/amd/car/cache_as_ram.inc
205 ### This is the early phase of linuxBIOS startup
206 ### Things are delicate and we test to see if we should
207 ### failover to another image.
209 if HAVE_FAILOVER_BOOT
210 if USE_FAILOVER_IMAGE
212 ldscript /arch/i386/lib/failover_failover.lds
216 if USE_FALLBACK_IMAGE
218 ldscript /arch/i386/lib/failover.lds
224 ### O.k. We aren't just an intermediary anymore!
233 initobject cache_as_ram_auto.o
235 mainboardinit ./cache_as_ram_auto.inc
241 ## Include the secondary Configuration files
247 # sample config for amd/serengeti_cheetah
248 chip northbridge/amd/amdk8/root_complex
249 device apic_cluster 0 on
250 chip cpu/amd/socket_F
254 device pci_domain 0 on
255 chip northbridge/amd/amdk8
256 device pci 18.0 on # northbridge
257 # devices on link 0, link 0 == LDT 0
258 chip southbridge/amd/amd8132
259 # the on/off keyword is mandatory
260 device pci 0.0 on end
261 device pci 0.1 on end
262 device pci 1.0 on end
263 device pci 1.1 on end
265 chip southbridge/amd/amd8111
266 # this "device pci 0.0" is the parent the next one
269 device pci 0.0 on end
270 device pci 0.1 on end
271 device pci 0.2 off end
272 device pci 1.0 off end
275 chip superio/winbond/w83627hf
276 device pnp 2e.0 off # Floppy
281 device pnp 2e.1 off # Parallel Port
285 device pnp 2e.2 on # Com1
289 device pnp 2e.3 off # Com2
293 device pnp 2e.5 on # Keyboard
299 device pnp 2e.6 off # CIR
302 device pnp 2e.7 off # GAME_MIDI_GIPO1
307 device pnp 2e.8 off end # GPIO2
308 device pnp 2e.9 off end # GPIO3
309 device pnp 2e.a off end # ACPI
310 device pnp 2e.b on # HW Monitor
316 device pci 1.1 on end
317 device pci 1.2 on end
319 chip drivers/i2c/i2cmux # pca9556 smbus mux
320 device i2c 18 on #0 pca9516 1
321 chip drivers/generic/generic #dimm 0-0-0
324 chip drivers/generic/generic #dimm 0-0-1
327 chip drivers/generic/generic #dimm 0-1-0
330 chip drivers/generic/generic #dimm 0-1-1
334 device i2c 18 on #1 pca9516 2
335 chip drivers/generic/generic #dimm 1-0-0
338 chip drivers/generic/generic #dimm 1-0-1
341 chip drivers/generic/generic #dimm 1-1-0
344 chip drivers/generic/generic #dimm 1-1-1
347 chip drivers/generic/generic #dimm 1-2-0
350 chip drivers/generic/generic #dimm 1-2-1
353 chip drivers/generic/generic #dimm 1-3-0
356 chip drivers/generic/generic #dimm 1-3-1
362 device pci 1.5 off end
363 device pci 1.6 off end
364 register "ide0_enable" = "1"
365 register "ide1_enable" = "1"
367 end # device pci 18.0
369 device pci 18.0 on end
370 device pci 18.0 on end
371 device pci 18.1 on end
372 device pci 18.2 on end
373 device pci 18.3 on end
375 chip northbridge/amd/amdk8
376 device pci 19.0 on # northbridge
377 chip southbridge/amd/amd8151
378 # the on/off keyword is mandatory
379 device pci 0.0 on end
380 device pci 1.0 on end
382 end # device pci 19.0
384 device pci 19.0 on end
385 device pci 19.0 on end
386 device pci 19.1 on end
387 device pci 19.2 on end
388 device pci 19.3 on end
393 # chip drivers/generic/debug
394 # device pnp 0.0 off end # chip name
395 # device pnp 0.1 on end # pci_regs_all
396 # device pnp 0.2 off end # mem
397 # device pnp 0.3 off end # cpuid
398 # device pnp 0.4 off end # smbus_regs_all
399 # device pnp 0.5 off end # dual core msr
400 # device pnp 0.6 off end # cache size
401 # device pnp 0.7 off end # tsc