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