fdd87e56b78c82595d9d1ace4e929344d625170e
[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 CPU_OPT
110         default none
111         export used
112         comment "Additional per-cpu CFLAGS"
113 end
114 define OBJCOPY
115         default "$(CROSS_COMPILE)objcopy"
116         export always
117         comment "Objcopy command"
118 end
119 define LINUXBIOS_VERSION
120         default "1.1.0"
121         export always
122         comment "LinuxBIOS version"
123 end
124 define LINUXBIOS_BUILD
125         default "$(shell date)"
126         export always
127         comment "Build date"
128 end
129 define LINUXBIOS_COMPILE_TIME
130         default "$(shell date +%T)"
131         export always
132         comment "Build time"
133 end
134 define LINUXBIOS_COMPILE_BY
135         default "$(shell whoami)"
136         export always
137         comment "Who build this image"
138 end
139 define LINUXBIOS_COMPILE_HOST
140         default "$(shell hostname)"
141         export always
142         comment "Build host"
143 end
144
145 define LINUXBIOS_COMPILE_DOMAIN
146         default ""
147         export always
148         comment "Build domain name"
149 end
150 define LINUXBIOS_COMPILER
151         default "$(shell $(CC) $(CFLAGS) -v 2>&1 | tail -n 1)"
152         export always
153         comment "Build compiler"
154 end
155 define LINUXBIOS_LINKER
156         default "$(shell  $(CC) -Wl,-v 2>&1 | grep version | tail -n 1)"
157         export always
158         comment "Build linker"
159 end
160 define LINUXBIOS_ASSEMBLER
161         default "$(shell  touch dummy.s ; $(CC) -c -Wa,-v dummy.s 2>&1; rm -f dummy.s dummy.o )"
162         export always
163         comment "Build assembler"
164 end
165 define CONFIG_CHIP_CONFIGURE
166         default 0
167         export used
168         comment "Use new chip_configure method for configuring (non-pci) devices"
169 end
170
171 ###############################################
172 # ROM image options
173 ###############################################
174
175 define HAVE_FALLBACK_BOOT
176         default 0
177         export always
178         comment "Set if fallback booting required"
179 end
180 define USE_FALLBACK_IMAGE
181         default 0
182         export used
183         comment "Set to build a fallback image"
184 end
185 define USE_NORMAL_IMAGE
186         format "%d"
187         default {!USE_FALLBACK_IMAGE}
188         export used
189         comment "Set to build a normal image"
190 end
191 define FALLBACK_SIZE
192         default 65536
193         format "0x%x"
194         export used
195         comment "Default fallback image size"
196 end
197 define ROM_SIZE
198         default 262144
199         format "0x%x"
200         export used
201         comment "Size of your ROM"
202 end
203 define ROM_IMAGE_SIZE
204         default 65535
205         format "0x%x"
206         export always
207         comment "Default image size"
208 end
209 define ROM_SECTION_SIZE
210         default {FALLBACK_SIZE}
211         format "0x%x"
212         export used
213         comment "Default rom section size"
214 end
215 define ROM_SECTION_OFFSET
216         default {ROM_SIZE - FALLBACK_SIZE}
217         format "0x%x"
218         export used
219         comment "Default rom section offset"
220 end
221 define PAYLOAD_SIZE
222         default {ROM_SECTION_SIZE - ROM_IMAGE_SIZE}
223         format "0x%x"
224         export always
225         comment "Default payload size"
226 end
227 define _ROMBASE
228         default {PAYLOAD_SIZE}
229         format "0x%x"
230         export always
231         comment "Base address of LinuxBIOS in ROM"
232 end
233 define _RESET
234         default {_ROMBASE}
235         format "0x%x"
236         export always
237         comment "Hardware reset vector address"
238 end
239 define STACK_SIZE
240         default 0x2000
241         format "0x%x"
242         export always
243         comment "Default stack size"
244 end
245 define HEAP_SIZE
246         default 0x2000
247         format "0x%x"
248         export used
249         comment "Default heap size"
250 end
251 define _RAMBASE
252         default 0x4000
253         format "0x%x"
254         export always
255         comment "Base address of LinuxBIOS in RAM"
256 end
257 define USE_CACHE_RAM
258         default 0
259         export used
260         comment "Use cache as temporary RAM if possible"
261 end
262 define CACHE_RAM_BASE
263         default 0x00200000
264         format "0x%x"
265         export always
266         comment "Base address of cache when using it for temporary RAM"
267 end
268 define CACHE_RAM_SIZE
269         default 0x00004000
270         format "0x%x"
271         export always
272         comment "Size of cache when using it for temporary RAM"
273 end
274 define CONFIG_COMPRESS
275         default 1
276         export always
277         comment "Set for compressed image"
278 end
279 define CONFIG_UNCOMPRESSED
280         format "%d"
281         default {!CONFIG_COMPRESS}
282         export always
283         comment "Set for uncompressed image"
284 end
285 define HAVE_OPTION_TABLE
286         default 0
287         export always
288         comment "Export CMOS option table"
289 end
290 define USE_OPTION_TABLE
291         format "%d"
292         default {HAVE_OPTION_TABLE && !USE_FALLBACK_IMAGE}
293         export always
294         comment "Use option table"
295 end
296
297 ###############################################
298 # Build targets
299 ###############################################
300
301 define CRT0
302         default "$(TOP)/src/arch/$(ARCH)/config/crt0.base"
303         export always
304         comment "Main initialization target"
305 end
306
307 ###############################################
308 # Debugging/Logging options
309 ###############################################
310
311 define DEBUG
312         default 1
313         export always
314         comment "Enable debugging code"
315 end
316 define CONFIG_CONSOLE_VGA
317         default 0
318         export always
319         comment "Log messages to VGA"
320 end
321 define CONFIG_CONSOLE_LOGBUF
322         default 0
323         export always
324         comment "Log messages to buffer"
325 end
326 define CONFIG_CONSOLE_SROM
327         default 0
328         export always
329         comment "Log messages to SROM console"
330 end
331 define CONFIG_CONSOLE_SERIAL8250
332         default 0
333         export always
334         comment "Log messages to serial 8250 console"
335 end
336 define SERIAL_CONSOLE
337         default none
338         export used
339         comment "Log messages to serial console"
340 end
341
342 define DEFAULT_CONSOLE_LOGLEVEL
343         default 7
344         export always
345         comment "Console will log at this level unless changed"
346 end
347
348 define MAXIMUM_CONSOLE_LOGLEVEL
349         default 8
350         export always
351         comment "Error messages up to this level can be printed"
352 end
353
354 define NO_POST
355         default none
356         export always
357         comment "Disable POST codes"
358 end
359 define TTYS0_BAUD
360         default 115200
361         export always
362         comment "Default baud rate for serial console"
363 end
364 define NO_KEYBOARD
365         default none
366         export never
367         comment "Set if we don't have a keyboard"
368 end
369
370 ###############################################
371 # Mainboard options
372 ###############################################
373
374 define MAINBOARD
375         default "Mainboard_not_set"
376         export always
377         comment "Mainboard name"
378 end
379 define MAINBOARD_PART_NUMBER
380         default "Part_number_not_set"
381         export always
382         comment "Part number of mainboard"
383 end
384 define MAINBOARD_VENDOR
385         default "Vendor_not_set"
386         export always
387         comment "Vendor of mainboard"
388 end
389 define FINAL_MAINBOARD_FIXUP
390         default 0
391         export used
392         comment "Do final mainboard fixups"
393 end
394 define CONFIG_SYS_CLK_FREQ
395         default none
396         export used
397         comment "System clock frequency in MHz"
398 end
399
400 ###############################################
401 # SMP options
402 ###############################################
403
404 define CONFIG_SMP
405         default 0
406         export always
407         comment "Define if we support SMP"
408 end
409 define MAX_CPUS
410         default 1
411         export always
412         comment "CPU count for this machine"
413 end
414 define CONFIG_LOGICAL_CPUS
415         default 1
416         export always
417         comment "Logical CPU count for this machine"
418 end
419 define MAX_PHYSICAL_CPUS
420         default 1
421         export always
422         comment "Physical CPU count for this machine"
423 end
424 define HAVE_MP_TABLE
425         default none
426         export always
427         comment "Define to build an MP table"
428 end
429
430 ###############################################
431 # Boot options
432 ###############################################
433
434 define USE_ELF_BOOT
435         default none
436         export always
437         comment "Use ELF boot loader"
438 end
439 define CONFIG_IDE_STREAM
440         default 0
441         export always
442         comment "Boot from IDE device"
443 end
444 define CONFIG_ROM_STREAM
445         default 0
446         export always
447         comment "Boot image is located in ROM" 
448 end
449 define CONFIG_ROM_STREAM_START
450         default {0xffffffff - ROM_SIZE + ROM_SECTION_OFFSET + 1}
451         format "0x%x"
452         export always
453         comment "ROM stream start location"
454 end
455
456 ###############################################
457 # IRQ options
458 ###############################################
459
460 define HAVE_PIRQ_TABLE
461         default none
462         export always
463         comment "Define if we have a PIRQ table"
464 end
465 define IRQ_SLOT_COUNT
466         default none
467         export always
468         comment "Number of IRQ slots"
469 end
470 define CONFIG_PCIBIOS_IRQ
471         default none
472         export always
473         comment "PCIBIOS IRQ support"
474 end
475 define CONFIG_IOAPIC
476         default none
477         export always
478         comment "IOAPIC support"
479 end
480
481 ###############################################
482 # IDE specific options
483 ###############################################
484
485 define IDE_BOOT_DRIVE
486         default 0
487         export always
488         comment "Disk number of boot drive"
489 end
490 define IDE_SWAB
491         default none
492         export always
493         comment "Swap bytes when reading from IDE device"
494 end
495 define IDE_OFFSET
496         default 0
497         export always
498         comment "Sector at which to start searching for boot image"
499 end
500
501 ###############################################
502 # SMBUS options
503 ###############################################
504
505 define SMBUS_MEM_DEVICE_START
506         default (0xa << 3)
507         export always
508         comment "Start address of SMBUS device"
509 end
510 define SMBUS_MEM_DEVICE_END
511         default {SMBUS_MEM_DEVICE_START +1}
512         export always
513         comment "End address of SMBUS device"
514 end
515 define SMBUS_MEM_DEVICE_INC
516         default 1
517         export always
518         comment "Increment value SMBUS"
519 end
520
521 ###############################################
522 # SuperIO options
523 ###############################################
524
525 define SIO_BASE
526         default none
527         export used
528         comment "Superio base address"
529 end
530 define SIO_SYSTEM_CLK_INPUT
531         default none
532         export used
533         comment "Superio CLK input default"
534 end
535
536 ###############################################
537 # Misc options
538 ###############################################
539
540 define HAVE_HARD_RESET
541         default none
542         export used
543         comment "Have hard reset"
544 end
545 define MEMORY_HOLE
546         default none
547         export used
548         comment "Set to deal with memory hole"
549 end
550 define ENABLE_FIXED_AND_VARIABLE_MTRRS
551         default none
552         export used
553         comment "Enable fixed and variable mtrrs"
554 end
555 define START_CPU_SEG
556         default 0xf0000
557         format "0x%x"
558         export always
559         comment "Start CPU segment"
560 end
561 define MAX_REBOOT_CNT
562         default 2
563         export always
564         comment "Set maximum reboots"
565 end
566 define DISABLE_WATCHDOG
567         default {MAXIMUM_CONSOLE_LOGLEVEL >= 8}
568         export used
569         comment "Disable watchdog if we're doing lots of output"
570 end
571
572 ###############################################
573 # Misc device options
574 ###############################################
575
576 define CONFIG_TSC_X86RDTSC_CALIBRATE_WITH_TIMER2
577         default none
578         export used
579         comment ""
580 end
581 define INTEL_PPRO_MTRR
582         default none
583         export always
584         comment ""
585 end
586 define AMD8111_DEV
587         default 0x3800
588         format "0x%x"
589         export used
590         comment ""
591 end
592 define CONFIG_UDELAY_TSC
593         default 0
594         export used
595         comment ""
596 end
597
598 ###############################################
599 # Board specifig options
600 ###############################################
601
602 ###############################################
603 # Options for motorola/sandpoint
604 ###############################################
605 define CONFIG_SANDPOINT_ALTIMUS
606         default 0
607         export never
608         comment "Configure Sandpoint with Altimus PMC"
609 end
610 define CONFIG_SANDPOINT_TALUS
611         default 0
612         export never
613         comment "Configure Sandpoint with Talus PMC"
614 end
615 define CONFIG_SANDPOINT_UNITY
616         default 0
617         export never
618         comment "Configure Sandpoint with Unity PMC"
619 end
620 define CONFIG_SANDPOINT_VALIS
621         default 0
622         export never
623         comment "Configure Sandpoint with Valis PMC"
624 end
625 define CONFIG_SANDPOINT_GYRUS
626         default 0
627         export never
628         comment "Configure Sandpoint with Gyrus PMC"
629 end