gcc 4.1 fixes.
[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,--version 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 "Default fallback image size"
192 end
193 define ROM_SIZE
194         default none
195         format "0x%x"
196         export used
197         comment "Size of your ROM"
198 end
199 define ROM_IMAGE_SIZE
200         default 65535
201         format "0x%x"
202         export always
203         comment "Default image size"
204 end
205 define ROM_SECTION_SIZE
206         default {FALLBACK_SIZE}
207         format "0x%x"
208         export used
209         comment "Default rom section size"
210 end
211 define ROM_SECTION_OFFSET
212         default {ROM_SIZE - FALLBACK_SIZE}
213         format "0x%x"
214         export used
215         comment "Default rom section offset"
216 end
217 define PAYLOAD_SIZE
218         default {ROM_SECTION_SIZE - ROM_IMAGE_SIZE}
219         format "0x%x"
220         export always
221         comment "Default payload size"
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_VGA_MULTI
377         default 0
378         export always
379         comment "Multi VGA console"
380 end
381 define CONFIG_CONSOLE_BTEXT
382         default 0
383         export always
384         comment "Log messages to btext fb console"
385 end
386 define CONFIG_CONSOLE_LOGBUF
387         default 0
388         export always
389         comment "Log messages to buffer"
390 end
391 define CONFIG_CONSOLE_SROM
392         default 0
393         export always
394         comment "Log messages to SROM console"
395 end
396 define CONFIG_CONSOLE_SERIAL8250
397         default 0
398         export always
399         comment "Log messages to 8250 uart based serial console"
400 end
401 define DEFAULT_CONSOLE_LOGLEVEL
402         default 7
403         export always
404         comment "Console will log at this level unless changed"
405 end
406 define MAXIMUM_CONSOLE_LOGLEVEL
407         default 8
408         export always
409         comment "Error messages up to this level can be printed"
410 end
411 define CONFIG_SERIAL_POST
412         default 0
413         export always
414         comment "Enable SERIAL POST codes"
415 end
416 define NO_POST
417         default none
418         export used
419         comment "Disable POST codes"
420 end
421 define TTYS0_BASE
422         default 0x3f8
423         format "0x%x"
424         export always
425         comment "Base address for 8250 uart for the serial console"
426 end
427 define TTYS0_BAUD
428         default 115200
429         export always
430         comment "Default baud rate for serial console"
431 end
432 define TTYS0_DIV
433         default none
434         format "%d"
435         export used
436         comment "Allow UART divisor to be set explicitly"
437 end
438 define TTYS0_LCS
439         default 0x3
440         format "0x%x"
441         export always
442         comment "Default flow control settings for the 8250 serial console uart"
443 end
444         
445 ###############################################
446 # Mainboard options
447 ###############################################
448
449 define MAINBOARD
450         default "Mainboard_not_set"
451         export always
452         comment "Mainboard name"
453 end
454 define MAINBOARD_PART_NUMBER
455         default "Part_number_not_set"
456         export always
457         format "\"%s\""
458         comment "Part number of mainboard"
459 end
460 define MAINBOARD_VENDOR
461         default "Vendor_not_set"
462         export always
463         format "\"%s\""
464         comment "Vendor of mainboard"
465 end
466 define MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID
467         default 0
468         export always
469         comment "PCI Vendor ID of mainboard manufacturer"
470 end
471 define MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID
472         default 0
473         format "0x%x"
474         export always
475         comment "PCI susbsystem device id assigned my mainboard manufacturer"
476 end
477 define MAINBOARD_POWER_ON_AFTER_POWER_FAIL
478         default none
479         export used
480         comment "Default power on after power fail setting"
481 end
482 define CONFIG_SYS_CLK_FREQ
483         default none
484         export used
485         comment "System clock frequency in MHz"
486 end
487 ###############################################
488 # SMP options
489 ###############################################
490
491 define CONFIG_SMP
492         default 0
493         export always
494         comment "Define if we support SMP"
495 end
496 define CONFIG_MAX_CPUS
497         default 1
498         export always
499         comment "Maximum CPU count for this machine"
500 end
501 define CONFIG_MAX_PHYSICAL_CPUS
502         default 1
503         export always
504         comment "Maximum physical CPU count for this machine"
505 end
506 define CONFIG_LOGICAL_CPUS
507         default 0
508         export always
509         comment "Should multiple cpus per die be enabled?"
510 end
511 define HAVE_MP_TABLE
512         default none
513         export used
514         comment "Define to build an MP table"
515 end
516 define SERIAL_CPU_INIT
517         default 1
518         export always
519         comment "Serialize CPU init"
520 end
521 define APIC_ID_OFFSET
522         default 0
523         export always
524         comment "We need to share this value between cache_as_ram_auto.c and northbridge.c"
525 end
526 define ENABLE_APIC_EXT_ID
527         default 0
528         export always
529         comment "Enable APIC ext id mode 8 bit"
530 end
531 define LIFT_BSP_APIC_ID
532         default 0
533         export always
534         comment "decide if we lift bsp apic id while ap apic id"
535 end
536 ###############################################
537 # Boot options
538 ###############################################
539
540 define CONFIG_IDE_STREAM
541         default 0
542         export always
543         comment "Boot from IDE device"
544 end
545 define CONFIG_ROM_STREAM
546         default 0
547         export always
548         comment "Boot image is located in ROM" 
549 end
550 define CONFIG_ROM_STREAM_START
551         default {0xffffffff - ROM_SIZE + ROM_SECTION_OFFSET + 1}
552         format "0x%x"
553         export always
554         comment "ROM stream start location"
555 end
556 define CONFIG_FS_STREAM
557         default 0
558         export always
559         comment "Boot from a filesystem"
560 end
561 define CONFIG_FS_EXT2
562         default 0
563         export always
564         comment "Enable ext2 filesystem support"
565 end
566 define CONFIG_FS_ISO9660
567         default 0
568         export always
569         comment "Enable ISO9660 filesystem support"
570 end
571 define CONFIG_FS_FAT
572         default 0
573         export always
574         comment "Enable FAT filesystem support"
575 end
576 define AUTOBOOT_DELAY
577         default 2
578         export always
579         comment "Delay (in seconds) before autobooting"
580 end
581 define AUTOBOOT_CMDLINE
582         default "hdc1:/vmlinuz root=/dev/hdc3 console=tty0 console=ttyS0,115200"
583         export always
584         format "\"%s\""
585         comment "Default command line when autobooting"
586 end
587
588 define USE_WATCHDOG_ON_BOOT
589         default 0
590         export always
591         comment "Use the watchdog on booting"
592 end
593
594 ###############################################
595 # Plugin Device support options
596 ###############################################
597
598 define CONFIG_HYPERTRANSPORT_PLUGIN_SUPPORT
599         default 1
600         export always
601         comment "Enable support for plugin Hypertransport busses"
602 end
603 define CONFIG_AGP_PLUGIN_SUPPORT
604         default 1
605         export always
606         comment "Enable support for plugin AGP busses"
607 end
608 define CONFIG_CARDBUS_PLUGIN_SUPPORT
609         default 1
610         export always
611         comment "Enable support cardbus plugin cards"
612 end
613 define CONFIG_PCIX_PLUGIN_SUPPORT
614         default 1
615         export always
616         comment "Enable support for plugin PCI-X busses"
617 end
618 define CONFIG_PCIEXP_PLUGIN_SUPPORT
619         default 1
620         export always
621         comment "Enable support for plugin PCI-E busses"
622 end
623
624 ###############################################
625 # IRQ options
626 ###############################################
627
628 define HAVE_PIRQ_TABLE
629         default none
630         export used
631         comment "Define if we have a PIRQ table"
632 end
633 define IRQ_SLOT_COUNT
634         default none
635         export used
636         comment "Number of IRQ slots"
637 end
638 define CONFIG_PCIBIOS_IRQ
639         default none
640         export used
641         comment "PCIBIOS IRQ support"
642 end
643 define CONFIG_IOAPIC
644         default none
645         export used
646         comment "IOAPIC support"
647 end
648
649 ###############################################
650 # IDE specific options
651 ###############################################
652
653 define CONFIG_IDE
654         default 0
655         export always
656         comment "Define to include IDE support"
657 end
658 define IDE_BOOT_DRIVE
659         default 0
660         export always
661         comment "Disk number of boot drive"
662 end
663 define IDE_SWAB
664         default none
665         export used
666         comment "Swap bytes when reading from IDE device"
667 end
668 define IDE_OFFSET
669         default 0
670         export always
671         comment "Sector at which to start searching for boot image"
672 end
673
674 ###############################################
675 # Options for memory mapped I/O
676 ###############################################
677
678 define PCIC0_CFGADDR
679         default none
680         format "0x%x"
681         export used
682         comment "Address of PCI Configuration Address Register"
683 end
684 define PCIC0_CFGDATA
685         default none
686         format "0x%x"
687         export used
688         comment "Address of PCI Configuration Data Register"
689 end
690 define ISA_IO_BASE
691         default none
692         format "0x%x"
693         export used
694         comment "Base address of PCI/ISA I/O address range"
695 end
696 define ISA_MEM_BASE
697         default none
698         format "0x%x"
699         export used
700         comment "Base address of PCI/ISA memory address range"
701 end
702 define PNP_CFGADDR
703         default none
704         format "0x%x"
705         export used
706         comment "PNP Configuration Address Register offset"
707 end
708 define PNP_CFGDATA
709         default none
710         format "0x%x"
711         export used
712         comment "PNP Configuration Data Register offset"
713 end
714 define _IO_BASE
715         default none
716         format "0x%x"
717         export used
718         comment "Base address of memory mapped I/O operations"
719 end
720
721 ###############################################
722 # Options for embedded systems
723 ###############################################
724
725 define EMBEDDED_RAM_SIZE
726         default none
727         export used
728         comment "Embedded boards generally have fixed RAM size"
729 end
730
731 ###############################################
732 # Misc options
733 ###############################################
734
735 define CONFIG_CHIP_NAME
736         default 0
737         export always
738         comment "Compile in the chip name"
739 end
740
741 define CONFIG_GDB_STUB
742         default 0
743         export used
744         comment "Compile in gdb stub support?"
745 end
746
747 define HAVE_INIT_TIMER
748         default 0
749         export always
750         comment "Have a init_timer function"
751 end
752 define HAVE_HARD_RESET
753         default none
754         export used
755         comment "Have hard reset"
756 end
757 define MEMORY_HOLE
758         default none
759         export used
760         comment "Set to deal with memory hole"
761 end
762 define MAX_REBOOT_CNT
763         default 3
764         export always
765         comment "Set maximum reboots"
766 end
767
768 ###############################################
769 # Misc device options
770 ###############################################
771
772 define CONFIG_TSC_X86RDTSC_CALIBRATE_WITH_TIMER2
773         default 0
774         export used
775         comment "Use timer2 to callibrate the x86 time stamp counter"
776 end
777 define INTEL_PPRO_MTRR
778         default none
779         export used
780         comment ""
781 end
782 define CONFIG_UDELAY_TSC
783         default 0
784         export used
785         comment "Implement udelay with the x86 time stamp counter"
786 end
787 define CONFIG_UDELAY_IO
788         default 0
789         export used
790         comment "Implement udelay with x86 io registers"
791 end
792 define FAKE_SPDROM
793         default 0
794         export always
795         comment "Use this to fake spd rom values"
796 end
797
798 define HAVE_ACPI_TABLES
799         default 0
800         export always
801         comment "Define to build ACPI tables"
802 end
803
804 define ACPI_SSDTX_NUM
805         default 0
806         export always
807         comment "extra ssdt num for PCI Device"
808 end
809
810 define AGP_APERTURE_SIZE
811         default none
812         export used
813         format "0x%x"
814         comment "AGP graphics virtual memory aperture size"
815 end
816
817 define HT_CHAIN_UNITID_BASE
818         default 1
819         export always
820         comment "this will be first hypertransport device's unitid base, if sb ht chain only has one ht device, it could be 0"
821 end
822
823 define HT_CHAIN_END_UNITID_BASE
824         default 0x20
825         export always
826         comment "this will be unit id of the end of hypertransport chain (usually the real SB) if it is small than HT_CHAIN_UNITID_BASE, it could be 0"
827 end
828
829 define SB_HT_CHAIN_UNITID_OFFSET_ONLY
830         default 1
831         export always
832         comment "this will decided if only offset SB hypertransport chain"
833 end
834
835 define K8_SB_HT_CHAIN_ON_BUS0
836         default 0 
837         export always
838         comment "this will make SB hypertransport chain sit on bus 0, if it is 2 will put other chain on 0x40, 0x80, 0xc0"
839 end
840
841 define K8_HW_MEM_HOLE_SIZEK
842         default 0
843         export always
844         comment "Opteron E0 later memory hole size in K, 0 mean disable"
845 end
846
847 define K8_HW_MEM_HOLE_SIZE_AUTO_INC
848         default 0
849         export always
850         comment "Opteron E0 later memory hole size auto increase to avoid hole startk equal to basek"
851 end
852
853 define K8_HT_FREQ_1G_SUPPORT
854         default 0
855         export always
856         comment "Optern E0 later could support 1G HT, but still depends MB design"
857 end
858
859 define CONFIG_PCI_ROM_RUN
860         default 0
861         export always
862         comment "Init PCI device option rom"
863 end
864
865 define CONFIG_PCI_64BIT_PREF_MEM
866         default 0
867         export always
868         comment "allow PCI device get 4G above Region as pref mem"
869 end
870
871
872 ###############################################
873 # Board specific options
874 ###############################################
875
876 ###############################################
877 # Options for motorola/sandpoint
878 ###############################################
879 define CONFIG_SANDPOINT_ALTIMUS
880         default 0
881         export never
882         comment "Configure Sandpoint with Altimus PMC"
883 end
884 define CONFIG_SANDPOINT_TALUS
885         default 0
886         export never
887         comment "Configure Sandpoint with Talus PMC"
888 end
889 define CONFIG_SANDPOINT_UNITY
890         default 0
891         export never
892         comment "Configure Sandpoint with Unity PMC"
893 end
894 define CONFIG_SANDPOINT_VALIS
895         default 0
896         export never
897         comment "Configure Sandpoint with Valis PMC"
898 end
899 define CONFIG_SANDPOINT_GYRUS
900         default 0
901         export never
902         comment "Configure Sandpoint with Gyrus PMC"
903 end
904
905 ###############################################
906 # Options for totalimpact/briq
907 ###############################################
908 define CONFIG_BRIQ_750FX
909         default 0
910         export never
911         comment "Configure briQ with PowerPC 750FX"
912 end
913 define CONFIG_BRIQ_7400
914         default 0
915         export never
916         comment "Configure briQ with PowerPC G4"
917 end