remove fixed ROM_SIZE setting, add default to 256k
[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 524288
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=1
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 #object mainboard.o
138 driver mainboard.o
139 #object static_devices.o
140 if HAVE_MP_TABLE object mptable.o end
141 if HAVE_PIRQ_TABLE object irq_tables.o end
142 object reset.o
143
144 ##
145 ## Romcc output
146 ##
147 makerule ./failover.E
148         depends "$(MAINBOARD)/failover.c" 
149         action "$(CPP) -I$(TOP)/src $(ROMCCPPFLAGS) $(CPPFLAGS) $(MAINBOARD)/failover.c > ./failover.E"
150 end
151
152 makerule ./failover.inc
153         depends "./failover.E ./romcc"
154         action "./romcc -O -o failover.inc --label-prefix=failover ./failover.E"
155 end
156
157 makerule ./auto.E 
158         depends "$(MAINBOARD)/auto.c" 
159         action  "$(CPP) -I$(TOP)/src $(ROMCCPPFLAGS) $(CPPFLAGS) $(MAINBOARD)/auto.c > ./auto.E"
160 end
161 makerule ./auto.inc 
162         depends "./auto.E ./romcc"
163         action  "./romcc -mcpu=k8  -O ./auto.E > auto.inc"
164 end
165
166 ##
167 ## Build our 16 bit and 32 bit linuxBIOS entry code
168 ##
169 mainboardinit cpu/i386/entry16.inc
170 mainboardinit cpu/i386/entry32.inc
171 ldscript /cpu/i386/entry16.lds
172 ldscript /cpu/i386/entry32.lds
173
174 ##
175 ## Build our reset vector (This is where linuxBIOS is entered)
176 ##
177 if USE_FALLBACK_IMAGE 
178         mainboardinit cpu/i386/reset16.inc 
179         ldscript /cpu/i386/reset16.lds 
180 else
181         mainboardinit cpu/i386/reset32.inc 
182         ldscript /cpu/i386/reset32.lds 
183 end
184
185 ### Should this be in the northbridge code?
186 mainboardinit arch/i386/lib/cpu_reset.inc
187
188 ##
189 ## Include an id string (For safe flashing)
190 ##
191 mainboardinit arch/i386/lib/id.inc
192 ldscript /arch/i386/lib/id.lds
193
194 ##
195 ## Setup our mtrrs
196 ##
197 mainboardinit cpu/k8/earlymtrr.inc
198
199 ###
200 ### This is the early phase of linuxBIOS startup 
201 ### Things are delicate and we test to see if we should
202 ### failover to another image.
203 ###
204 if USE_FALLBACK_IMAGE
205         ldscript /arch/i386/lib/failover.lds 
206         mainboardinit ./failover.inc
207 end
208
209 ###
210 ### O.k. We aren't just an intermediary anymore!
211 ###
212
213 ##
214 ## Setup RAM
215 ##
216 mainboardinit cpu/k8/enable_mmx_sse.inc
217 mainboardinit ./auto.inc
218 mainboardinit cpu/k8/disable_mmx_sse.inc
219
220 ##
221 ## Include the secondary Configuration files 
222 ##
223 dir /pc80
224 config chip.h
225
226 northbridge amd/amdk8 "mc0"
227         pci 0:18.0
228         pci 0:18.0
229         pci 0:18.0
230         pci 0:18.1
231         pci 0:18.2
232         pci 0:18.3
233         southbridge amd/amd8111 "amd8111"
234                 pci 0:0.0
235                 pci 0:1.0
236                 pci 0:1.1
237                 pci 0:1.2
238                 pci 0:1.3
239                 pci 0:1.5
240                 pci 0:1.6
241                 superio NSC/pc87360
242                         pnp 1:2e.0
243                         pnp 1:2e.1
244                         pnp 1:2e.2
245                         pnp 1:2e.3
246                         pnp 1:2e.4
247                         pnp 1:2e.5
248                         pnp 1:2e.6
249                         pnp 1:2e.7
250                         pnp 1:2e.8
251                         pnp 1:2e.9
252                         pnp 1:2e.a
253                         register "com1" = "{1, 0, 0x3f8, 4}"
254                         register "lpt" = "{1}"
255                 end
256         end
257         southbridge amd/amd8151 "amd8151"
258                 pci 0:0.0
259                 pci 0:1.0
260         end
261 end
262
263 cpu k8 "cpu0"
264         register "up" = "{ .chip = &amd8111, .ht_width=16, .ht_speed=600 }"
265 end
266
267 ##
268 ## Include the old serial code for those few places that still need it.
269 ##
270 mainboardinit pc80/serial.inc
271 mainboardinit arch/i386/lib/console.inc
272