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_STREAM_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_STREAM_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.
45 if HAVE_MP_TABLE object mptable.o end
57 makerule ./cache_as_ram_auto.o
58 depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
59 action "$(CC) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o $@"
64 makerule ./cache_as_ram_auto.inc
65 depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
66 action "$(CC) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -S -o $@"
67 action "perl -e 's/.rodata/.rom.data/g' -pi $@"
68 action "perl -e 's/.text/.section .rom.text/g' -pi $@"
75 ## Build our 16 bit and 32 bit linuxBIOS entry code
77 mainboardinit cpu/x86/16bit/entry16.inc
78 mainboardinit cpu/x86/32bit/entry32.inc
79 ldscript /cpu/x86/16bit/entry16.lds
82 ldscript /cpu/x86/32bit/entry32.lds
86 ldscript /cpu/amd/car/cache_as_ram.lds
91 ## Build our reset vector (This is where linuxBIOS is entered)
94 mainboardinit cpu/x86/16bit/reset16.inc
95 ldscript /cpu/x86/16bit/reset16.lds
97 mainboardinit cpu/x86/32bit/reset32.inc
98 ldscript /cpu/x86/32bit/reset32.lds
102 ## Include an id string (For safe flashing)
104 mainboardinit arch/i386/lib/id.inc
105 ldscript /arch/i386/lib/id.lds
109 ## Setup Cache-As-Ram
111 mainboardinit cpu/amd/car/cache_as_ram.inc
115 ### This is the early phase of linuxBIOS startup
116 ### Things are delicate and we test to see if we should
117 ### failover to another image.
119 if USE_FALLBACK_IMAGE
121 ldscript /arch/i386/lib/failover.lds
123 ldscript /arch/i386/lib/failover.lds
124 mainboardinit ./failover.inc
129 ### O.k. We aren't just an intermediary anymore!
138 initobject cache_as_ram_auto.o
140 mainboardinit ./cache_as_ram_auto.inc
146 ## Include the secondary Configuration files
152 # sample config for broadcom/blast
153 chip northbridge/amd/amdk8/root_complex
154 device apic_cluster 0 on
155 chip cpu/amd/socket_940
159 device pci_domain 0 on
160 chip northbridge/amd/amdk8
161 device pci 18.0 on # northbridge
163 chip southbridge/broadcom/bcm5780 # HT2000
164 device pci 0.0 on end # PXB 1 0x0130
165 device pci 1.0 on # PXB 2 0x0130
166 device pci 4.0 on end # GB E 0x1668 vid = 0x14e4
167 device pci 4.1 on end # GB E 0x1669 vid = 0x14e4
169 device pci 2.0 on end # PCI E 1 #0x0132
170 device pci 3.0 on end # PCI E 2
171 device pci 4.0 on end # PCI E 3
172 device pci 5.0 on end # PCI E 4
174 chip southbridge/broadcom/bcm5785 # HT1000
175 device pci 0.0 on # HT PXB 0x0036
176 device pci d.0 on end # PPBX 0x0104
177 device pci e.0 on end # SATA 0x024a
179 device pci 1.0 on # Legacy pci main 0x0205
180 chip drivers/i2c/i2cmux2 # pca9554 smbus mux
181 device i2c 71 on end #0 pca9554 0
182 device i2c 71 on end #0 pca9554 1
183 device i2c 71 on end #0 pca9554 2
184 device i2c 71 on end #0 pca9554 3
185 device i2c 71 on end #0 pca9554 4
186 device i2c 71 on end #0 pca9554 5
187 device i2c 71 on #0 pca9554 6
188 chip drivers/generic/generic #dimm 0-0-0
191 chip drivers/generic/generic #dimm 0-0-1
194 chip drivers/generic/generic #dimm 0-1-0
197 chip drivers/generic/generic #dimm 0-1-1
201 device i2c 71 on #1 pca9554 7
202 chip drivers/generic/generic #dimm 1-0-0
205 chip drivers/generic/generic #dimm 1-0-1
208 chip drivers/generic/generic #dimm 1-1-0
211 chip drivers/generic/generic #dimm 1-1-1
218 device pci 1.1 on end # IDE 0x0214
219 device pci 1.2 on # LPC 0x0234
220 chip superio/NSC/pc87417
221 device pnp 2e.0 off # Floppy
226 device pnp 2e.1 off # Parallel Port
230 device pnp 2e.2 off # Com 2
234 device pnp 2e.3 on # Com 1
238 device pnp 2e.4 off end # SWC
239 device pnp 2e.5 off end # Mouse
240 device pnp 2e.6 on # Keyboard
245 device pnp 2e.7 off end # GPIO
246 device pnp 2e.f off end # XBUS
247 device pnp 2e.10 on #RTC
253 device pci 1.3 on end # WDTimer 0x0238
254 device pci 1.4 on end # XIOAPIC0 0x0235
255 device pci 1.5 on end # XIOAPIC1
256 device pci 1.6 on end # XIOAPIC2
257 device pci 2.0 on end # USB 0x0223
258 device pci 2.1 on end # USB
259 device pci 2.2 on end # USB
260 #when HT_CHAIN_END_UNITID_BASE (0,1) < HT_CHAIN_UNITID_BASE (6,,,,),
261 chip drivers/pci/onboard
262 device pci 4.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
263 # if HT_CHAIN_END_UNITID_BASE=0, it is 5, if HT_CHAIN_END_UNITID_BASE=1, it is 4
264 register "rom_address" = "0xfff80000"
267 #when HT_CHAIN_END_UNITID_BASE > HT_CHAIN_UNITID_BASE (6, ,,,,)
268 # chip drivers/pci/onboard
269 # device pci 0.0 on end # fake, will be disabled
271 # chip drivers/pci/onboard
272 # device pci 5.0 on end # it is in bcm5785_0 bus, but the device id can not be changed even unitid is changed
273 # register "rom_address" = "0xfff80000"
277 end # device pci 18.0
279 device pci 18.0 on end
280 device pci 18.0 on end
281 device pci 18.1 on end
282 device pci 18.2 on end
283 device pci 18.3 on end
288 # chip drivers/generic/debug
289 # device pnp 0.0 off end # chip name
290 # device pnp 0.1 on end # pci_regs_all
291 # device pnp 0.2 off end # mem
292 # device pnp 0.3 off end # cpuid
293 # device pnp 0.4 off end # smbus_regs_all
294 # device pnp 0.5 off end # dual core msr
295 # device pnp 0.6 off end # cache size
296 # device pnp 0.7 off end # tsc