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