add option to decide to use onboard vga or addon card.
[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 0x1000
284         format "0x%x"
285         export always
286         comment "Size of data cache when using it for temporary RAM"
287 end
288 define DCACHE_RAM_GLOBAL_VAR_SIZE
289         default 0
290         format "0x%x"
291         export always
292         comment "Size of region that for global variable of cache as ram stage"
293 end
294 define XIP_ROM_BASE
295         default 0
296         format "0x%x"
297         export used
298         comment "Start address of area to cache during LinuxBIOS execution directly from ROM"
299 end
300 define XIP_ROM_SIZE
301         default 0
302         format "0x%x"
303         export used
304         comment "Size of area to cache during LinuxBIOS execution directly from ROM"
305 end
306 define CONFIG_COMPRESS
307         default 1
308         export always
309         comment "Set for compressed image"
310 end
311 define CONFIG_UNCOMPRESSED
312         format "%d"
313         default {!CONFIG_COMPRESS}
314         export always
315         comment "Set for uncompressed image"
316 end
317 define CONFIG_LB_MEM_TOPK
318         format "%d"
319         default 2048
320         export always
321         comment "Kilobytes of memory to initialized before executing code from RAM"
322 end
323 define HAVE_OPTION_TABLE
324         default 0
325         export always
326         comment "Export CMOS option table"
327 end
328 define USE_OPTION_TABLE
329         format "%d"
330         default {HAVE_OPTION_TABLE && !USE_FALLBACK_IMAGE}
331         export always
332         comment "Use option table"
333 end
334
335 ###############################################
336 # CMOS variable options
337 ###############################################
338 define LB_CKS_RANGE_START
339         default 49
340         format "%d"
341         export always
342         comment "First CMOS byte to use for LinuxBIOS options"
343 end
344 define LB_CKS_RANGE_END
345         default 125
346         format "%d"
347         export always
348         comment "Last CMOS byte to use for LinuxBIOS options"
349 end
350 define LB_CKS_LOC
351         default 126
352         format "%d"
353         export always
354         comment "Pair of bytes to use for CMOS checksum"
355 end
356
357
358 ###############################################
359 # Build targets
360 ###############################################
361
362 define CRT0
363         default "$(TOP)/src/arch/$(ARCH)/init/crt0.S.lb"
364         export always
365         comment "Main initialization target"
366 end
367
368 ###############################################
369 # Debugging/Logging options
370 ###############################################
371
372 define DEBUG
373         default 1
374         export always
375         comment "Enable debugging code"
376 end
377 define CONFIG_CONSOLE_VGA
378         default 0
379         export always
380         comment "Log messages to VGA"
381 end
382 define CONFIG_CONSOLE_VGA_MULTI
383         default 0
384         export always
385         comment "Multi VGA console"
386 end
387 define CONFIG_CONSOLE_VGA_ONBOARD_AT_FIRST
388         default 0
389         export always
390         comment "Use onboard VGA instead of add on VGA card"
391 end
392 define CONFIG_CONSOLE_BTEXT
393         default 0
394         export always
395         comment "Log messages to btext fb console"
396 end
397 define CONFIG_CONSOLE_LOGBUF
398         default 0
399         export always
400         comment "Log messages to buffer"
401 end
402 define CONFIG_CONSOLE_SROM
403         default 0
404         export always
405         comment "Log messages to SROM console"
406 end
407 define CONFIG_CONSOLE_SERIAL8250
408         default 0
409         export always
410         comment "Log messages to 8250 uart based serial console"
411 end
412 define DEFAULT_CONSOLE_LOGLEVEL
413         default 7
414         export always
415         comment "Console will log at this level unless changed"
416 end
417 define MAXIMUM_CONSOLE_LOGLEVEL
418         default 8
419         export always
420         comment "Error messages up to this level can be printed"
421 end
422 define CONFIG_SERIAL_POST
423         default 0
424         export always
425         comment "Enable SERIAL POST codes"
426 end
427 define NO_POST
428         default none
429         export used
430         comment "Disable POST codes"
431 end
432 define TTYS0_BASE
433         default 0x3f8
434         format "0x%x"
435         export always
436         comment "Base address for 8250 uart for the serial console"
437 end
438 define TTYS0_BAUD
439         default 115200
440         export always
441         comment "Default baud rate for serial console"
442 end
443 define TTYS0_DIV
444         default none
445         format "%d"
446         export used
447         comment "Allow UART divisor to be set explicitly"
448 end
449 define TTYS0_LCS
450         default 0x3
451         format "0x%x"
452         export always
453         comment "Default flow control settings for the 8250 serial console uart"
454 end
455         
456 ###############################################
457 # Mainboard options
458 ###############################################
459
460 define MAINBOARD
461         default "Mainboard_not_set"
462         export always
463         comment "Mainboard name"
464 end
465 define MAINBOARD_PART_NUMBER
466         default "Part_number_not_set"
467         export always
468         format "\"%s\""
469         comment "Part number of mainboard"
470 end
471 define MAINBOARD_VENDOR
472         default "Vendor_not_set"
473         export always
474         format "\"%s\""
475         comment "Vendor of mainboard"
476 end
477 define MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID
478         default 0
479         export always
480         comment "PCI Vendor ID of mainboard manufacturer"
481 end
482 define MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID
483         default 0
484         format "0x%x"
485         export always
486         comment "PCI susbsystem device id assigned my mainboard manufacturer"
487 end
488 define MAINBOARD_POWER_ON_AFTER_POWER_FAIL
489         default none
490         export used
491         comment "Default power on after power fail setting"
492 end
493 define CONFIG_SYS_CLK_FREQ
494         default none
495         export used
496         comment "System clock frequency in MHz"
497 end
498 define CONFIG_MAX_PCI_BUSES
499         default 255
500         export always
501         comment "Maximum number of PCI buses to search for devices"
502 end
503 ###############################################
504 # SMP options
505 ###############################################
506
507 define CONFIG_SMP
508         default 0
509         export always
510         comment "Define if we support SMP"
511 end
512 define CONFIG_MAX_CPUS
513         default 1
514         export always
515         comment "Maximum CPU count for this machine"
516 end
517 define CONFIG_MAX_PHYSICAL_CPUS
518         default 1
519         export always
520         comment "Maximum physical CPU count for this machine"
521 end
522 define CONFIG_LOGICAL_CPUS
523         default 0
524         export always
525         comment "Should multiple cpus per die be enabled?"
526 end
527 define HAVE_MP_TABLE
528         default none
529         export used
530         comment "Define to build an MP table"
531 end
532 define SERIAL_CPU_INIT
533         default 1
534         export always
535         comment "Serialize CPU init"
536 end
537 define APIC_ID_OFFSET
538         default 0
539         export always
540         comment "We need to share this value between cache_as_ram_auto.c and northbridge.c"
541 end
542 define ENABLE_APIC_EXT_ID
543         default 0
544         export always
545         comment "Enable APIC ext id mode 8 bit"
546 end
547 define LIFT_BSP_APIC_ID
548         default 0
549         export always
550         comment "decide if we lift bsp apic id while ap apic id"
551 end
552 ###############################################
553 # Boot options
554 ###############################################
555
556 define CONFIG_IDE_STREAM
557         default 0
558         export always
559         comment "Boot from IDE device"
560 end
561 define CONFIG_ROM_STREAM
562         default 0
563         export always
564         comment "Boot image is located in ROM" 
565 end
566 define CONFIG_ROM_STREAM_START
567         default {0xffffffff - ROM_SIZE + ROM_SECTION_OFFSET + 1}
568         format "0x%x"
569         export always
570         comment "ROM stream start location"
571 end
572 define CONFIG_COMPRESSED_ROM_STREAM
573         default 0
574         export always
575         comment "compressed boot image is located in ROM" 
576 end
577 define CONFIG_FS_STREAM
578         default 0
579         export always
580         comment "Boot from a filesystem"
581 end
582 define CONFIG_FS_EXT2
583         default 0
584         export always
585         comment "Enable ext2 filesystem support"
586 end
587 define CONFIG_FS_ISO9660
588         default 0
589         export always
590         comment "Enable ISO9660 filesystem support"
591 end
592 define CONFIG_FS_FAT
593         default 0
594         export always
595         comment "Enable FAT filesystem support"
596 end
597 define AUTOBOOT_DELAY
598         default 2
599         export always
600         comment "Delay (in seconds) before autobooting"
601 end
602 define AUTOBOOT_CMDLINE
603         default "hdc1:/vmlinuz root=/dev/hdc3 console=tty0 console=ttyS0,115200"
604         export always
605         format "\"%s\""
606         comment "Default command line when autobooting"
607 end
608
609 define USE_WATCHDOG_ON_BOOT
610         default 0
611         export always
612         comment "Use the watchdog on booting"
613 end
614
615 ###############################################
616 # Plugin Device support options
617 ###############################################
618
619 define CONFIG_HYPERTRANSPORT_PLUGIN_SUPPORT
620         default 1
621         export always
622         comment "Enable support for plugin Hypertransport busses"
623 end
624 define CONFIG_AGP_PLUGIN_SUPPORT
625         default 1
626         export always
627         comment "Enable support for plugin AGP busses"
628 end
629 define CONFIG_CARDBUS_PLUGIN_SUPPORT
630         default 1
631         export always
632         comment "Enable support cardbus plugin cards"
633 end
634 define CONFIG_PCIX_PLUGIN_SUPPORT
635         default 1
636         export always
637         comment "Enable support for plugin PCI-X busses"
638 end
639 define CONFIG_PCIEXP_PLUGIN_SUPPORT
640         default 1
641         export always
642         comment "Enable support for plugin PCI-E busses"
643 end
644
645 ###############################################
646 # IRQ options
647 ###############################################
648
649 define HAVE_PIRQ_TABLE
650         default none
651         export used
652         comment "Define if we have a PIRQ table"
653 end
654 define IRQ_SLOT_COUNT
655         default none
656         export used
657         comment "Number of IRQ slots"
658 end
659 define CONFIG_PCIBIOS_IRQ
660         default none
661         export used
662         comment "PCIBIOS IRQ support"
663 end
664 define CONFIG_IOAPIC
665         default none
666         export used
667         comment "IOAPIC support"
668 end
669
670 ###############################################
671 # IDE specific options
672 ###############################################
673
674 define CONFIG_IDE
675         default 0
676         export always
677         comment "Define to include IDE support"
678 end
679 define IDE_BOOT_DRIVE
680         default 0
681         export always
682         comment "Disk number of boot drive"
683 end
684 define IDE_SWAB
685         default none
686         export used
687         comment "Swap bytes when reading from IDE device"
688 end
689 define IDE_OFFSET
690         default 0
691         export always
692         comment "Sector at which to start searching for boot image"
693 end
694
695 ###############################################
696 # Options for memory mapped I/O
697 ###############################################
698
699 define PCIC0_CFGADDR
700         default none
701         format "0x%x"
702         export used
703         comment "Address of PCI Configuration Address Register"
704 end
705 define PCIC0_CFGDATA
706         default none
707         format "0x%x"
708         export used
709         comment "Address of PCI Configuration Data Register"
710 end
711 define ISA_IO_BASE
712         default none
713         format "0x%x"
714         export used
715         comment "Base address of PCI/ISA I/O address range"
716 end
717 define ISA_MEM_BASE
718         default none
719         format "0x%x"
720         export used
721         comment "Base address of PCI/ISA memory address range"
722 end
723 define PNP_CFGADDR
724         default none
725         format "0x%x"
726         export used
727         comment "PNP Configuration Address Register offset"
728 end
729 define PNP_CFGDATA
730         default none
731         format "0x%x"
732         export used
733         comment "PNP Configuration Data Register offset"
734 end
735 define _IO_BASE
736         default none
737         format "0x%x"
738         export used
739         comment "Base address of memory mapped I/O operations"
740 end
741
742 ###############################################
743 # Options for embedded systems
744 ###############################################
745
746 define EMBEDDED_RAM_SIZE
747         default none
748         export used
749         comment "Embedded boards generally have fixed RAM size"
750 end
751
752 ###############################################
753 # Misc options
754 ###############################################
755
756 define CONFIG_CHIP_NAME
757         default 0
758         export always
759         comment "Compile in the chip name"
760 end
761
762 define CONFIG_GDB_STUB
763         default 0
764         export used
765         comment "Compile in gdb stub support?"
766 end
767
768 define HAVE_INIT_TIMER
769         default 0
770         export always
771         comment "Have a init_timer function"
772 end
773 define HAVE_HARD_RESET
774         default none
775         export used
776         comment "Have hard reset"
777 end
778 define MEMORY_HOLE
779         default none
780         export used
781         comment "Set to deal with memory hole"
782 end
783 define MAX_REBOOT_CNT
784         default 3
785         export always
786         comment "Set maximum reboots"
787 end
788
789 ###############################################
790 # Misc device options
791 ###############################################
792
793 define CONFIG_TSC_X86RDTSC_CALIBRATE_WITH_TIMER2
794         default 0
795         export used
796         comment "Use timer2 to callibrate the x86 time stamp counter"
797 end
798 define INTEL_PPRO_MTRR
799         default none
800         export used
801         comment ""
802 end
803 define CONFIG_UDELAY_TSC
804         default 0
805         export used
806         comment "Implement udelay with the x86 time stamp counter"
807 end
808 define CONFIG_UDELAY_IO
809         default 0
810         export used
811         comment "Implement udelay with x86 io registers"
812 end
813 define FAKE_SPDROM
814         default 0
815         export always
816         comment "Use this to fake spd rom values"
817 end
818
819 define HAVE_ACPI_TABLES
820         default 0
821         export always
822         comment "Define to build ACPI tables"
823 end
824
825 define ACPI_SSDTX_NUM
826         default 0
827         export always
828         comment "extra ssdt num for PCI Device"
829 end
830
831 define AGP_APERTURE_SIZE
832         default none
833         export used
834         format "0x%x"
835         comment "AGP graphics virtual memory aperture size"
836 end
837
838 define HT_CHAIN_UNITID_BASE
839         default 1
840         export always
841         comment "first hypertransport device's unitid base. if southbridge ht chain only has one ht device, it could be 0"
842 end
843
844 define HT_CHAIN_END_UNITID_BASE
845         default 0x20
846         export always
847         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"
848 end
849
850 define SB_HT_CHAIN_UNITID_OFFSET_ONLY
851         default 1
852         export always
853         comment "this will decided if only offset SB hypertransport chain"
854 end
855
856 define K8_SB_HT_CHAIN_ON_BUS0
857         default 0 
858         export always
859         comment "this will make SB hypertransport chain sit on bus 0, if it is 2 will put other chain on 0x40, 0x80, 0xc0"
860 end
861
862 define K8_HW_MEM_HOLE_SIZEK
863         default 0
864         export always
865         comment "Opteron E0 later memory hole size in K, 0 mean disable"
866 end
867
868 define K8_HW_MEM_HOLE_SIZE_AUTO_INC
869         default 0
870         export always
871         comment "Opteron E0 later memory hole size auto increase to avoid hole startk equal to basek"
872 end
873
874 define K8_HT_FREQ_1G_SUPPORT
875         default 0
876         export always
877         comment "Optern E0 later could support 1G HT, but still depends MB design"
878 end
879
880 define CONFIG_PCI_ROM_RUN
881         default 0
882         export always
883         comment "Init PCI device option rom"
884 end
885
886 define CONFIG_PCI_64BIT_PREF_MEM
887         default 0
888         export always
889         comment "allow PCI device get 4G above Region as pref mem"
890 end
891
892
893 ###############################################
894 # Board specific options
895 ###############################################
896
897 ###############################################
898 # Options for motorola/sandpoint
899 ###############################################
900 define CONFIG_SANDPOINT_ALTIMUS
901         default 0
902         export never
903         comment "Configure Sandpoint with Altimus PMC"
904 end
905 define CONFIG_SANDPOINT_TALUS
906         default 0
907         export never
908         comment "Configure Sandpoint with Talus PMC"
909 end
910 define CONFIG_SANDPOINT_UNITY
911         default 0
912         export never
913         comment "Configure Sandpoint with Unity PMC"
914 end
915 define CONFIG_SANDPOINT_VALIS
916         default 0
917         export never
918         comment "Configure Sandpoint with Valis PMC"
919 end
920 define CONFIG_SANDPOINT_GYRUS
921         default 0
922         export never
923         comment "Configure Sandpoint with Gyrus PMC"
924 end
925
926 ###############################################
927 # Options for totalimpact/briq
928 ###############################################
929 define CONFIG_BRIQ_750FX
930         default 0
931         export never
932         comment "Configure briQ with PowerPC 750FX"
933 end
934 define CONFIG_BRIQ_7400
935         default 0
936         export never
937         comment "Configure briQ with PowerPC G4"
938 end