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