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_PAYLOAD_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_PAYLOAD_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.
56 #needed by irq_tables and mptable and acpi_tables
59 if HAVE_MP_TABLE object mptable.o end
60 if HAVE_PIRQ_TABLE object irq_tables.o end
66 depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
67 action "$(CC) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o auto.o"
71 depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
72 action "$(CC) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -S -o $@"
73 action "perl -e 's/.rodata/.rom.data/g' -pi $@"
74 action "perl -e 's/.text/.section .rom.text/g' -pi $@"
83 depends "$(MAINBOARD)/failover.c ./romcc"
84 action "./romcc -E -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/failover.c -o $@"
87 makerule ./failover.inc
88 depends "$(MAINBOARD)/failover.c ./romcc"
89 action "./romcc -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/failover.c -o $@"
93 depends "$(MAINBOARD)/auto.c option_table.h ./romcc"
94 action "./romcc -E -mcpu=k8 -O2 -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/auto.c -o $@"
98 depends "$(MAINBOARD)/auto.c option_table.h ./romcc"
99 action "./romcc -mcpu=k8 -O2 -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/auto.c -o $@"
105 ## Build our 16 bit and 32 bit linuxBIOS entry code
107 if HAVE_FAILOVER_BOOT
108 if USE_FAILOVER_IMAGE
109 mainboardinit cpu/x86/16bit/entry16.inc
110 ldscript /cpu/x86/16bit/entry16.lds
113 if USE_FALLBACK_IMAGE
114 mainboardinit cpu/x86/16bit/entry16.inc
115 ldscript /cpu/x86/16bit/entry16.lds
119 mainboardinit cpu/x86/32bit/entry32.inc
123 ldscript /cpu/x86/32bit/entry32.lds
127 ldscript /cpu/amd/car/cache_as_ram.lds
133 ## Build our reset vector (This is where linuxBIOS is entered)
135 if HAVE_FAILOVER_BOOT
136 if USE_FAILOVER_IMAGE
137 mainboardinit cpu/x86/16bit/reset16.inc
138 ldscript /cpu/x86/16bit/reset16.lds
140 mainboardinit cpu/x86/32bit/reset32.inc
141 ldscript /cpu/x86/32bit/reset32.lds
144 if USE_FALLBACK_IMAGE
145 mainboardinit cpu/x86/16bit/reset16.inc
146 ldscript /cpu/x86/16bit/reset16.lds
148 mainboardinit cpu/x86/32bit/reset32.inc
149 ldscript /cpu/x86/32bit/reset32.lds
155 ### Should this be in the northbridge code?
156 mainboardinit arch/i386/lib/cpu_reset.inc
160 ## Include an id string (For safe flashing)
162 mainboardinit southbridge/nvidia/ck804/id.inc
163 ldscript /southbridge/nvidia/ck804/id.lds
166 ## ROMSTRAP table for CK804
168 if HAVE_FAILOVER_BOOT
169 if USE_FAILOVER_IMAGE
170 mainboardinit southbridge/nvidia/ck804/romstrap.inc
171 ldscript /southbridge/nvidia/ck804/romstrap.lds
174 if USE_FALLBACK_IMAGE
175 mainboardinit southbridge/nvidia/ck804/romstrap.inc
176 ldscript /southbridge/nvidia/ck804/romstrap.lds
182 ## Setup Cache-As-Ram
184 mainboardinit cpu/amd/car/cache_as_ram.inc
188 ### This is the early phase of linuxBIOS 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
203 mainboardinit ./failover.inc
216 mainboardinit ./auto.inc
221 mainboardinit cpu/x86/fpu/enable_fpu.inc
222 mainboardinit cpu/x86/mmx/enable_mmx.inc
223 mainboardinit cpu/x86/sse/enable_sse.inc
224 mainboardinit ./auto.inc
225 mainboardinit cpu/x86/sse/disable_sse.inc
226 mainboardinit cpu/x86/mmx/disable_mmx.inc
231 ## Include the secondary Configuration files
237 # sample config for tyan/s2895
238 chip northbridge/amd/amdk8/root_complex
239 device apic_cluster 0 on
240 chip cpu/amd/socket_940
244 device pci_domain 0 on
245 chip northbridge/amd/amdk8 #mc0
247 # devices on link 0, link 0 == LDT 0
248 chip southbridge/nvidia/ck804
249 device pci 0.0 on end # HT
250 device pci 1.0 on # LPC
251 chip superio/smsc/lpc47b397
252 device pnp 2e.0 on # Floppy
257 device pnp 2e.3 off # Parallel Port
261 device pnp 2e.4 on # Com1
265 device pnp 2e.5 off # Com2
269 device pnp 2e.7 on # Keyboard
275 device pnp 2e.8 on # HW Monitor
277 chip drivers/generic/generic # LM95221 CPU temp
280 chip drivers/generic/generic # EMCT03
284 device pnp 2e.a on # RT
289 device pci 1.1 on # SM 0
290 chip drivers/generic/generic #dimm 0-0-0
293 chip drivers/generic/generic #dimm 0-0-1
296 chip drivers/generic/generic #dimm 0-1-0
299 chip drivers/generic/generic #dimm 0-1-1
302 chip drivers/generic/generic #dimm 1-0-0
305 chip drivers/generic/generic #dimm 1-0-1
308 chip drivers/generic/generic #dimm 1-1-0
311 chip drivers/generic/generic #dimm 1-1-1
315 device pci 1.1 on # SM 1
316 #PCI device smbus address will depend on addon pci device, do we need to scan_smbus_bus?
317 # chip drivers/generic/generic #PCIXA Slot1
318 # device i2c 50 on end
320 # chip drivers/generic/generic #PCIXB Slot1
321 # device i2c 51 on end
323 # chip drivers/generic/generic #PCIXB Slot2
324 # device i2c 52 on end
326 # chip drivers/generic/generic #PCI Slot1
327 # device i2c 53 on end
329 # chip drivers/generic/generic #Master CK804 PCI-E
330 # device i2c 54 on end
332 # chip drivers/generic/generic #Slave CK804 PCI-E
333 # device i2c 55 on end
335 chip drivers/generic/generic #MAC EEPROM
340 device pci 2.0 on end # USB 1.1
341 device pci 2.1 on end # USB 2
342 device pci 4.0 on end # ACI
343 device pci 4.1 off end # MCI
344 device pci 6.0 on end # IDE
345 device pci 7.0 on end # SATA 1
346 device pci 8.0 on end # SATA 0
347 device pci 9.0 on end # PCI
348 device pci a.0 on end # NIC
349 device pci b.0 off end # PCI E 3
350 device pci c.0 off end # PCI E 2
351 device pci d.0 off end # PCI E 1
352 device pci e.0 on end # PCI E 0
353 register "ide0_enable" = "1"
354 register "ide1_enable" = "1"
355 register "sata0_enable" = "1"
356 register "sata1_enable" = "1"
357 # register "nic_rom_address" = "0xfff80000" # 64k
358 # register "raid_rom_address" = "0xfff90000"
359 register "mac_eeprom_smbus" = "3" # 1: smbus under 2e.8, 2: SM0 3: SM1
360 register "mac_eeprom_addr" = "0x51"
362 end # device pci 18.0
363 device pci 18.0 on end # Link 1
365 # devices on link 2, link 2 == LDT 2
366 chip southbridge/amd/amd8131
367 # the on/off keyword is mandatory
368 device pci 0.0 on end
369 device pci 0.1 on end
371 chip drivers/pci/onboard
372 device pci 6.0 on end # lsi scsi
373 device pci 6.1 on end
376 device pci 1.1 on end
378 end # device pci 18.0
379 device pci 18.1 on end
380 device pci 18.2 on end
381 device pci 18.3 on end
384 chip northbridge/amd/amdk8
385 device pci 19.0 on # northbridge
386 # devices on link 0, link 0 == LDT 0
387 chip southbridge/nvidia/ck804
388 device pci 0.0 on end # HT
389 device pci 1.0 on end # LPC
390 device pci 1.1 off end # SM
391 device pci 2.0 off end # USB 1.1
392 device pci 2.1 off end # USB 2
393 device pci 4.0 off end # ACI
394 device pci 4.1 off end # MCI
395 device pci 6.0 off end # IDE
396 device pci 7.0 off end # SATA 1
397 device pci 8.0 off end # SATA 0
398 device pci 9.0 off end # PCI
399 device pci a.0 on end # NIC
400 device pci b.0 off end # PCI E 3
401 device pci c.0 off end # PCI E 2
402 device pci d.0 off end # PCI E 1
403 device pci e.0 on end # PCI E 0
404 # register "nic_rom_address" = "0xfff80000" # 64k
405 register "mac_eeprom_smbus" = "3"
406 register "mac_eeprom_addr" = "0x51"
408 end # device pci 19.0
410 device pci 19.0 on end
411 device pci 19.0 on end
412 device pci 19.1 on end
413 device pci 19.2 on end
414 device pci 19.3 on end
418 # chip drivers/generic/debug
419 # device pnp 0.0 off end # chip name
420 # device pnp 0.1 off end # pci_regs_all
421 # device pnp 0.2 off end # mem
422 # device pnp 0.3 off end # cpuid
423 # device pnp 0.4 on end # smbus_regs_all
424 # device pnp 0.5 off end # dual core msr
425 # device pnp 0.6 off end # cache size
426 # device pnp 0.7 off end # tsc