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 = FALLBACK_SIZE
7 default ROM_SECTION_OFFSET = ( ROM_SIZE - FALLBACK_SIZE )
9 default ROM_SECTION_SIZE = ( ROM_SIZE - FALLBACK_SIZE )
10 default ROM_SECTION_OFFSET = 0
14 ## Compute the start location and size size of
15 ## The linuxBIOS bootloader.
17 default PAYLOAD_SIZE = ( ROM_SECTION_SIZE - ROM_IMAGE_SIZE )
18 default CONFIG_ROM_PAYLOAD_START = (0xffffffff - ROM_SIZE + ROM_SECTION_OFFSET + 1)
21 ## Compute where this copy of linuxBIOS will start in the boot rom
23 default _ROMBASE = ( CONFIG_ROM_PAYLOAD_START + PAYLOAD_SIZE )
26 ## Compute a range of ROM that can cached to speed up linuxBIOS,
29 ## XIP_ROM_SIZE must be a power of 2.
30 ## XIP_ROM_BASE must be a multiple of XIP_ROM_SIZE
32 default XIP_ROM_SIZE=65536
33 default XIP_ROM_BASE = ( _ROMBASE + ROM_IMAGE_SIZE - XIP_ROM_SIZE )
38 ## Build the objects we have code for in this directory.
42 if HAVE_MP_TABLE object mptable.o end
43 if HAVE_PIRQ_TABLE object irq_tables.o end
45 #needed by irq_tables and mptable and acpi_tables
46 #object get_bus_conf.o
49 object acpi_tables_static.o
55 # depends "$(MAINBOARD)/dx/dsdt_lb.dsl"
56 # action "iasl -tc $(MAINBOARD)/dx/dsdt_lb.dsl"
57 # action "mv dsdt_lb.hex dsdt.c"
62 # depends "$(MAINBOARD)/ssdt_lb_x.dsl"
63 # action "iasl -tc $(MAINBOARD)/ssdt_lb_x.dsl"
64 # action "perl -pi -e 's/AmlCode/AmlCode_ssdt/g' ssdt_lb_x.hex"
65 # action "mv ssdt_lb_x.hex ssdt.c"
71 # depends "$(MAINBOARD)/dx/pci2.asl"
72 # action "iasl -tc $(MAINBOARD)/dx/pci2.asl"
73 # action "perl -pi -e 's/AmlCode/AmlCode_ssdt2/g' pci2.hex"
74 # action "mv pci2.hex ssdt2.c"
78 # depends "$(MAINBOARD)/dx/pci3.asl"
79 # action "iasl -tc $(MAINBOARD)/dx/pci3.asl"
80 # action "perl -pi -e 's/AmlCode/AmlCode_ssdt3/g' pci3.hex"
81 # action "mv pci3.hex ssdt3.c"
85 # depends "$(MAINBOARD)/dx/pci4.asl"
86 # action "iasl -tc $(MAINBOARD)/dx/pci4.asl"
87 # action "perl -pi -e 's/AmlCode/AmlCode_ssdt4/g' pci4.hex"
88 # action "mv pci4.hex ssdt4.c"
99 # FIXME: This should be solved generically.
106 # compile cache_as_ram.c to auto.o
107 makerule ./cache_as_ram_auto.o
108 depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
109 action "$(CC) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o cache_as_ram_auto.o"
113 #compile cache_as_ram.c to auto.inc
114 makerule ./cache_as_ram_auto.inc
115 depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
116 action "$(CC) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -S -o $@"
117 action "perl -e 's/.rodata/.rom.data/g' -pi $@"
118 action "perl -e 's/.text/.section .rom.text/g' -pi $@"
127 makerule ./failover.E
128 depends "$(MAINBOARD)/failover.c ./romcc"
129 action "./romcc -E -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/failover.c -o $@"
132 makerule ./failover.inc
133 depends "$(MAINBOARD)/failover.c ./romcc"
134 action "./romcc -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/failover.c -o $@"
138 depends "$(MAINBOARD)/auto.c option_table.h ./romcc"
139 action "./romcc -E -mcpu=k8 -O2 -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/auto.c -o $@"
142 depends "$(MAINBOARD)/auto.c option_table.h ./romcc"
143 action "./romcc -mcpu=k8 -O2 -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/auto.c -o $@"
148 ## Build our 16 bit and 32 bit linuxBIOS entry code
151 mainboardinit cpu/x86/16bit/entry16.inc
152 ldscript /cpu/x86/16bit/entry16.lds
154 mainboardinit cpu/x86/32bit/entry32.inc
157 ldscript /cpu/x86/32bit/entry32.lds
161 ldscript /cpu/amd/car/cache_as_ram.lds
166 ## Build our reset vector (This is where linuxBIOS is entered)
168 if USE_FALLBACK_IMAGE
169 mainboardinit cpu/x86/16bit/reset16.inc
170 ldscript /cpu/x86/16bit/reset16.lds
172 mainboardinit cpu/x86/32bit/reset32.inc
173 ldscript /cpu/x86/32bit/reset32.lds
178 ### Should this be in the northbridge code?
179 mainboardinit arch/i386/lib/cpu_reset.inc
183 ## Include an id string (For safe flashing)
185 mainboardinit arch/i386/lib/id.inc
186 ldscript /arch/i386/lib/id.lds
190 ## Setup Cache-As-Ram
192 mainboardinit cpu/amd/car/cache_as_ram.inc
196 ### This is the early phase of linuxBIOS startup
197 ### Things are delicate and we test to see if we should
198 ### failover to another image.
200 if USE_FALLBACK_IMAGE
202 ldscript /arch/i386/lib/failover.lds
204 ldscript /arch/i386/lib/failover.lds
205 mainboardinit ./failover.inc
210 ### O.k. We aren't just an intermediary anymore!
219 initobject cache_as_ram_auto.o
221 mainboardinit ./cache_as_ram_auto.inc
229 mainboardinit cpu/x86/fpu/enable_fpu.inc
230 mainboardinit cpu/x86/mmx/enable_mmx.inc
231 mainboardinit cpu/x86/sse/enable_sse.inc
232 mainboardinit ./auto.inc
233 mainboardinit cpu/x86/sse/disable_sse.inc
234 mainboardinit cpu/x86/mmx/disable_mmx.inc
239 ## Include the secondary Configuration files
246 # config for agami/aruma
247 chip northbridge/amd/amdk8/root_complex
248 device apic_cluster 0 on
249 chip cpu/amd/socket_940
253 device pci_domain 0 on
254 chip northbridge/amd/amdk8
255 device pci 18.0 on end # device pci 18.0
257 # devices on link 1, link 1 == LDT 1
258 chip southbridge/amd/amd8131
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
273 #chip drivers/ati/ragexl
274 chip drivers/pci/onboard
275 device pci 4.0 on end
276 register "rom_address" = "0xfff80000"
280 chip superio/winbond/w83627hf
281 device pnp 2e.0 on # Floppy
286 device pnp 2e.1 off # Parallel Port
290 device pnp 2e.2 on # Com1
294 device pnp 2e.3 on # Com2
298 device pnp 2e.5 on # Keyboard
304 device pnp 2e.6 off # CIR
307 device pnp 2e.7 off # GAME_MIDI_GIPO1
312 device pnp 2e.8 off end # GPIO2
313 device pnp 2e.9 off end # GPIO3
314 device pnp 2e.a off end # ACPI
315 device pnp 2e.b on # HW Monitor
321 device pci 1.1 on end
322 device pci 1.2 on end
324 chip drivers/i2c/i2cmux2 # pca9545 smbus mux
325 device i2c 71 on #pca9545 channel0
326 chip drivers/i2c/adm1026
330 device i2c 71 on #pca9545 channel1
331 chip drivers/generic/generic # fan board / pstray behind another mux
336 chip drivers/i2c/i2cmux2 # pca9543 smbus mux
337 device i2c 73 on #pca9543 channel0
338 chip drivers/generic/generic #dimm 0-0-0
341 chip drivers/generic/generic #dimm 0-0-1
344 chip drivers/generic/generic #dimm 0-1-0
347 chip drivers/generic/generic #dimm 0-1-1
352 device i2c 73 on #pca9543 channel1
353 chip drivers/generic/generic #dimm 1-0-0
356 chip drivers/generic/generic #dimm 1-0-1
359 chip drivers/generic/generic #dimm 1-1-0
362 chip drivers/generic/generic #dimm 1-1-1
367 chip drivers/generic/generic # ICS950405AF
371 device pci 1.5 off end
372 device pci 1.6 on end
373 register "ide0_enable" = "1"
374 register "ide1_enable" = "1"
377 device pci 18.0 on end # LDT2
378 device pci 18.1 on end
379 device pci 18.2 on end
380 device pci 18.3 on end
383 chip northbridge/amd/amdk8
384 device pci 19.0 on end # LDT0
385 device pci 19.0 on end # LDT1
386 device pci 19.0 on # LDT2
387 chip southbridge/amd/amd8131
388 # the on/off keyword is mandatory
389 device pci 0.0 on end
390 device pci 0.1 on end
391 device pci 1.0 on end
392 device pci 1.1 on end
394 chip southbridge/amd/amd8131
395 # the on/off keyword is mandatory
396 device pci 0.0 on end
397 device pci 0.1 on end
398 device pci 1.0 on end
399 device pci 1.1 on end
402 device pci 19.1 on end
403 device pci 19.2 on end
404 device pci 19.3 on end
407 chip northbridge/amd/amdk8
408 device pci 1a.0 on end
409 device pci 1a.0 on end
410 device pci 1a.0 on # LDT2
411 chip southbridge/amd/amd8131
412 # the on/off keyword is mandatory
413 device pci 0.0 on end
414 device pci 0.1 on end
415 device pci 1.0 on end
416 device pci 1.1 on end
418 chip southbridge/amd/amd8131
419 # the on/off keyword is mandatory
420 device pci 0.0 on end
421 device pci 0.1 on end
422 device pci 1.0 on end
423 device pci 1.1 on end
427 device pci 1a.1 on end
428 device pci 1a.2 on end
429 device pci 1a.3 on end
432 chip northbridge/amd/amdk8
433 device pci 1b.0 on end
434 device pci 1b.0 on # LDT1
435 chip southbridge/amd/amd8131
436 # the on/off keyword is mandatory
437 device pci 0.0 on end
438 device pci 0.1 on end
439 device pci 1.0 on end
440 device pci 1.1 on end
442 chip southbridge/amd/amd8131
443 # the on/off keyword is mandatory
444 device pci 0.0 on end
445 device pci 0.1 on end
446 device pci 1.0 on end
447 device pci 1.1 on end
451 device pci 1b.0 on end
452 device pci 1b.1 on end
453 device pci 1b.2 on end
454 device pci 1b.3 on end