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