- First pass at s2880 support.
[coreboot.git] / src / config / Options.lb
1 #######################################################
2 #
3 # Main options file for LinuxBIOS
4 #
5 # Each option used by a part must be defined in
6 # this file. The format for options is:
7 #
8 #   define <name> 
9 #       default <expr> | {<expr>} | "<string>" | none
10 #       format "<string>"
11 #       export always | used | never
12 #       comment "<string>"
13 #   end
14 #
15 # where 
16 #
17 #   <name> is the name of the option
18 #   <expr> is a numeric expression
19 #   <string> is a string
20 #
21 # Either a default value or 'default none' must
22 # be specified for every option. An option
23 # specified as 'default none' will not be exported
24 # (i.e. will remain undefined) unless it has
25 # been assigned a value.
26 #
27 # Option values can be an immediate expression that 
28 # evaluates to a numeric value, a delayed expression 
29 # (surrounded by curley braces), or a string 
30 # (surrounded by double quotes.)
31 #
32 # Immediate expressions are evaluated at the time an
33 # option is defined or set and the numeric result 
34 # becomes the value of the option.
35 #
36 # Delayed expression are evaluated at the time the 
37 # option is used, either in another expression or 
38 # when being exported.
39 #
40 # String values will have the double quotes removed 
41 # automatically. 
42 #
43 # Format strings determine the print format that is 
44 # used when exporting options. The default format
45 # is "%s" for strings and "%d" for numbers.
46 #
47 # Exported options generate entries in the 
48 # Makefile.settings file. Options can be always 
49 # exported, exported only if used, or never exported.
50 #
51 # A comment string must be supplied for every option.
52 #
53 #######################################################
54
55 ###############################################
56 # Architecture options
57 ###############################################
58
59 define ARCH
60         default "i386"
61         export always
62         comment "Default architecture is i386, options are alpha and ppc"
63 end
64 define k7
65         default none
66         export always
67         comment "We're a k7"
68 end
69 define k8
70         default none
71         export always
72         comment "We're a k8"
73 end
74 define i586
75         default none
76         export always
77         comment "We're a 586"
78 end
79 define i686
80         default none
81         export always
82         comment "We're a 686"
83 end
84 define CPU_FIXUP
85         default none
86         export always
87         comment "Do CPU fixups"
88 end
89
90 ###############################################
91 # Build options
92 ###############################################
93
94 define CROSS_COMPILE
95         default ""
96         export always
97         comment "Cross compiler prefix"
98 end
99 define CC
100         default "$(CROSS_COMPILE)gcc"
101         export always
102         comment "Target C Compiler"
103 end
104 define HOSTCC
105         default "gcc"
106         export always
107         comment "Host C Compiler"
108 end
109 define OBJCOPY
110         default "$(CROSS_COMPILE)objcopy"
111         export always
112         comment "Objcopy command"
113 end
114 define LINUXBIOS_VERSION
115         default "1.1.0"
116         export always
117         comment "LinuxBIOS version"
118 end
119 define LINUXBIOS_BUILD
120         default "$(shell date)"
121         export always
122         comment "Build date"
123 end
124 define LINUXBIOS_COMPILE_TIME
125         default "$(shell date +%T)"
126         export always
127         comment "Build time"
128 end
129 define LINUXBIOS_COMPILE_BY
130         default "$(shell whoami)"
131         export always
132         comment "Who build this image"
133 end
134 define LINUXBIOS_COMPILE_HOST
135         default "$(shell hostname)"
136         export always
137         comment "Build host"
138 end
139
140 define LINUXBIOS_COMPILE_DOMAIN
141         default ""
142         export always
143         comment "Build domain name"
144 end
145 define LINUXBIOS_COMPILER
146         default "$(shell $(CC) $(CFLAGS) -v 2>&1 | tail -n 1)"
147         export always
148         comment "Build compiler"
149 end
150 define LINUXBIOS_LINKER
151         default "$(shell  $(CC) -Wl,-v 2>&1 | grep version | tail -n 1)"
152         export always
153         comment "Build linker"
154 end
155 define LINUXBIOS_ASSEMBLER
156         default "$(shell  touch dummy.s ; $(CC) -c -Wa,-v dummy.s 2>&1; rm -f dummy.s dummy.o )"
157         export always
158         comment "Build assembler"
159 end
160 define CONFIG_CHIP_CONFIGURE
161         default 0
162         export used
163         comment "Use new chip_configure method for configuring (non-pci) devices"
164 end
165
166 ###############################################
167 # ROM image options
168 ###############################################
169
170 define HAVE_FALLBACK_BOOT
171         default 0
172         export always
173         comment "Set if fallback booting required"
174 end
175 define USE_FALLBACK_IMAGE
176         default 0
177         export used
178         comment "Set to build a fallback image"
179 end
180 define USE_NORMAL_IMAGE
181         default {!USE_FALLBACK_IMAGE}
182         export used
183         comment "Set to build a normal image"
184 end
185 define FALLBACK_SIZE
186         default 65536
187         format "0x%x"
188         export used
189         comment "Default fallback image size"
190 end
191 define ROM_SIZE
192         default 262144
193         format "0x%x"
194         export used
195         comment "Size of your ROM"
196 end
197 define ROM_IMAGE_SIZE
198         default 65535
199         format "0x%x"
200         export always
201         comment "Default image size"
202 end
203 define ROM_SECTION_SIZE
204         default {FALLBACK_SIZE}
205         format "0x%x"
206         export used
207         comment "Default rom section size"
208 end
209 define ROM_SECTION_OFFSET
210         default {ROM_SIZE - FALLBACK_SIZE}
211         format "0x%x"
212         export used
213         comment "Default rom section offset"
214 end
215 define PAYLOAD_SIZE
216         default {ROM_SECTION_SIZE - ROM_IMAGE_SIZE}
217         format "0x%x"
218         export always
219         comment "Default payload size"
220 end
221 define _ROMBASE
222         default {PAYLOAD_SIZE}
223         format "0x%x"
224         export always
225         comment "Base of ROM"
226 end
227 define STACK_SIZE
228         default 0x2000
229         format "0x%x"
230         export always
231         comment "Default stack size"
232 end
233 define HEAP_SIZE
234         default 0x2000
235         format "0x%x"
236         export used
237         comment "Default heap size"
238 end
239 define _RAMBASE
240         default 0x00100000
241         format "0x%x"
242         export always
243         comment "Base address of RAM"
244 end
245 define USE_CACHE_RAM
246         default 0
247         export used
248         comment "Use cache as temporary RAM if possible"
249 end
250 define CACHE_RAM_BASE
251         default 0x00200000
252         format "0x%x"
253         export always
254         comment "Base address of cache when using it for temporary RAM"
255 end
256 define CACHE_RAM_SIZE
257         default 0x00004000
258         format "0x%x"
259         export always
260         comment "Size of cache when using it for temporary RAM"
261 end
262 define CONFIG_COMPRESS
263         default 1
264         export always
265         comment "Set for compressed image"
266 end
267 define CONFIG_UNCOMPRESSED
268         default {!CONFIG_COMPRESS}
269         export always
270         comment "Set for uncompressed image"
271 end
272 define HAVE_OPTION_TABLE
273         default 0
274         export always
275         comment "Export CMOS option table"
276 end
277 define USE_OPTION_TABLE
278         default {HAVE_OPTION_TABLE && !USE_FALLBACK_IMAGE}
279         export always
280         comment "Use option table"
281 end
282
283 ###############################################
284 # Build targets
285 ###############################################
286
287 define CRT0
288         default "$(TOP)/src/arch/$(ARCH)/config/crt0.base"
289         export always
290         comment "Main initialization target"
291 end
292
293 ###############################################
294 # Debugging/Logging options
295 ###############################################
296
297 define DEBUG
298         default 1
299         export always
300         comment "Enable debugging code"
301 end
302 define CONFIG_CONSOLE_VGA
303         default 0
304         export always
305         comment "Log messages to VGA"
306 end
307 define CONFIG_CONSOLE_LOGBUF
308         default 0
309         export always
310         comment "Log messages to buffer"
311 end
312 define CONFIG_CONSOLE_SROM
313         default 0
314         export always
315         comment "Log messages to SROM console"
316 end
317 define CONFIG_CONSOLE_SERIAL8250
318         default 0
319         export always
320         comment "Log messages to serial 8250 console"
321 end
322 define SERIAL_CONSOLE
323         default none
324         export used
325         comment "Log messages to serial console"
326 end
327 define MAXIMUM_CONSOLE_LOGLEVEL
328         default 7
329         export always
330         comment "Console will log at this level"
331 end
332 define NO_POST
333         default none
334         export always
335         comment "Disable POST codes"
336 end
337 define TTYS0_BAUD
338         default 115200
339         export always
340         comment "Default baud rate for serial console"
341 end
342 define NO_KEYBOARD
343         default none
344         export never
345         comment "Set if we don't have a keyboard"
346 end
347
348 ###############################################
349 # Mainboard options
350 ###############################################
351
352 define MAINBOARD
353         default "Mainboard_not_set"
354         export always
355         comment "Mainboard name"
356 end
357 define MAINBOARD_PART_NUMBER
358         default "Part_number_not_set"
359         export always
360         comment "Part number of mainboard"
361 end
362 define MAINBOARD_VENDOR
363         default "Vendor_not_set"
364         export always
365         comment "Vendor of mainboard"
366 end
367 define FINAL_MAINBOARD_FIXUP
368         default 0
369         export used
370         comment "Do final mainboard fixups"
371 end
372
373
374 ###############################################
375 # SMP options
376 ###############################################
377
378 define CONFIG_SMP
379         default 0
380         export always
381         comment "Define if we support SMP"
382 end
383 define MAX_CPUS
384         default 1
385         export always
386         comment "CPU count for this machine"
387 end
388 define CONFIG_LOGICAL_CPUS
389         default 1
390         export always
391         comment "Logical CPU count for this machine"
392 end
393 define MAX_PHYSICAL_CPUS
394         default 1
395         export always
396         comment "Physical CPU count for this machine"
397 end
398 define HAVE_MP_TABLE
399         default none
400         export always
401         comment "Define to build an MP table"
402 end
403
404 ###############################################
405 # Boot options
406 ###############################################
407
408 define USE_ELF_BOOT
409         default none
410         export always
411         comment "Use ELF boot loader"
412 end
413 define CONFIG_IDE_STREAM
414         default 0
415         export always
416         comment "Boot from IDE device"
417 end
418 define CONFIG_ROM_STREAM
419         default 0
420         export always
421         comment "Boot image is located in ROM" 
422 end
423 define CONFIG_ROM_STREAM_START
424         default {0xffffffff - ROM_SIZE + ROM_SECTION_OFFSET + 1}
425         format "0x%x"
426         export always
427         comment "ROM stream start location"
428 end
429
430 ###############################################
431 # IRQ options
432 ###############################################
433
434 define HAVE_PIRQ_TABLE
435         default none
436         export always
437         comment "Define if we have a PIRQ table"
438 end
439 define IRQ_SLOT_COUNT
440         default none
441         export always
442         comment "Number of IRQ slots"
443 end
444 define CONFIG_PCIBIOS_IRQ
445         default none
446         export always
447         comment "PCIBIOS IRQ support"
448 end
449 define CONFIG_IOAPIC
450         default none
451         export always
452         comment "IOAPIC support"
453 end
454
455 ###############################################
456 # IDE specific options
457 ###############################################
458
459 define IDE_BOOT_DRIVE
460         default 0
461         export always
462         comment "Disk number of boot drive"
463 end
464 define IDE_SWAB
465         default none
466         export always
467         comment "Swap bytes when reading from IDE device"
468 end
469 define IDE_OFFSET
470         default 0
471         export always
472         comment "Sector at which to start searching for boot image"
473 end
474
475 ###############################################
476 # SMBUS options
477 ###############################################
478
479 define SMBUS_MEM_DEVICE_START
480         default (0xa << 3)
481         export always
482         comment "Start address of SMBUS device"
483 end
484 define SMBUS_MEM_DEVICE_END
485         default {SMBUS_MEM_DEVICE_START +1}
486         export always
487         comment "End address of SMBUS device"
488 end
489 define SMBUS_MEM_DEVICE_INC
490         default 1
491         export always
492         comment "Increment value SMBUS"
493 end
494
495 ###############################################
496 # SuperIO options
497 ###############################################
498
499 define SIO_BASE
500         default none
501         export used
502         comment "Superio base address"
503 end
504 define SIO_SYSTEM_CLK_INPUT
505         default none
506         export used
507         comment "Superio CLK input default"
508 end
509
510 ###############################################
511 # Misc options
512 ###############################################
513
514 define HAVE_HARD_RESET
515         default none
516         export used
517         comment "Have hard reset"
518 end
519 define MEMORY_HOLE
520         default none
521         export used
522         comment "Set to deal with memory hole"
523 end
524 define ENABLE_FIXED_AND_VARIABLE_MTRRS
525         default none
526         export used
527         comment "Enable fixed and variable mtrrs"
528 end
529 define START_CPU_SEG
530         default 0xf0000
531         format "0x%x"
532         export always
533         comment "Start CPU segment"
534 end
535 define MAX_REBOOT_CNT
536         default 2
537         export always
538         comment "Set maximum reboots"
539 end
540 define DISABLE_WATCHDOG
541         default {MAXIMUM_CONSOLE_LOGLEVEL >= 8}
542         export used
543         comment "Disable watchdog if we're doing lots of output"
544 end
545
546 ###############################################
547 # Misc device options
548 ###############################################
549
550 define CONFIG_TSC_X86RDTSC_CALIBRATE_WITH_TIMER2
551         default none
552         export used
553         comment ""
554 end
555 define INTEL_PPRO_MTRR
556         default none
557         export always
558         comment ""
559 end
560 define AMD8111_DEV
561         default 0x3800
562         format "0x%x"
563         export used
564         comment ""
565 end
566 define CONFIG_UDELAY_TSC
567         default 0
568         export used
569         comment ""
570 end
571
572 ###############################################
573 # Board specifig options
574 ###############################################
575
576 ###############################################
577 # Options for motorola/sandpoint
578 ###############################################
579 define CONFIG_SANDPOINT_ALTIMUS
580         default 0
581         export never
582         comment "Configure Sandpoint with Altimus PMC"
583 end
584 define CONFIG_SANDPOINT_TALUS
585         default 0
586         export never
587         comment "Configure Sandpoint with Talus PMC"
588 end
589 define CONFIG_SANDPOINT_UNITY
590         default 0
591         export never
592         comment "Configure Sandpoint with Unity PMC"
593 end
594 define CONFIG_SANDPOINT_VALIS
595         default 0
596         export never
597         comment "Configure Sandpoint with Valis PMC"
598 end
599 define CONFIG_SANDPOINT_GYRUS
600         default 0
601         export never
602         comment "Configure Sandpoint with Gyrus PMC"
603 end