2c12cf62c89890ee7cf4978689df6f749f543d64
[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.5"
121         export always
122         comment "LinuxBIOS version"
123 end
124 define LINUXBIOS_EXTRA_VERSION
125         default ""
126         export used
127         comment "LinuxBIOS extra version"
128 end
129 define LINUXBIOS_BUILD
130         default "$(shell date)"
131         export always
132         comment "Build date"
133 end
134 define LINUXBIOS_COMPILE_TIME
135         default "$(shell date +%T)"
136         export always
137         comment "Build time"
138 end
139 define LINUXBIOS_COMPILE_BY
140         default "$(shell whoami)"
141         export always
142         comment "Who build this image"
143 end
144 define LINUXBIOS_COMPILE_HOST
145         default "$(shell hostname)"
146         export always
147         comment "Build host"
148 end
149
150 define LINUXBIOS_COMPILE_DOMAIN
151         default "$(shell dnsdomainname)"
152         export always
153         comment "Build domain name"
154 end
155 define LINUXBIOS_COMPILER
156         default "$(shell $(CC) $(CFLAGS) -v 2>&1 | tail -n 1)"
157         export always
158         comment "Build compiler"
159 end
160 define LINUXBIOS_LINKER
161         default "$(shell  $(CC) -Wl,-v 2>&1 | grep version | tail -n 1)"
162         export always
163         comment "Build linker"
164 end
165 define LINUXBIOS_ASSEMBLER
166         default "$(shell  touch dummy.s ; $(CC) -c -Wa,-v dummy.s 2>&1; rm -f dummy.s dummy.o )"
167         export always
168         comment "Build assembler"
169 end
170 define CONFIG_CHIP_CONFIGURE
171         default 0
172         export used
173         comment "Use new chip_configure method for configuring (non-pci) devices"
174 end
175 define CONFIG_USE_INIT
176         default 0
177         export used
178         comment "Use stage 1 initialization code"
179 end
180
181 ###############################################
182 # ROM image options
183 ###############################################
184
185 define HAVE_FALLBACK_BOOT
186         format "%d"
187         default 0
188         export always
189         comment "Set if fallback booting required"
190 end
191 define USE_FALLBACK_IMAGE
192         format "%d"
193         default 0
194         export used
195         comment "Set to build a fallback image"
196 end
197 define FALLBACK_SIZE
198         default 65536
199         format "0x%x"
200         export used
201         comment "Default fallback image size"
202 end
203 define ROM_SIZE
204         default none
205         format "0x%x"
206         export used
207         comment "Size of your ROM"
208 end
209 define ROM_IMAGE_SIZE
210         default 65535
211         format "0x%x"
212         export always
213         comment "Default image size"
214 end
215 define ROM_SECTION_SIZE
216         default {FALLBACK_SIZE}
217         format "0x%x"
218         export used
219         comment "Default rom section size"
220 end
221 define ROM_SECTION_OFFSET
222         default {ROM_SIZE - FALLBACK_SIZE}
223         format "0x%x"
224         export used
225         comment "Default rom section offset"
226 end
227 define PAYLOAD_SIZE
228         default {ROM_SECTION_SIZE - ROM_IMAGE_SIZE}
229         format "0x%x"
230         export always
231         comment "Default payload size"
232 end
233 define _ROMBASE
234         default {PAYLOAD_SIZE}
235         format "0x%x"
236         export always
237         comment "Base address of LinuxBIOS in ROM"
238 end
239 define _ROMSTART
240         default none
241         format "0x%x"
242         export used
243         comment "Start address of LinuxBIOS in ROM"
244 end
245 define _RESET
246         default {_ROMBASE}
247         format "0x%x"
248         export always
249         comment "Hardware reset vector address"
250 end
251 define _EXCEPTION_VECTORS
252         default {_ROMBASE+0x100}
253         format "0x%x"
254         export always
255         comment "Address of exception vector table"
256 end
257 define STACK_SIZE
258         default 0x2000
259         format "0x%x"
260         export always
261         comment "Default stack size"
262 end
263 define HEAP_SIZE
264         default 0x2000
265         format "0x%x"
266         export used
267         comment "Default heap size"
268 end
269 define _RAMBASE
270         default none
271         format "0x%x"
272         export always
273         comment "Base address of LinuxBIOS in RAM"
274 end
275 define _RAMSTART
276         default none
277         format "0x%x"
278         export used
279         comment "Start address of LinuxBIOS in RAM"
280 end
281 define USE_DCACHE_RAM
282         default 0
283         export used
284         comment "Use data cache as temporary RAM if possible"
285 end
286 define DCACHE_RAM_BASE
287         default none
288         format "0x%x"
289         export used
290         comment "Base address of data cache when using it for temporary RAM"
291 end
292 define DCACHE_RAM_SIZE
293         default none
294         format "0x%x"
295         export used
296         comment "Size of data cache when using it for temporary RAM"
297 end
298 define XIP_ROM_BASE
299         default 0
300         format "0x%x"
301         export used
302         comment "Start address of area to cache during LinuxBIOS execution directly from ROM"
303 end
304 define XIP_ROM_SIZE
305         default 0
306         format "0x%x"
307         export used
308         comment "Size of area to cache during LinuxBIOS execution directly from ROM"
309 end
310 define CONFIG_COMPRESS
311         default 1
312         export always
313         comment "Set for compressed image"
314 end
315 define CONFIG_UNCOMPRESSED
316         format "%d"
317         default {!CONFIG_COMPRESS}
318         export always
319         comment "Set for uncompressed image"
320 end
321 define HAVE_OPTION_TABLE
322         default 0
323         export always
324         comment "Export CMOS option table"
325 end
326 define USE_OPTION_TABLE
327         format "%d"
328         default {HAVE_OPTION_TABLE && !USE_FALLBACK_IMAGE}
329         export always
330         comment "Use option table"
331 end
332
333 ###############################################
334 # Build targets
335 ###############################################
336
337 define CRT0
338         default "$(TOP)/src/arch/$(ARCH)/config/crt0.base"
339         export always
340         comment "Main initialization target"
341 end
342
343 ###############################################
344 # Debugging/Logging options
345 ###############################################
346
347 define DEBUG
348         default 1
349         export always
350         comment "Enable debugging code"
351 end
352 define CONFIG_CONSOLE_VGA
353         default 0
354         export always
355         comment "Log messages to VGA"
356 end
357 define CONFIG_CONSOLE_LOGBUF
358         default 0
359         export always
360         comment "Log messages to buffer"
361 end
362 define CONFIG_CONSOLE_SROM
363         default 0
364         export always
365         comment "Log messages to SROM console"
366 end
367 define CONFIG_CONSOLE_SERIAL8250
368         default 0
369         export always
370         comment "Log messages to 8250 uart based serial console"
371 end
372 define DEFAULT_CONSOLE_LOGLEVEL
373         default 7
374         export always
375         comment "Console will log at this level unless changed"
376 end
377 define MAXIMUM_CONSOLE_LOGLEVEL
378         default 8
379         export always
380         comment "Error messages up to this level can be printed"
381 end
382 define NO_POST
383         default none
384         export always
385         comment "Disable POST codes"
386 end
387 define TTYS0_BASE
388         default 0x3f8
389         format "0x%x"
390         export always
391         comment "Base address for 8250 uart for the serial console"
392 end
393 define TTYS0_BAUD
394         default 115200
395         export always
396         comment "Default baud rate for serial console"
397 end
398 define TTYS0_DIV
399         default none
400         format "%d"
401         export used
402         comment "Allow UART divisor to be set explicitly"
403 end
404 define TTYS0_LCS
405         default 0x3
406         format "0x%x"
407         export always
408         comment "Default flow control settings for the 8250 serial console uart"
409 end
410         
411 ###############################################
412 # Mainboard options
413 ###############################################
414
415 define MAINBOARD
416         default "Mainboard_not_set"
417         export always
418         comment "Mainboard name"
419 end
420 define MAINBOARD_PART_NUMBER
421         default "Part_number_not_set"
422         export always
423         comment "Part number of mainboard"
424 end
425 define MAINBOARD_VENDOR
426         default "Vendor_not_set"
427         export always
428         comment "Vendor of mainboard"
429 end
430 define CONFIG_SYS_CLK_FREQ
431         default none
432         export used
433         comment "System clock frequency in MHz"
434 end
435 define CONFIG_KEYBOARD
436         default 0
437         export used
438         comment "Run PC keyboard enable code"
439 end
440 define CONFIG_LEGACY_VGABIOS
441         default 0
442         export used
443         comment "Support for legacy VGA BIOS"
444 end
445
446 ###############################################
447 # SMP options
448 ###############################################
449
450 define CONFIG_SMP
451         default 0
452         export always
453         comment "Define if we support SMP"
454 end
455 define CONFIG_MAX_CPUS
456         default 1
457         export always
458         comment "Maximum CPU count for this machine"
459 end
460 define CONFIG_MAX_PHYSICAL_CPUS
461         default {CONFIG_MAX_CPUS}
462         export always
463         comment "Physical CPU count for this machine"
464 end
465 define CONFIG_LOGICAL_CPUS
466         default 0
467         export always
468         comment "Should multiple cpus per die be enabled?"
469 end
470 define HAVE_MP_TABLE
471         default none
472         export always
473         comment "Define to build an MP table"
474 end
475
476 ###############################################
477 # Boot options
478 ###############################################
479
480 define CONFIG_IDE_STREAM
481         default 0
482         export always
483         comment "Boot from IDE device"
484 end
485 define CONFIG_ROM_STREAM
486         default 0
487         export always
488         comment "Boot image is located in ROM" 
489 end
490 define CONFIG_ROM_STREAM_START
491         default {0xffffffff - ROM_SIZE + ROM_SECTION_OFFSET + 1}
492         format "0x%x"
493         export always
494         comment "ROM stream start location"
495 end
496
497 ###############################################
498 # IRQ options
499 ###############################################
500
501 define HAVE_PIRQ_TABLE
502         default none
503         export always
504         comment "Define if we have a PIRQ table"
505 end
506 define IRQ_SLOT_COUNT
507         default none
508         export always
509         comment "Number of IRQ slots"
510 end
511 define CONFIG_PCIBIOS_IRQ
512         default none
513         export always
514         comment "PCIBIOS IRQ support"
515 end
516 define CONFIG_IOAPIC
517         default none
518         export always
519         comment "IOAPIC support"
520 end
521
522 ###############################################
523 # IDE specific options
524 ###############################################
525
526 define IDE_BOOT_DRIVE
527         default 0
528         export always
529         comment "Disk number of boot drive"
530 end
531 define IDE_SWAB
532         default none
533         export always
534         comment "Swap bytes when reading from IDE device"
535 end
536 define IDE_OFFSET
537         default 0
538         export always
539         comment "Sector at which to start searching for boot image"
540 end
541
542 ###############################################
543 # Options for memory mapped I/O
544 ###############################################
545
546 define PCIC0_CFGADDR
547         default none
548         format "0x%x"
549         export used
550         comment "Address of PCI Configuration Address Register"
551 end
552 define PCIC0_CFGDATA
553         default none
554         format "0x%x"
555         export used
556         comment "Address of PCI Configuration Data Register"
557 end
558 define ISA_IO_BASE
559         default none
560         format "0x%x"
561         export used
562         comment "Base address of PCI/ISA I/O address range"
563 end
564 define ISA_MEM_BASE
565         default none
566         format "0x%x"
567         export used
568         comment "Base address of PCI/ISA memory address range"
569 end
570 define PNP_CFGADDR
571         default none
572         format "0x%x"
573         export used
574         comment "PNP Configuration Address Register offset"
575 end
576 define PNP_CFGDATA
577         default none
578         format "0x%x"
579         export used
580         comment "PNP Configuration Data Register offset"
581 end
582 define _IO_BASE
583         default none
584         format "0x%x"
585         export used
586         comment "Base address of memory mapped I/O operations"
587 end
588
589 ###############################################
590 # Options for embedded systems
591 ###############################################
592
593 define EMBEDDED_RAM_SIZE
594         default none
595         export used
596         comment "Embedded boards generally have fixed RAM size"
597 end
598
599 ###############################################
600 # Misc options
601 ###############################################
602
603 define HAVE_HARD_RESET
604         default none
605         export used
606         comment "Have hard reset"
607 end
608 define MEMORY_HOLE
609         default none
610         export used
611         comment "Set to deal with memory hole"
612 end
613 define MAX_REBOOT_CNT
614         default 3
615         export always
616         comment "Set maximum reboots"
617 end
618
619 ###############################################
620 # Misc device options
621 ###############################################
622
623 define CONFIG_TSC_X86RDTSC_CALIBRATE_WITH_TIMER2
624         default 0
625         export used
626         comment "Use timer2 to callibrate the x86 time stamp counter"
627 end
628 define INTEL_PPRO_MTRR
629         default none
630         export always
631         comment ""
632 end
633 define CONFIG_UDELAY_TSC
634         default 0
635         export used
636         comment "Implement udelay with the x86 time stamp counter"
637 end
638 define FAKE_SPDROM
639         default 0
640         export always
641         comment "Use this to fake spd rom values"
642 end
643
644 ###############################################
645 # Board specific options
646 ###############################################
647
648 ###############################################
649 # Options for motorola/sandpoint
650 ###############################################
651 define CONFIG_SANDPOINT_ALTIMUS
652         default 0
653         export never
654         comment "Configure Sandpoint with Altimus PMC"
655 end
656 define CONFIG_SANDPOINT_TALUS
657         default 0
658         export never
659         comment "Configure Sandpoint with Talus PMC"
660 end
661 define CONFIG_SANDPOINT_UNITY
662         default 0
663         export never
664         comment "Configure Sandpoint with Unity PMC"
665 end
666 define CONFIG_SANDPOINT_VALIS
667         default 0
668         export never
669         comment "Configure Sandpoint with Valis PMC"
670 end
671 define CONFIG_SANDPOINT_GYRUS
672         default 0
673         export never
674         comment "Configure Sandpoint with Gyrus PMC"
675 end
676
677 ###############################################
678 # Options for totalimpact/briq
679 ###############################################
680 define CONFIG_BRIQ_750FX
681         default 0
682         export never
683         comment "Configure briQ with PowerPC 750FX"
684 end
685 define CONFIG_BRIQ_7400
686         default 0
687         export never
688         comment "Configure briQ with PowerPC G4"
689 end