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