Attempt to make comments more descriptive.
[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 HAVE_MOVNTI
65         default 0
66         export always
67         comment "This cpu supports the MOVNTI directive"
68 end
69
70 ###############################################
71 # Build options
72 ###############################################
73
74 define CROSS_COMPILE
75         default ""
76         export always
77         comment "Cross compiler prefix"
78 end
79 define CC
80         default "$(CROSS_COMPILE)gcc"
81         export always
82         comment "Target C Compiler"
83 end
84 define HOSTCC
85         default "gcc"
86         export always
87         comment "Host C Compiler"
88 end
89 define CPU_OPT
90         default none
91         export used
92         comment "Additional per-cpu CFLAGS"
93 end
94 define OBJCOPY
95         default "$(CROSS_COMPILE)objcopy --gap-fill 0xff"
96         export always
97         comment "Objcopy command"
98 end
99 define LINUXBIOS_VERSION
100         default "1.1.8"
101         export always
102         format "\"%s\""
103         comment "LinuxBIOS version"
104 end
105 define LINUXBIOS_EXTRA_VERSION
106         default ""
107         export used
108         format "\"%s\""
109         comment "LinuxBIOS extra version"
110 end
111 define LINUXBIOS_BUILD
112         default "$(shell date)"
113         export always
114         format "\"%s\""
115         comment "Build date"
116 end
117 define LINUXBIOS_COMPILE_TIME
118         default "$(shell date +%T)"
119         export always
120         format "\"%s\""
121         comment "Build time"
122 end
123 define LINUXBIOS_COMPILE_BY
124         default "$(shell whoami)"
125         export always
126         format "\"%s\""
127         comment "Who build this image"
128 end
129 define LINUXBIOS_COMPILE_HOST
130         default "$(shell hostname)"
131         export always
132         format "\"%s\""
133         comment "Build host"
134 end
135
136 define LINUXBIOS_COMPILE_DOMAIN
137         default "$(shell dnsdomainname)"
138         export always
139         format "\"%s\""
140         comment "Build domain name"
141 end
142 define LINUXBIOS_COMPILER
143         default "$(shell $(CC) $(CFLAGS) -v 2>&1 | tail -n 1)"
144         export always
145         format "\"%s\""
146         comment "Build compiler"
147 end
148 define LINUXBIOS_LINKER
149         default "$(shell  $(CC) -Wl,-v 2>&1 | grep version | tail -n 1)"
150         export always
151         format "\"%s\""
152         comment "Build linker"
153 end
154 define LINUXBIOS_ASSEMBLER
155         default "$(shell  touch dummy.s ; $(CC) -c -Wa,-v dummy.s 2>&1; rm -f dummy.s dummy.o )"
156         export always
157         format "\"%s\""
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 define CONFIG_USE_INIT
166         default 0
167         export always
168         comment "Use stage 1 initialization code"
169 end
170
171 ###############################################
172 # ROM image options
173 ###############################################
174
175 define HAVE_FALLBACK_BOOT
176         format "%d"
177         default 0
178         export always
179         comment "Set if fallback booting required"
180 end
181 define USE_FALLBACK_IMAGE
182         format "%d"
183         default 0
184         export used
185         comment "Set to build a fallback image"
186 end
187 define FALLBACK_SIZE
188         default 65536
189         format "0x%x"
190         export used
191         comment "ROM_SECTION_SIZE to use for the fallback build."
192 end
193 define ROM_SIZE
194         default none
195         format "0x%x"
196         export used
197         comment "Total number of bytes allocated for normal and fallback LinuxBIOS images and payloads. Note that the fallback image goes at the end of the ROM, and the normal image at the beginning."
198 end
199 define ROM_IMAGE_SIZE
200         default 65535
201         format "0x%x"
202         export always
203         comment "Maximum number of bytes allowed for a LinuxBIOS image. Does not include the payload."
204 end
205 define ROM_SECTION_SIZE
206         default {FALLBACK_SIZE}
207         format "0x%x"
208         export used
209         comment "Default rom section size. Normally, this is calculated in mainboard Config.lb and varies between the normal and fallback builds."
210 end
211 define ROM_SECTION_OFFSET
212         default {ROM_SIZE - FALLBACK_SIZE}
213         format "0x%x"
214         export used
215         comment "Number of bytes from the beginning of the ROM to the start of the section containing this build (normal or fallback). Normally, this is calculated in mainboard Config.lb."
216 end
217 define PAYLOAD_SIZE
218         default {ROM_SECTION_SIZE - ROM_IMAGE_SIZE}
219         format "0x%x"
220         export always
221         comment "Maximum number of bytes allowed for a payload. Normally, this is calculated as above."
222 end
223 define _ROMBASE
224         default {PAYLOAD_SIZE}
225         format "0x%x"
226         export always
227         comment "Base address of LinuxBIOS in ROM"
228 end
229 define _ROMSTART
230         default none
231         format "0x%x"
232         export used
233         comment "Start address of LinuxBIOS in ROM"
234 end
235 define _RESET
236         default {_ROMBASE}
237         format "0x%x"
238         export always
239         comment "Hardware reset vector address"
240 end
241 define _EXCEPTION_VECTORS
242         default {_ROMBASE+0x100}
243         format "0x%x"
244         export always
245         comment "Address of exception vector table"
246 end
247 define STACK_SIZE
248         default 0x2000
249         format "0x%x"
250         export always
251         comment "Default stack size"
252 end
253 define HEAP_SIZE
254         default 0x2000
255         format "0x%x"
256         export always
257         comment "Default heap size"
258 end
259 define _RAMBASE
260         default none
261         format "0x%x"
262         export always
263         comment "Base address of LinuxBIOS in RAM"
264 end
265 define _RAMSTART
266         default none
267         format "0x%x"
268         export used
269         comment "Start address of LinuxBIOS in RAM"
270 end
271 define USE_DCACHE_RAM
272         default 0
273         export always
274         comment "Use data cache as temporary RAM if possible"
275 end
276 define DCACHE_RAM_BASE
277         default none
278         format "0x%x"
279         export used
280         comment "Base address of data cache when using it for temporary RAM"
281 end
282 define DCACHE_RAM_SIZE
283         default none
284         format "0x%x"
285         export used
286         comment "Size of data cache when using it for temporary RAM"
287 end
288 define XIP_ROM_BASE
289         default 0
290         format "0x%x"
291         export used
292         comment "Start address of area to cache during LinuxBIOS execution directly from ROM"
293 end
294 define XIP_ROM_SIZE
295         default 0
296         format "0x%x"
297         export used
298         comment "Size of area to cache during LinuxBIOS execution directly from ROM"
299 end
300 define CONFIG_COMPRESS
301         default 1
302         export always
303         comment "Set for compressed image"
304 end
305 define CONFIG_UNCOMPRESSED
306         format "%d"
307         default {!CONFIG_COMPRESS}
308         export always
309         comment "Set for uncompressed image"
310 end
311 define CONFIG_LB_MEM_TOPK
312         format "%d"
313         default 1024
314         export always
315         comment "Kilobytes of memory to initialized before executing code from RAM"
316 end
317 define HAVE_OPTION_TABLE
318         default 0
319         export always
320         comment "Export CMOS option table"
321 end
322 define USE_OPTION_TABLE
323         format "%d"
324         default {HAVE_OPTION_TABLE && !USE_FALLBACK_IMAGE}
325         export always
326         comment "Use option table"
327 end
328
329 ###############################################
330 # CMOS variable options
331 ###############################################
332 define LB_CKS_RANGE_START
333         default 49
334         format "%d"
335         export always
336         comment "First CMOS byte to use for LinuxBIOS options"
337 end
338 define LB_CKS_RANGE_END
339         default 125
340         format "%d"
341         export always
342         comment "Last CMOS byte to use for LinuxBIOS options"
343 end
344 define LB_CKS_LOC
345         default 126
346         format "%d"
347         export always
348         comment "Pair of bytes to use for CMOS checksum"
349 end
350
351
352 ###############################################
353 # Build targets
354 ###############################################
355
356 define CRT0
357         default "$(TOP)/src/arch/$(ARCH)/init/crt0.S.lb"
358         export always
359         comment "Main initialization target"
360 end
361
362 ###############################################
363 # Debugging/Logging options
364 ###############################################
365
366 define DEBUG
367         default 1
368         export always
369         comment "Enable debugging code"
370 end
371 define CONFIG_CONSOLE_VGA
372         default 0
373         export always
374         comment "Log messages to VGA"
375 end
376 define CONFIG_CONSOLE_BTEXT
377         default 0
378         export always
379         comment "Log messages to btext fb console"
380 end
381 define CONFIG_CONSOLE_LOGBUF
382         default 0
383         export always
384         comment "Log messages to buffer"
385 end
386 define CONFIG_CONSOLE_SROM
387         default 0
388         export always
389         comment "Log messages to SROM console"
390 end
391 define CONFIG_CONSOLE_SERIAL8250
392         default 0
393         export always
394         comment "Log messages to 8250 uart based serial console"
395 end
396 define DEFAULT_CONSOLE_LOGLEVEL
397         default 7
398         export always
399         comment "Console will log at this level unless changed"
400 end
401 define MAXIMUM_CONSOLE_LOGLEVEL
402         default 8
403         export always
404         comment "Error messages up to this level can be printed"
405 end
406 define CONFIG_SERIAL_POST
407         default 0
408         export always
409         comment "Enable SERIAL POST codes"
410 end
411 define NO_POST
412         default none
413         export used
414         comment "Disable POST codes"
415 end
416 define TTYS0_BASE
417         default 0x3f8
418         format "0x%x"
419         export always
420         comment "Base address for 8250 uart for the serial console"
421 end
422 define TTYS0_BAUD
423         default 115200
424         export always
425         comment "Default baud rate for serial console"
426 end
427 define TTYS0_DIV
428         default none
429         format "%d"
430         export used
431         comment "Allow UART divisor to be set explicitly"
432 end
433 define TTYS0_LCS
434         default 0x3
435         format "0x%x"
436         export always
437         comment "Default flow control settings for the 8250 serial console uart"
438 end
439         
440 ###############################################
441 # Mainboard options
442 ###############################################
443
444 define MAINBOARD
445         default "Mainboard_not_set"
446         export always
447         comment "Mainboard name"
448 end
449 define MAINBOARD_PART_NUMBER
450         default "Part_number_not_set"
451         export always
452         format "\"%s\""
453         comment "Part number of mainboard"
454 end
455 define MAINBOARD_VENDOR
456         default "Vendor_not_set"
457         export always
458         format "\"%s\""
459         comment "Vendor of mainboard"
460 end
461 define MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID
462         default 0
463         export always
464         comment "PCI Vendor ID of mainboard manufacturer"
465 end
466 define MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID
467         default 0
468         format "0x%x"
469         export always
470         comment "PCI susbsystem device id assigned my mainboard manufacturer"
471 end
472 define MAINBOARD_POWER_ON_AFTER_POWER_FAIL
473         default none
474         export used
475         comment "Default power on after power fail setting"
476 end
477 define CONFIG_SYS_CLK_FREQ
478         default none
479         export used
480         comment "System clock frequency in MHz"
481 end
482
483 ###############################################
484 # SMP options
485 ###############################################
486
487 define CONFIG_SMP
488         default 0
489         export always
490         comment "Define if we support SMP"
491 end
492 define CONFIG_MAX_CPUS
493         default 1
494         export always
495         comment "Maximum CPU count for this machine"
496 end
497 define CONFIG_MAX_PHYSICAL_CPUS
498         default 1
499         export always
500         comment "Maximum physical CPU count for this machine"
501 end
502 define CONFIG_LOGICAL_CPUS
503         default 0
504         export always
505         comment "Should multiple cpus per die be enabled?"
506 end
507 define HAVE_MP_TABLE
508         default none
509         export used
510         comment "Define to build an MP table"
511 end
512 define SERIAL_CPU_INIT
513         default 1
514         export always
515         comment "Serialize CPU init"
516 end
517
518 ###############################################
519 # Boot options
520 ###############################################
521
522 define CONFIG_IDE_STREAM
523         default 0
524         export always
525         comment "Boot from IDE device"
526 end
527 define CONFIG_ROM_STREAM
528         default 0
529         export always
530         comment "Boot image is located in ROM" 
531 end
532 define CONFIG_ROM_STREAM_START
533         default {0xffffffff - ROM_SIZE + ROM_SECTION_OFFSET + 1}
534         format "0x%x"
535         export always
536         comment "Memory address of this (normal or fallback) build's payload in ROM. Normally, this is calculated as above."
537 end
538 define CONFIG_FS_STREAM
539         default 0
540         export always
541         comment "Boot from a filesystem"
542 end
543 define CONFIG_FS_EXT2
544         default 0
545         export always
546         comment "Enable ext2 filesystem support"
547 end
548 define CONFIG_FS_ISO9660
549         default 0
550         export always
551         comment "Enable ISO9660 filesystem support"
552 end
553 define CONFIG_FS_FAT
554         default 0
555         export always
556         comment "Enable FAT filesystem support"
557 end
558 define AUTOBOOT_DELAY
559         default 2
560         export always
561         comment "Delay (in seconds) before autobooting"
562 end
563 define AUTOBOOT_CMDLINE
564         default "hdc1:/vmlinuz root=/dev/hdc3 console=tty0 console=ttyS0,115200"
565         export always
566         format "\"%s\""
567         comment "Default command line when autobooting"
568 end
569
570 define USE_WATCHDOG_ON_BOOT
571         default 0
572         export always
573         comment "Use the watchdog on booting"
574 end
575
576 ###############################################
577 # Plugin Device support options
578 ###############################################
579
580 define CONFIG_HYPERTRANSPORT_PLUGIN_SUPPORT
581         default 1
582         export always
583         comment "Enable support for plugin Hypertransport busses"
584 end
585 define CONFIG_AGP_PLUGIN_SUPPORT
586         default 1
587         export always
588         comment "Enable support for plugin AGP busses"
589 end
590 define CONFIG_CARDBUS_PLUGIN_SUPPORT
591         default 1
592         export always
593         comment "Enable support cardbus plugin cards"
594 end
595 define CONFIG_PCIX_PLUGIN_SUPPORT
596         default 1
597         export always
598         comment "Enable support for plugin PCI-X busses"
599 end
600 define CONFIG_PCIEXP_PLUGIN_SUPPORT
601         default 1
602         export always
603         comment "Enable support for plugin PCI-E busses"
604 end
605
606 ###############################################
607 # IRQ options
608 ###############################################
609
610 define HAVE_PIRQ_TABLE
611         default none
612         export used
613         comment "Define if we have a PIRQ table"
614 end
615 define IRQ_SLOT_COUNT
616         default none
617         export used
618         comment "Number of IRQ slots"
619 end
620 define CONFIG_PCIBIOS_IRQ
621         default none
622         export used
623         comment "PCIBIOS IRQ support"
624 end
625 define CONFIG_IOAPIC
626         default none
627         export used
628         comment "IOAPIC support"
629 end
630
631 ###############################################
632 # IDE specific options
633 ###############################################
634
635 define CONFIG_IDE
636         default 0
637         export always
638         comment "Define to include IDE support"
639 end
640 define IDE_BOOT_DRIVE
641         default 0
642         export always
643         comment "Disk number of boot drive"
644 end
645 define IDE_SWAB
646         default none
647         export used
648         comment "Swap bytes when reading from IDE device"
649 end
650 define IDE_OFFSET
651         default 0
652         export always
653         comment "Sector at which to start searching for boot image"
654 end
655
656 ###############################################
657 # Options for memory mapped I/O
658 ###############################################
659
660 define PCIC0_CFGADDR
661         default none
662         format "0x%x"
663         export used
664         comment "Address of PCI Configuration Address Register"
665 end
666 define PCIC0_CFGDATA
667         default none
668         format "0x%x"
669         export used
670         comment "Address of PCI Configuration Data Register"
671 end
672 define ISA_IO_BASE
673         default none
674         format "0x%x"
675         export used
676         comment "Base address of PCI/ISA I/O address range"
677 end
678 define ISA_MEM_BASE
679         default none
680         format "0x%x"
681         export used
682         comment "Base address of PCI/ISA memory address range"
683 end
684 define PNP_CFGADDR
685         default none
686         format "0x%x"
687         export used
688         comment "PNP Configuration Address Register offset"
689 end
690 define PNP_CFGDATA
691         default none
692         format "0x%x"
693         export used
694         comment "PNP Configuration Data Register offset"
695 end
696 define _IO_BASE
697         default none
698         format "0x%x"
699         export used
700         comment "Base address of memory mapped I/O operations"
701 end
702
703 ###############################################
704 # Options for embedded systems
705 ###############################################
706
707 define EMBEDDED_RAM_SIZE
708         default none
709         export used
710         comment "Embedded boards generally have fixed RAM size"
711 end
712
713 ###############################################
714 # Misc options
715 ###############################################
716
717 define CONFIG_CHIP_NAME
718         default 0
719         export always
720         comment "Compile in the chip name"
721 end
722
723 define CONFIG_GDB_STUB
724         default 0
725         export used
726         comment "Compile in gdb stub support?"
727 end
728
729 define HAVE_INIT_TIMER
730         default 0
731         export always
732         comment "Have a init_timer function"
733 end
734 define HAVE_HARD_RESET
735         default none
736         export used
737         comment "Have hard reset"
738 end
739 define MEMORY_HOLE
740         default none
741         export used
742         comment "Set to deal with memory hole"
743 end
744 define MAX_REBOOT_CNT
745         default 3
746         export always
747         comment "Set maximum reboots"
748 end
749
750 ###############################################
751 # Misc device options
752 ###############################################
753
754 define CONFIG_TSC_X86RDTSC_CALIBRATE_WITH_TIMER2
755         default 0
756         export used
757         comment "Use timer2 to callibrate the x86 time stamp counter"
758 end
759 define INTEL_PPRO_MTRR
760         default none
761         export used
762         comment ""
763 end
764 define CONFIG_UDELAY_TSC
765         default 0
766         export used
767         comment "Implement udelay with the x86 time stamp counter"
768 end
769 define FAKE_SPDROM
770         default 0
771         export always
772         comment "Use this to fake spd rom values"
773 end
774
775 define HAVE_ACPI_TABLES
776         default 0
777         export always
778         comment "Define to build ACPI tables"
779 end
780
781 define AGP_APERTURE_SIZE
782         default none
783         export used
784         format "0x%x"
785         comment "AGP graphics virtual memory aperture size"
786 end
787
788 define CK804_DEVN_BASE
789         default 1
790         export always
791         comment "CK804 device count from 0 or 1"
792 end
793
794 define K8_E0_MEM_HOLE_SIZEK
795         default 0
796         export always
797         comment "Opteron E0 later memory hole size in K"
798 end
799
800 define CONFIG_PCI_ROM_RUN
801         default 0
802         export always
803         comment "Init PCI device option rom"
804 end
805
806
807 ###############################################
808 # Board specific options
809 ###############################################
810
811 ###############################################
812 # Options for motorola/sandpoint
813 ###############################################
814 define CONFIG_SANDPOINT_ALTIMUS
815         default 0
816         export never
817         comment "Configure Sandpoint with Altimus PMC"
818 end
819 define CONFIG_SANDPOINT_TALUS
820         default 0
821         export never
822         comment "Configure Sandpoint with Talus PMC"
823 end
824 define CONFIG_SANDPOINT_UNITY
825         default 0
826         export never
827         comment "Configure Sandpoint with Unity PMC"
828 end
829 define CONFIG_SANDPOINT_VALIS
830         default 0
831         export never
832         comment "Configure Sandpoint with Valis PMC"
833 end
834 define CONFIG_SANDPOINT_GYRUS
835         default 0
836         export never
837         comment "Configure Sandpoint with Gyrus PMC"
838 end
839
840 ###############################################
841 # Options for totalimpact/briq
842 ###############################################
843 define CONFIG_BRIQ_750FX
844         default 0
845         export never
846         comment "Configure briQ with PowerPC 750FX"
847 end
848 define CONFIG_BRIQ_7400
849         default 0
850         export never
851         comment "Configure briQ with PowerPC G4"
852 end