- Bump the LinuxBIOS major version
[coreboot.git] / src / mainboard / Iwill / DK8S2 / Config.lb
1 uses HAVE_MP_TABLE
2 uses HAVE_PIRQ_TABLE
3 uses USE_FALLBACK_IMAGE
4 uses HAVE_FALLBACK_BOOT
5 uses HAVE_HARD_RESET
6 uses HARD_RESET_BUS
7 uses HARD_RESET_DEVICE
8 uses HARD_RESET_FUNCTION
9 uses IRQ_SLOT_COUNT
10 uses HAVE_OPTION_TABLE
11 uses CONFIG_MAX_CPUS
12 uses CONFIG_IOAPIC
13 uses CONFIG_SMP
14 uses FALLBACK_SIZE
15 uses ROM_SIZE
16 uses ROM_SECTION_SIZE
17 uses ROM_IMAGE_SIZE
18 uses ROM_SECTION_SIZE
19 uses ROM_SECTION_OFFSET
20 uses CONFIG_ROM_STREAM
21 uses CONFIG_ROM_STREAM_START
22 uses PAYLOAD_SIZE
23 uses _ROMBASE
24 uses XIP_ROM_SIZE
25 uses XIP_ROM_BASE
26 uses STACK_SIZE
27 uses HEAP_SIZE
28 uses USE_OPTION_TABLE
29
30 ## ROM_SIZE is the size of boot ROM that this board will use.
31 default ROM_SIZE=524288
32
33 ###
34 ### Build options
35 ###
36
37 ##
38 ## Build code for the fallback boot
39 ##
40 default HAVE_FALLBACK_BOOT=1
41
42 ##
43 ## Build code to reset the motherboard from linuxBIOS
44 ##
45 default HAVE_HARD_RESET=1
46
47 default HARD_RESET_BUS=1
48 default HARD_RESET_DEVICE=4
49 default HARD_RESET_FUNCTION=0
50
51 ##
52 ## Build code to export a programmable irq routing table
53 ##
54 default HAVE_PIRQ_TABLE=1
55 default IRQ_SLOT_COUNT=9
56
57 ##
58 ## Build code to export an x86 MP table
59 ## Useful for specifying IRQ routing values
60 ##
61 default HAVE_MP_TABLE=1
62
63 ##
64 ## Build code to export a CMOS option table
65 ##
66 default HAVE_OPTION_TABLE=1
67
68 ##
69 ## Build code for SMP support
70 ## Only worry about 2 micro processors
71 ##
72 default CONFIG_SMP=1
73 default CONFIG_MAX_CPUS=2
74
75 ##
76 ## Build code to setup a generic IOAPIC
77 ##
78 default CONFIG_IOAPIC=1
79
80 ##
81 ## Clean up the motherboard id strings
82 ##
83 #default MAINBOARD_PART_NUMBER="HDAMA"
84 #default MAINBOARD_VENDOR="ARIMA"
85
86 ###
87 ### LinuxBIOS layout values
88 ###
89
90 ## ROM_IMAGE_SIZE is the amount of space to allow linuxBIOS to occupy.
91 default ROM_IMAGE_SIZE = 65536
92
93 ##
94 ## Use a small 8K stack
95 ##
96 default STACK_SIZE=0x2000
97
98 ##
99 ## Use a small 16K heap
100 ##
101 default HEAP_SIZE=0x4000
102
103 ##
104 ## Only use the option table in a normal image
105 ##
106 default USE_OPTION_TABLE = !USE_FALLBACK_IMAGE
107
108 ##
109 ## Compute the location and size of where this firmware image
110 ## (linuxBIOS plus bootloader) will live in the boot rom chip.
111 ##
112 if USE_FALLBACK_IMAGE
113         default ROM_SECTION_SIZE   = FALLBACK_SIZE
114         default ROM_SECTION_OFFSET = ( ROM_SIZE - FALLBACK_SIZE )
115 else
116         default ROM_SECTION_SIZE   = ( ROM_SIZE - FALLBACK_SIZE )
117         default ROM_SECTION_OFFSET = 0
118 end
119
120 ##
121 ## Compute the start location and size size of
122 ## The linuxBIOS bootloader.
123 ##
124 default PAYLOAD_SIZE            = ( ROM_SECTION_SIZE - ROM_IMAGE_SIZE )
125 default CONFIG_ROM_STREAM_START = (0xffffffff - ROM_SIZE + ROM_SECTION_OFFSET + 1)
126 default CONFIG_ROM_STREAM     = 1
127
128 ##
129 ## Compute where this copy of linuxBIOS will start in the boot rom
130 ##
131 default _ROMBASE      = ( CONFIG_ROM_STREAM_START + PAYLOAD_SIZE )
132
133 ##
134 ## Compute a range of ROM that can cached to speed up linuxBIOS,
135 ## execution speed.
136 ##
137 ## XIP_ROM_SIZE must be a power of 2.
138 ## XIP_ROM_BASE must be a multiple of XIP_ROM_SIZE
139 ##
140 default XIP_ROM_SIZE=65536
141 default XIP_ROM_BASE = ( _ROMBASE + ROM_IMAGE_SIZE - XIP_ROM_SIZE )
142
143 ##
144 ## Set all of the defaults for an x86 architecture
145 ##
146
147 arch i386 end
148 #cpu k8 end
149
150 ##
151 ## Build the objects we have code for in this directory.
152 ##
153
154 #object mainboard.o
155 driver mainboard.o
156 #object static_devices.o
157 if HAVE_MP_TABLE object mptable.o end
158 if HAVE_PIRQ_TABLE object irq_tables.o end
159
160 ## ATI Rage XL framebuffering graphics driver
161 dir /drivers/ati/ragexl
162
163 ##
164 ## Romcc output
165 ##
166 makerule ./failover.E
167         depends "$(MAINBOARD)/failover.c" 
168         action "$(CPP) -I$(TOP)/src $(ROMCCPPFLAGS) $(CPPFLAGS) $(MAINBOARD)/failover.c > ./failover.E"
169 end
170
171 makerule ./failover.inc
172         depends "./failover.E ./romcc"
173         action "./romcc -O -o failover.inc --label-prefix=failover ./failover.E"
174 end
175
176 makerule ./auto.E 
177         depends "$(MAINBOARD)/auto.c option_table.h"  
178         action  "$(CPP) -I$(TOP)/src -I. $(ROMCCPPFLAGS) $(CPPFLAGS) $(MAINBOARD)/auto.c > ./auto.E"
179 end
180 makerule ./auto.inc 
181         depends "./auto.E ./romcc"
182         action  "./romcc -mcpu=k8 -O2 ./auto.E > auto.inc"
183 end
184
185 ##
186 ## Build our 16 bit and 32 bit linuxBIOS entry code
187 ##
188 mainboardinit cpu/i386/entry16.inc
189 mainboardinit cpu/i386/entry32.inc
190 ldscript /cpu/i386/entry16.lds
191 ldscript /cpu/i386/entry32.lds
192
193 ##
194 ## Build our reset vector (This is where linuxBIOS is entered)
195 ##
196 if USE_FALLBACK_IMAGE 
197         mainboardinit cpu/i386/reset16.inc 
198         ldscript /cpu/i386/reset16.lds 
199 else
200         mainboardinit cpu/i386/reset32.inc 
201         ldscript /cpu/i386/reset32.lds 
202 end
203
204 ### Should this be in the northbridge code?
205 mainboardinit arch/i386/lib/cpu_reset.inc
206
207 ##
208 ## Include an id string (For safe flashing)
209 ##
210 mainboardinit arch/i386/lib/id.inc
211 ldscript /arch/i386/lib/id.lds
212
213 ##
214 ## Setup our mtrrs
215 ##
216 mainboardinit cpu/k8/earlymtrr.inc
217
218 ###
219 ### This is the early phase of linuxBIOS startup 
220 ### Things are delicate and we test to see if we should
221 ### failover to another image.
222 ###
223 if USE_FALLBACK_IMAGE
224         ldscript /arch/i386/lib/failover.lds 
225         mainboardinit ./failover.inc
226 end
227
228 ###
229 ### O.k. We aren't just an intermediary anymore!
230 ###
231
232 ##
233 ## Setup RAM
234 ##
235 mainboardinit cpu/k8/enable_mmx_sse.inc
236 mainboardinit ./auto.inc
237 mainboardinit cpu/k8/disable_mmx_sse.inc
238
239 ##
240 ## Include the secondary Configuration files 
241 ##
242 dir /pc80
243 config chip.h
244
245 chip northbridge/amd/amdk8
246         device pci_domain 0 on
247                 device pci 18.0 on # LDT 0
248                         chip southbridge/amd/amd8131
249                                 device pci 0.0 on end
250                                 device pci 0.1 on end
251                                 device pci 1.0 on end
252                                 device pci 1.1 on end
253                         end
254                         chip southbridge/amd/amd8111
255                                 # this "device pci 0.0" is the parent the next one
256                                 # PCI bridge
257                                 device pci 0.0 on
258                                         device pci 0.0 on end
259                                         device pci 0.1 on end
260                                         device pci 0.2 on end
261                                         device pci 1.0 off end
262                                 end
263                                 device pci 1.0 on
264                                         chip superio/winbond/w83627hf
265                                                 device pnp  2e.0 on      # Floppy
266                                                          io 0x60 = 0x3f0
267                                                         irq 0x70 = 6
268                                                         drq 0x74 = 2
269                                                 end
270                                                 device pnp  2e.1 off     # Parallel Port
271                                                          io 0x60 = 0x378
272                                                         irq 0x70 = 7
273                                                 end
274                                                 device pnp  2e.2 on      # Com1
275                                                          io 0x60 = 0x3f8
276                                                         irq 0x70 = 4
277                                                 end
278                                                 device pnp  2e.3 off     # Com2
279                                                         io 0x60 = 0x2f8
280                                                         irq 0x70 = 3
281                                                 end
282                                                 device pnp  2e.5 on      # Keyboard
283                                                          io 0x60 = 0x60
284                                                          io 0x62 = 0x64
285                                                        irq 0x70 = 1
286                                                         irq 0x72 = 12
287                                                 end
288                                                 device pnp  2e.6 off end # CIR
289                                                 device pnp  2e.7 off end # GAME_MIDI_GIPO1
290                                                 device pnp  2e.8 off end # GPIO2
291                                                 device pnp  2e.9 off end # GPIO3
292                                                 device pnp  2e.a off end # ACPI
293                                                 device pnp  2e.b on      # HW Monitor
294                                                          io 0x60 = 0x290
295                                                 end
296                                                 register "com1" = "{1}"
297                                         #       register "com1" = "{1, 0, 0x3f8, 4}"
298                                         #       register "lpt" = "{1}"
299                                         end
300                                 end
301                                 device pci 1.1 on end
302                                 device pci 1.2 on end
303                                 device pci 1.3 on end 
304                                 device pci 1.5 off end
305                                 device pci 1.6 off end
306                         end
307                 end # LDT0
308                 device pci 18.0 on end # LDT1
309                 device pci 18.0 on end # LDT2
310                 device pci 18.1 on end
311                 device pci 18.2 on end
312                 device pci 18.3 on end
313
314                 chip northbridge/amd/amdk8
315                         device pci 19.0 on end
316                         device pci 19.0 on end
317                         device pci 19.0 on end
318                         device pci 19.1 on end
319                         device pci 19.2 on end
320                         device pci 19.3 on end
321                 end
322         end 
323         device apic_cluster 0 on
324                 chip cpu/amd/socket_940
325                         device apic 0 on end
326                 end
327                 chip cpu/amd/socket_940
328                         device apic 1 on end
329                 end
330         end
331 end
332
333 ##
334 ## Include the old serial code for those few places that still need it.
335 ##
336 mainboardinit pc80/serial.inc
337 mainboardinit arch/i386/lib/console.inc
338