additions and mods for lzma.
[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 "2.0.0"
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 and is assumed to be NRV2B (deprecated)" 
576 end
577 define CONFIG_COMPRESSED_ROM_STREAM_NRV2B
578         default 0
579         export always
580         comment "NRV2B compressed boot image is located in ROM" 
581 end
582 define CONFIG_COMPRESSED_ROM_STREAM_LZMA
583         default 0
584         export always
585         comment "LZMA compressed boot image is located in ROM" 
586 end
587 define CONFIG_PRECOMPRESSED_ROM_STREAM
588         default 0
589         export always
590         comment "boot image is already compressed" 
591 end
592 define CONFIG_FS_STREAM
593         default 0
594         export always
595         comment "Boot from a filesystem"
596 end
597 define CONFIG_FS_EXT2
598         default 0
599         export always
600         comment "Enable ext2 filesystem support"
601 end
602 define CONFIG_FS_ISO9660
603         default 0
604         export always
605         comment "Enable ISO9660 filesystem support"
606 end
607 define CONFIG_FS_FAT
608         default 0
609         export always
610         comment "Enable FAT filesystem support"
611 end
612 define AUTOBOOT_DELAY
613         default 2
614         export always
615         comment "Delay (in seconds) before autobooting"
616 end
617 define AUTOBOOT_CMDLINE
618         default "hdc1:/vmlinuz root=/dev/hdc3 console=tty0 console=ttyS0,115200"
619         export always
620         format "\"%s\""
621         comment "Default command line when autobooting"
622 end
623
624 define USE_WATCHDOG_ON_BOOT
625         default 0
626         export always
627         comment "Use the watchdog on booting"
628 end
629
630 ###############################################
631 # Plugin Device support options
632 ###############################################
633
634 define CONFIG_HYPERTRANSPORT_PLUGIN_SUPPORT
635         default 1
636         export always
637         comment "Enable support for plugin Hypertransport busses"
638 end
639 define CONFIG_AGP_PLUGIN_SUPPORT
640         default 1
641         export always
642         comment "Enable support for plugin AGP busses"
643 end
644 define CONFIG_CARDBUS_PLUGIN_SUPPORT
645         default 1
646         export always
647         comment "Enable support cardbus plugin cards"
648 end
649 define CONFIG_PCIX_PLUGIN_SUPPORT
650         default 1
651         export always
652         comment "Enable support for plugin PCI-X busses"
653 end
654 define CONFIG_PCIEXP_PLUGIN_SUPPORT
655         default 1
656         export always
657         comment "Enable support for plugin PCI-E busses"
658 end
659
660 ###############################################
661 # IRQ options
662 ###############################################
663
664 define HAVE_PIRQ_TABLE
665         default none
666         export used
667         comment "Define if we have a PIRQ table"
668 end
669 define IRQ_SLOT_COUNT
670         default none
671         export used
672         comment "Number of IRQ slots"
673 end
674 define CONFIG_PCIBIOS_IRQ
675         default none
676         export used
677         comment "PCIBIOS IRQ support"
678 end
679 define CONFIG_IOAPIC
680         default none
681         export used
682         comment "IOAPIC support"
683 end
684
685 ###############################################
686 # IDE specific options
687 ###############################################
688
689 define CONFIG_IDE
690         default 0
691         export always
692         comment "Define to include IDE support"
693 end
694 define IDE_BOOT_DRIVE
695         default 0
696         export always
697         comment "Disk number of boot drive"
698 end
699 define IDE_SWAB
700         default none
701         export used
702         comment "Swap bytes when reading from IDE device"
703 end
704 define IDE_OFFSET
705         default 0
706         export always
707         comment "Sector at which to start searching for boot image"
708 end
709
710 ###############################################
711 # Options for memory mapped I/O
712 ###############################################
713
714 define PCIC0_CFGADDR
715         default none
716         format "0x%x"
717         export used
718         comment "Address of PCI Configuration Address Register"
719 end
720 define PCIC0_CFGDATA
721         default none
722         format "0x%x"
723         export used
724         comment "Address of PCI Configuration Data Register"
725 end
726 define ISA_IO_BASE
727         default none
728         format "0x%x"
729         export used
730         comment "Base address of PCI/ISA I/O address range"
731 end
732 define ISA_MEM_BASE
733         default none
734         format "0x%x"
735         export used
736         comment "Base address of PCI/ISA memory address range"
737 end
738 define PNP_CFGADDR
739         default none
740         format "0x%x"
741         export used
742         comment "PNP Configuration Address Register offset"
743 end
744 define PNP_CFGDATA
745         default none
746         format "0x%x"
747         export used
748         comment "PNP Configuration Data Register offset"
749 end
750 define _IO_BASE
751         default none
752         format "0x%x"
753         export used
754         comment "Base address of memory mapped I/O operations"
755 end
756
757 ###############################################
758 # Options for embedded systems
759 ###############################################
760
761 define EMBEDDED_RAM_SIZE
762         default none
763         export used
764         comment "Embedded boards generally have fixed RAM size"
765 end
766
767 ###############################################
768 # Misc options
769 ###############################################
770
771 define CONFIG_CHIP_NAME
772         default 0
773         export always
774         comment "Compile in the chip name"
775 end
776
777 define CONFIG_GDB_STUB
778         default 0
779         export used
780         comment "Compile in gdb stub support?"
781 end
782
783 define HAVE_INIT_TIMER
784         default 0
785         export always
786         comment "Have a init_timer function"
787 end
788 define HAVE_HARD_RESET
789         default none
790         export used
791         comment "Have hard reset"
792 end
793 define MEMORY_HOLE
794         default none
795         export used
796         comment "Set to deal with memory hole"
797 end
798 define MAX_REBOOT_CNT
799         default 3
800         export always
801         comment "Set maximum reboots"
802 end
803
804 ###############################################
805 # Misc device options
806 ###############################################
807
808 define CONFIG_TSC_X86RDTSC_CALIBRATE_WITH_TIMER2
809         default 0
810         export used
811         comment "Use timer2 to callibrate the x86 time stamp counter"
812 end
813 define INTEL_PPRO_MTRR
814         default none
815         export used
816         comment ""
817 end
818 define CONFIG_UDELAY_TSC
819         default 0
820         export used
821         comment "Implement udelay with the x86 time stamp counter"
822 end
823 define CONFIG_UDELAY_IO
824         default 0
825         export used
826         comment "Implement udelay with x86 io registers"
827 end
828 define FAKE_SPDROM
829         default 0
830         export always
831         comment "Use this to fake spd rom values"
832 end
833
834 define HAVE_ACPI_TABLES
835         default 0
836         export always
837         comment "Define to build ACPI tables"
838 end
839
840 define ACPI_SSDTX_NUM
841         default 0
842         export always
843         comment "extra ssdt num for PCI Device"
844 end
845
846 define AGP_APERTURE_SIZE
847         default none
848         export used
849         format "0x%x"
850         comment "AGP graphics virtual memory aperture size"
851 end
852
853 define HT_CHAIN_UNITID_BASE
854         default 1
855         export always
856         comment "first hypertransport device's unitid base. if southbridge ht chain only has one ht device, it could be 0"
857 end
858
859 define HT_CHAIN_END_UNITID_BASE
860         default 0x20
861         export always
862         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"
863 end
864
865 define SB_HT_CHAIN_UNITID_OFFSET_ONLY
866         default 1
867         export always
868         comment "this will decided if only offset SB hypertransport chain"
869 end
870
871 define K8_SB_HT_CHAIN_ON_BUS0
872         default 0 
873         export always
874         comment "this will make SB hypertransport chain sit on bus 0, if it is 2 will put other chain on 0x40, 0x80, 0xc0"
875 end
876
877 define K8_HW_MEM_HOLE_SIZEK
878         default 0
879         export always
880         comment "Opteron E0 later memory hole size in K, 0 mean disable"
881 end
882
883 define K8_HW_MEM_HOLE_SIZE_AUTO_INC
884         default 0
885         export always
886         comment "Opteron E0 later memory hole size auto increase to avoid hole startk equal to basek"
887 end
888
889 define K8_HT_FREQ_1G_SUPPORT
890         default 0
891         export always
892         comment "Optern E0 later could support 1G HT, but still depends MB design"
893 end
894
895 define CONFIG_PCI_ROM_RUN
896         default 0
897         export always
898         comment "Init PCI device option rom"
899 end
900
901 define CONFIG_PCI_64BIT_PREF_MEM
902         default 0
903         export always
904         comment "allow PCI device get 4G above Region as pref mem"
905 end
906
907
908 ###############################################
909 # Board specific options
910 ###############################################
911
912 ###############################################
913 # Options for motorola/sandpoint
914 ###############################################
915 define CONFIG_SANDPOINT_ALTIMUS
916         default 0
917         export never
918         comment "Configure Sandpoint with Altimus PMC"
919 end
920 define CONFIG_SANDPOINT_TALUS
921         default 0
922         export never
923         comment "Configure Sandpoint with Talus PMC"
924 end
925 define CONFIG_SANDPOINT_UNITY
926         default 0
927         export never
928         comment "Configure Sandpoint with Unity PMC"
929 end
930 define CONFIG_SANDPOINT_VALIS
931         default 0
932         export never
933         comment "Configure Sandpoint with Valis PMC"
934 end
935 define CONFIG_SANDPOINT_GYRUS
936         default 0
937         export never
938         comment "Configure Sandpoint with Gyrus PMC"
939 end
940
941 ###############################################
942 # Options for totalimpact/briq
943 ###############################################
944 define CONFIG_BRIQ_750FX
945         default 0
946         export never
947         comment "Configure briQ with PowerPC 750FX"
948 end
949 define CONFIG_BRIQ_7400
950         default 0
951         export never
952         comment "Configure briQ with PowerPC G4"
953 end