8294053ae9c8232990a35da58c8737d42f61ace3
[coreboot.git] / src / mainboard / arima / hdama / Config.lb
1 ##
2 ## Compute the location and size of where this firmware image
3 ## (linuxBIOS plus bootloader) will live in the boot rom chip.
4 ##
5 if USE_FALLBACK_IMAGE
6         default ROM_SECTION_SIZE   = FALLBACK_SIZE
7         default ROM_SECTION_OFFSET = ( ROM_SIZE - FALLBACK_SIZE )
8 else
9         default ROM_SECTION_SIZE   = ( ROM_SIZE - FALLBACK_SIZE )
10         default ROM_SECTION_OFFSET = 0
11 end
12
13 ##
14 ## Compute the start location and size size of
15 ## The linuxBIOS bootloader.
16 ##
17 default PAYLOAD_SIZE            = ( ROM_SECTION_SIZE - ROM_IMAGE_SIZE )
18 default CONFIG_ROM_STREAM_START = (0xffffffff - ROM_SIZE + ROM_SECTION_OFFSET + 1)
19
20 ##
21 ## Compute where this copy of linuxBIOS will start in the boot rom
22 ##
23 default _ROMBASE      = ( CONFIG_ROM_STREAM_START + PAYLOAD_SIZE )
24
25 ##
26 ## Compute a range of ROM that can cached to speed up linuxBIOS,
27 ## execution speed.
28 ##
29 ## XIP_ROM_SIZE must be a power of 2.
30 ## XIP_ROM_BASE must be a multiple of XIP_ROM_SIZE
31 ##
32 default XIP_ROM_SIZE=131072
33 default XIP_ROM_BASE = ( _ROMBASE + ROM_IMAGE_SIZE - XIP_ROM_SIZE )
34
35 ##
36 ## Set all of the defaults for an x86 architecture
37 ##
38
39 arch i386 end
40
41 ##
42 ## Build the objects we have code for in this directory.
43 ##
44
45 driver mainboard.o
46 if HAVE_MP_TABLE object mptable.o end
47 if HAVE_PIRQ_TABLE object irq_tables.o end
48
49 ##
50 ## Romcc output
51 ##
52 makerule ./failover.E
53         depends "$(MAINBOARD)/failover.c ./romcc"
54         action "./romcc -E -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/failover.c -o $@"
55 end
56
57 makerule ./failover.inc
58         depends "$(MAINBOARD)/failover.c ./romcc"
59         action "./romcc    -O --label-prefix=failover -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/failover.c -o $@"
60 end
61
62 makerule ./auto.E
63         depends "$(MAINBOARD)/auto.c option_table.h ./romcc"
64         action  "./romcc -E -mcpu=k8 -O2 -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/auto.c -o $@"
65 end
66 makerule ./auto.inc
67         depends "$(MAINBOARD)/auto.c option_table.h ./romcc"
68         action  "./romcc    -mcpu=k8 -O2 -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/auto.c -o $@"
69 end
70
71 ##
72 ## Build our 16 bit and 32 bit linuxBIOS entry code
73 ##
74 mainboardinit cpu/x86/16bit/entry16.inc
75 mainboardinit cpu/x86/32bit/entry32.inc
76 ldscript /cpu/x86/16bit/entry16.lds
77 ldscript /cpu/x86/32bit/entry32.lds
78
79 ##
80 ## Build our reset vector (This is where linuxBIOS is entered)
81 ##
82 if USE_FALLBACK_IMAGE 
83         mainboardinit cpu/x86/16bit/reset16.inc
84         ldscript /cpu/x86/16bit/reset16.lds
85 else
86         mainboardinit cpu/x86/32bit/reset32.inc
87         ldscript /cpu/x86/32bit/reset32.lds
88 end
89
90 ### Should this be in the northbridge code?
91 mainboardinit arch/i386/lib/cpu_reset.inc
92
93 ##
94 ## Include an id string (For safe flashing)
95 ##
96 mainboardinit arch/i386/lib/id.inc
97 ldscript /arch/i386/lib/id.lds
98
99 ###
100 ### This is the early phase of linuxBIOS startup 
101 ### Things are delicate and we test to see if we should
102 ### failover to another image.
103 ###
104 if USE_FALLBACK_IMAGE
105         ldscript /arch/i386/lib/failover.lds 
106         mainboardinit ./failover.inc
107 end
108
109 ###
110 ### O.k. We aren't just an intermediary anymore!
111 ###
112
113 ##
114 ## Setup RAM
115 ##
116 mainboardinit cpu/x86/fpu/enable_fpu.inc
117 mainboardinit cpu/x86/mmx/enable_mmx.inc
118 mainboardinit cpu/x86/sse/enable_sse.inc
119 mainboardinit ./auto.inc
120 mainboardinit cpu/x86/sse/disable_sse.inc
121 mainboardinit cpu/x86/mmx/disable_mmx.inc
122
123 ##
124 ## Include the secondary Configuration files 
125 ##
126 dir /pc80
127 config chip.h
128
129 # config for arima/hdama
130 chip northbridge/amd/amdk8/root_complex
131         device apic_cluster 0 on
132                 chip cpu/amd/socket_940
133                         device apic 0 on end
134                 end
135         end
136         device pci_domain 0 on
137                 chip northbridge/amd/amdk8
138                         device pci 18.0 on #  northbridge 
139                                 #  devices on link 0, link 0 == LDT 0 
140                                 chip southbridge/amd/amd8131
141                                         # the on/off keyword is mandatory
142                                         device pci 0.0 on       # PCIX bridge
143                                                 ## On board NIC A
144                                                 #chip drivers/generic/generic
145                                                 #       device pci 3.0 on       
146                                                 #               irq 0 = 0x13
147                                                 #       end
148                                                 #end
149                                                 ## On board NIC B
150                                                 #chip drivers/generic/generic
151                                                 #       device pci 4.0 on
152                                                 #               irq 0 = 0x13
153                                                 #       end
154                                                 #end
155                                                 ## PCI Slot 3
156                                                 #chip drivers/generic/generic
157                                                 #       device pci 1.0 on
158                                                 #               irq 0 = 0x11
159                                                 #               irq 1 = 0x12
160                                                 #               irq 2 = 0x13
161                                                 #               irq 3 = 0x10
162                                                 #       end
163                                                 #end 
164                                                 ## PCI Slot 4
165                                                 #chip drivers/generic/generic
166                                                 #       device pci 2.0 on
167                                                 #               irq 0 = 0x12
168                                                 #               irq 1 = 0x13
169                                                 #               irq 2 = 0x10
170                                                 #               irq 3 = 0x11
171                                                 #       end
172                                                 #end 
173                                         end
174                                         device pci 0.1 on end   # IOAPIC
175                                         device pci 1.0 on       # PCIX bridge
176                                                 ## PCI Slot 1
177                                                 #chip drivers/generic/generic
178                                                 #       device pci 1.0 on
179                                                 #               irq 0 = 0x11
180                                                 #               irq 1 = 0x12
181                                                 #               irq 2 = 0x13
182                                                 #               irq 3 = 0x10
183                                                 #       end
184                                                 #end
185                                                 ## PCI Slot 2
186                                                 #chip drivers/generic/generic
187                                                 #       device pci 2.0 on
188                                                 #               irq 0 = 0x12
189                                                 #               irq 1 = 0x13
190                                                 #               irq 2 = 0x10
191                                                 #               irq 3 = 0x11
192                                                 #       end
193                                                 #end 
194                                         end
195                                         device pci 1.1 on end   # IOAPIC
196                                 end
197                                 chip southbridge/amd/amd8111
198                                         # this "device pci 0.0" is the parent of the next one
199                                         # PCI bridge
200                                         device pci 0.0 on
201                                                 device pci 0.0 on  end  # USB0
202                                                 device pci 0.1 on  end  # USB1
203                                                 device pci 0.2 off end  # USB 2.0
204                                                 device pci 1.0 off end  # LAN
205                                                 chip drivers/pci/onboard
206                                                         device pci 6.0 on end # ATI Rage XL
207                                                         register "rom_address" = "0xfff80000"
208                                                 end
209                                                 ## PCI Slot 5 (correct?)
210                                                 #chip drivers/generic/generic
211                                                 #       device pci 5.0 on
212                                                 #               irq 0 = 0x11
213                                                 #               irq 1 = 0x12
214                                                 #               irq 2 = 0x13
215                                                 #               irq 3 = 0x10
216                                                 #       end
217                                                 #end 
218                                                 ## PCI Slot 6 (correct?)
219                                                 #chip drivers/generic/generic
220                                                 #       device pci 4.0 on
221                                                 #               irq 0 = 0x10
222                                                 #               irq 1 = 0x11
223                                                 #               irq 2 = 0x12
224                                                 #               irq 3 = 0x13
225                                                 #       end
226                                                 #end 
227
228                                         end
229                                         # LPC bridge
230                                         device pci 1.0 on
231                                                 chip superio/nsc/pc87360
232                                                         device  pnp 2e.0 off  # Floppy 
233                                                                  io 0x60 = 0x3f0
234                                                                 irq 0x70 = 6
235                                                                 drq 0x74 = 2
236                                                         end
237                                                         device pnp 2e.1 off  # Parallel Port
238                                                                  io 0x60 = 0x378
239                                                                 irq 0x70 = 7
240                                                         end
241                                                         device pnp 2e.2 off # Com 2
242                                                                  io 0x60 = 0x2f8
243                                                                 irq 0x70 = 3
244                                                         end
245                                                         device pnp 2e.3 on  # Com 1
246                                                                  io 0x60 = 0x3f8
247                                                                 irq 0x70 = 4
248                                                         end
249                                                         device pnp 2e.4 off end # SWC
250                                                         device pnp 2e.5 off end # Mouse
251                                                         device pnp 2e.6 on  # Keyboard
252                                                                  io 0x60 = 0x60
253                                                                  io 0x62 = 0x64
254                                                                 irq 0x70 = 1
255                                                         end
256                                                         device pnp 2e.7 off end # GPIO
257                                                         device pnp 2e.8 off end # ACB
258                                                         device pnp 2e.9 off end # FSCM
259                                                         device pnp 2e.a off end # WDT  
260                                                 end
261                                         end
262                                         device pci 1.1 on end   # IDE
263                                         device pci 1.2 on end   # SMBus 2.0
264                                         device pci 1.3 on       # System Management
265                                                 chip drivers/generic/generic
266                                                         #phillips pca9545 smbus mux
267                                                         device i2c 70 on 
268                                                                 # analog_devices adm1026        
269                                                                 chip drivers/generic/generic
270                                                                         device i2c 2c on end
271                                                                 end
272                                                         end
273                                                         device i2c 70 on end
274                                                         device i2c 70 on end
275                                                         device i2c 70 on end
276                                                 end
277                                                 chip drivers/generic/generic #dimm 0-0-0
278                                                         device i2c 50 on end
279                                                 end
280                                                 chip drivers/generic/generic #dimm 0-0-1
281                                                         device i2c 51 on end
282                                                 end 
283                                                 chip drivers/generic/generic #dimm 0-1-0
284                                                         device i2c 52 on end
285                                                 end 
286                                                 chip drivers/generic/generic #dimm 0-1-1
287                                                         device i2c 53 on end
288                                                 end 
289                                                 chip drivers/generic/generic #dimm 1-0-0
290                                                         device i2c 54 on end 
291                                                 end
292                                                 chip drivers/generic/generic #dimm 1-0-1
293                                                         device i2c 55 on end
294                                                 end 
295                                                 chip drivers/generic/generic #dimm 1-1-0
296                                                         device i2c 56 on end
297                                                 end 
298                                                 chip drivers/generic/generic #dimm 1-1-1
299                                                         device i2c 57 on end
300                                                 end 
301                                         end
302                                         device pci 1.5 off end  # AC97 Audio
303                                         device pci 1.6 on  end  # AC97 Modem
304                                         register "ide0_enable" = "1"
305                                         register "ide1_enable" = "1"
306                                 end
307                         end #  device pci 18.0 
308                         
309                         device pci 18.0 on end # LDT1
310                         device pci 18.0 on end # LDT2
311                         device pci 18.1 on end
312                         device pci 18.2 on end
313                         device pci 18.3 on end
314                 end  # chip northbridge/amd/amdk8
315                 chip northbridge/amd/amdk8
316                         device pci 19.0 on end
317                         device pci 19.0 on end
318                         device pci 19.0 on end
319                         device pci 19.1 on end
320                         device pci 19.2 on end
321                         device pci 19.3 on end
322                 end
323         end 
324 end
325