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
53 depends "$(MAINBOARD)/dx/dsdt_lb.dsl"
54 action "iasl -tc $(MAINBOARD)/dx/dsdt_lb.dsl"
55 action "mv dsdt_lb.hex dsdt.c"
60 depends "$(MAINBOARD)/ssdt_lb_x.dsl"
61 action "iasl -tc $(MAINBOARD)/ssdt_lb_x.dsl"
62 action "perl -pi -e 's/AmlCode/AmlCode_ssdt/g' ssdt_lb_x.hex"
63 action "mv ssdt_lb_x.hex ssdt.c"
69 depends "$(MAINBOARD)/dx/pci2.asl"
70 action "iasl -tc $(MAINBOARD)/dx/pci2.asl"
71 action "perl -pi -e 's/AmlCode/AmlCode_ssdt2/g' pci2.hex"
72 action "mv pci2.hex ssdt2.c"
76 depends "$(MAINBOARD)/dx/pci3.asl"
77 action "iasl -tc $(MAINBOARD)/dx/pci3.asl"
78 action "perl -pi -e 's/AmlCode/AmlCode_ssdt3/g' pci3.hex"
79 action "mv pci3.hex ssdt3.c"
83 depends "$(MAINBOARD)/dx/pci4.asl"
84 action "iasl -tc $(MAINBOARD)/dx/pci4.asl"
85 action "perl -pi -e 's/AmlCode/AmlCode_ssdt4/g' pci4.hex"
86 action "mv pci4.hex ssdt4.c"
101 # compile cache_as_ram.c to auto.o
102 makerule ./cache_as_ram_auto.o
103 depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
104 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"
108 #compile cache_as_ram.c to auto.inc
109 makerule ./cache_as_ram_auto.inc
110 depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
111 action "$(CC) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -S -o $@"
112 action "perl -e 's/.rodata/.rom.data/g' -pi $@"
113 action "perl -e 's/.text/.section .rom.text/g' -pi $@"
122 makerule ./failover.E
123 depends "$(MAINBOARD)/failover.c ./romcc"
124 action "./romcc -E -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/failover.c -o $@"
127 makerule ./failover.inc
128 depends "$(MAINBOARD)/failover.c ./romcc"
129 action "./romcc -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/failover.c -o $@"
133 depends "$(MAINBOARD)/auto.c option_table.h ./romcc"
134 action "./romcc -E -mcpu=k8 -O2 -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/auto.c -o $@"
137 depends "$(MAINBOARD)/auto.c option_table.h ./romcc"
138 action "./romcc -mcpu=k8 -O2 -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/auto.c -o $@"
143 ## Build our 16 bit and 32 bit linuxBIOS entry code
146 mainboardinit cpu/x86/16bit/entry16.inc
147 ldscript /cpu/x86/16bit/entry16.lds
149 mainboardinit cpu/x86/32bit/entry32.inc
152 ldscript /cpu/x86/32bit/entry32.lds
156 ldscript /cpu/amd/car/cache_as_ram.lds
161 ## Build our reset vector (This is where linuxBIOS is entered)
163 if USE_FALLBACK_IMAGE
164 mainboardinit cpu/x86/16bit/reset16.inc
165 ldscript /cpu/x86/16bit/reset16.lds
167 mainboardinit cpu/x86/32bit/reset32.inc
168 ldscript /cpu/x86/32bit/reset32.lds
173 ### Should this be in the northbridge code?
174 mainboardinit arch/i386/lib/cpu_reset.inc
178 ## Include an id string (For safe flashing)
180 mainboardinit arch/i386/lib/id.inc
181 ldscript /arch/i386/lib/id.lds
185 ## Setup Cache-As-Ram
187 mainboardinit cpu/amd/car/cache_as_ram.inc
191 ### This is the early phase of linuxBIOS startup
192 ### Things are delicate and we test to see if we should
193 ### failover to another image.
195 if USE_FALLBACK_IMAGE
197 ldscript /arch/i386/lib/failover.lds
199 ldscript /arch/i386/lib/failover.lds
200 mainboardinit ./failover.inc
205 ### O.k. We aren't just an intermediary anymore!
214 initobject cache_as_ram_auto.o
216 mainboardinit ./cache_as_ram_auto.inc
224 mainboardinit cpu/x86/fpu/enable_fpu.inc
225 mainboardinit cpu/x86/mmx/enable_mmx.inc
226 mainboardinit cpu/x86/sse/enable_sse.inc
227 mainboardinit ./auto.inc
228 mainboardinit cpu/x86/sse/disable_sse.inc
229 mainboardinit cpu/x86/mmx/disable_mmx.inc
234 ## Include the secondary Configuration files
243 # config for agami/aruma
244 chip northbridge/amd/amdk8/root_complex
245 device apic_cluster 0 on
246 chip cpu/amd/socket_940
250 device pci_domain 0 on
251 chip northbridge/amd/amdk8
252 device pci 18.0 on end # device pci 18.0
254 # devices on link 1, link 1 == LDT 1
255 chip southbridge/amd/amd8131
256 # the on/off keyword is mandatory
257 device pci 0.0 on end
258 device pci 0.1 on end
259 device pci 1.0 on end
260 device pci 1.1 on end
262 chip southbridge/amd/amd8111
263 # this "device pci 0.0" is the parent the next one
266 device pci 0.0 on end
267 device pci 0.1 on end
268 device pci 0.2 off end
269 device pci 1.0 off end
270 #chip drivers/ati/ragexl
271 chip drivers/pci/onboard
272 device pci 4.0 on end
273 register "rom_address" = "0xfff80000"
277 chip superio/winbond/w83627hf
278 device pnp 2e.0 on # Floppy
283 device pnp 2e.1 off # Parallel Port
287 device pnp 2e.2 on # Com1
291 device pnp 2e.3 on # Com2
295 device pnp 2e.5 on # Keyboard
301 device pnp 2e.6 off # CIR
304 device pnp 2e.7 off # GAME_MIDI_GIPO1
309 device pnp 2e.8 off end # GPIO2
310 device pnp 2e.9 off end # GPIO3
311 device pnp 2e.a off end # ACPI
312 device pnp 2e.b on # HW Monitor
318 device pci 1.1 on end
319 device pci 1.2 on end
321 chip drivers/generic/generic
322 #phillips pca9545 smbus mux
324 # analog_devices adm1026
325 chip drivers/generic/generic
333 # chip drivers/generic/generic #dimm 0-0-0
334 # device i2c 50 on end
336 # chip drivers/generic/generic #dimm 0-0-1
337 # device i2c 51 on end
339 # chip drivers/generic/generic #dimm 0-1-0
340 # device i2c 52 on end
342 # chip drivers/generic/generic #dimm 0-1-1
343 # device i2c 53 on end
345 # chip drivers/generic/generic #dimm 1-0-0
346 # device i2c 54 on end
348 # chip drivers/generic/generic #dimm 1-0-1
349 # device i2c 55 on end
351 # chip drivers/generic/generic #dimm 1-1-0
352 # device i2c 56 on end
354 # chip drivers/generic/generic #dimm 1-1-1
355 # device i2c 57 on end
358 device pci 1.5 off end
359 device pci 1.6 on end
360 register "ide0_enable" = "1"
361 register "ide1_enable" = "1"
364 device pci 18.0 on end # LDT2
365 device pci 18.1 on end
366 device pci 18.2 on end
367 device pci 18.3 on end
370 chip northbridge/amd/amdk8
371 device pci 19.0 on end # LDT0
372 device pci 19.0 on end # LDT1
373 device pci 19.0 on # LDT2
374 chip southbridge/amd/amd8131
375 # the on/off keyword is mandatory
376 device pci 0.0 on end
377 device pci 0.1 on end
378 device pci 1.0 on end
379 device pci 1.1 on end
381 chip southbridge/amd/amd8131
382 # the on/off keyword is mandatory
383 device pci 0.0 on end
384 device pci 0.1 on end
385 device pci 1.0 on end
386 device pci 1.1 on end
389 device pci 19.1 on end
390 device pci 19.2 on end
391 device pci 19.3 on end
394 chip northbridge/amd/amdk8
395 device pci 1a.0 on end
396 device pci 1a.0 on end
397 device pci 1a.0 on # LDT2
398 chip southbridge/amd/amd8131
399 # the on/off keyword is mandatory
400 device pci 0.0 on end
401 device pci 0.1 on end
402 device pci 1.0 on end
403 device pci 1.1 on end
405 chip southbridge/amd/amd8131
406 # the on/off keyword is mandatory
407 device pci 0.0 on end
408 device pci 0.1 on end
409 device pci 1.0 on end
410 device pci 1.1 on end
414 device pci 1a.1 on end
415 device pci 1a.2 on end
416 device pci 1a.3 on end
419 chip northbridge/amd/amdk8
420 device pci 1b.0 on end
421 device pci 1b.0 on # LDT1
422 chip southbridge/amd/amd8131
423 # the on/off keyword is mandatory
424 device pci 0.0 on end
425 device pci 0.1 on end
426 device pci 1.0 on end
427 device pci 1.1 on end
429 chip southbridge/amd/amd8131
430 # the on/off keyword is mandatory
431 device pci 0.0 on end
432 device pci 0.1 on end
433 device pci 1.0 on end
434 device pci 1.1 on end
438 device pci 1b.0 on end
439 device pci 1b.1 on end
440 device pci 1b.2 on end
441 device pci 1b.3 on end