ccache and scan-build actually work together, so remove the
[coreboot.git] / src / Kconfig
1 ##
2 ## This file is part of the coreboot project.
3 ##
4 ## Copyright (C) 2009-2010 coresystems GmbH
5 ##
6 ## This program is free software; you can redistribute it and/or modify
7 ## it under the terms of the GNU General Public License as published by
8 ## the Free Software Foundation; version 2 of the License.
9 ##
10 ## This program is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 ## GNU General Public License for more details.
14 ##
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program; if not, write to the Free Software
17 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
18 ##
19
20 mainmenu "Coreboot Configuration"
21
22 menu "General setup"
23
24 config EXPERT
25         bool "Expert mode"
26         help
27           This allows you to select certain advanced configuration options.
28
29           Warning: Only enable this option if you really know what you are
30           doing! You have been warned!
31
32 config LOCALVERSION
33         string "Local version string"
34         help
35           Append an extra string to the end of the coreboot version.
36
37           This can be useful if, for instance, you want to append the
38           respective board's hostname or some other identifying string to
39           the coreboot version number, so that you can easily distinguish
40           boot logs of different boards from each other.
41
42 config CBFS_PREFIX
43         string "CBFS prefix to use"
44         default "fallback"
45         help
46           Select the prefix to all files put into the image. It's "fallback"
47           by default, "normal" is a common alternative.
48
49 choice
50         prompt "Compiler"
51         default COMPILER_GCC
52         help
53           This option allows you to select the compiler used for building
54           coreboot.
55
56 config COMPILER_GCC
57         bool "GCC"
58 config COMPILER_LLVM_CLANG
59         bool "LLVM/clang"
60 endchoice
61
62 config SCANBUILD_ENABLE
63         bool "Build with scan-build for static analysis"
64         default n
65         help
66           Changes the build process to scan-build is used.
67           Requires scan-build in path.
68
69 config SCANBUILD_REPORT_LOCATION
70         string "Directory to put scan-build report in"
71         default ""
72         depends on SCANBUILD_ENABLE
73         help
74           Where the scan-build report should be stored
75
76 config CCACHE
77         bool "ccache"
78         default n
79         help
80           Enables the use of ccache for faster builds.
81           Requires ccache in path.
82
83 endmenu
84
85 source src/mainboard/Kconfig
86 source src/arch/i386/Kconfig
87
88 menu "Chipset"
89
90 comment "CPU"
91 source src/cpu/Kconfig
92 comment "Northbridge"
93
94 menu "HyperTransport setup"
95         depends on (NORTHBRIDGE_AMD_AMDK8 || NORTHBRIDGE_AMD_AMDFAM10) && EXPERT
96
97 choice
98         prompt "HyperTransport frequency"
99         default LIMIT_HT_SPEED_AUTO
100         help
101           This option sets the maximum permissible HyperTransport link
102           frequency.
103
104           Use of this option will only limit the autodetected HT frequency.
105           It will not (and cannot) increase the frequency beyond the
106           autodetected limits.
107
108           This is primarily used to work around poorly designed or laid out
109           HT traces on certain motherboards.
110
111 config LIMIT_HT_SPEED_200
112         bool "Limit HT frequency to 200MHz"
113 config LIMIT_HT_SPEED_400
114         bool "Limit HT frequency to 400MHz"
115 config LIMIT_HT_SPEED_600
116         bool "Limit HT frequency to 600MHz"
117 config LIMIT_HT_SPEED_800
118         bool "Limit HT frequency to 800MHz"
119 config LIMIT_HT_SPEED_1000
120         bool "Limit HT frequency to 1.0GHz"
121 config LIMIT_HT_SPEED_1200
122         bool "Limit HT frequency to 1.2GHz"
123 config LIMIT_HT_SPEED_1400
124         bool "Limit HT frequency to 1.4GHz"
125 config LIMIT_HT_SPEED_1600
126         bool "Limit HT frequency to 1.6GHz"
127 config LIMIT_HT_SPEED_1800
128         bool "Limit HT frequency to 1.8GHz"
129 config LIMIT_HT_SPEED_2000
130         bool "Limit HT frequency to 2.0GHz"
131 config LIMIT_HT_SPEED_2200
132         bool "Limit HT frequency to 2.2GHz"
133 config LIMIT_HT_SPEED_2400
134         bool "Limit HT frequency to 2.4GHz"
135 config LIMIT_HT_SPEED_2600
136         bool "Limit HT frequency to 2.6GHz"
137 config LIMIT_HT_SPEED_AUTO
138         bool "Autodetect HT frequency"
139 endchoice
140
141 choice
142         prompt "HyperTransport downlink width"
143         default LIMIT_HT_DOWN_WIDTH_16
144         help
145           This option sets the maximum permissible HyperTransport
146           downlink width.
147
148           Use of this option will only limit the autodetected HT width.
149           It will not (and cannot) increase the width beyond the autodetected
150           limits.
151
152           This is primarily used to work around poorly designed or laid out HT
153           traces on certain motherboards.
154
155 config LIMIT_HT_DOWN_WIDTH_8
156         bool "8 bits"
157 config LIMIT_HT_DOWN_WIDTH_16
158         bool "16 bits"
159 endchoice
160
161 choice
162         prompt "HyperTransport uplink width"
163         default LIMIT_HT_UP_WIDTH_16
164         help
165           This option sets the maximum permissible HyperTransport
166           uplink width.
167
168           Use of this option will only limit the autodetected HT width.
169           It will not (and cannot) increase the width beyond the autodetected
170           limits.
171
172           This is primarily used to work around poorly designed or laid out HT
173           traces on certain motherboards.
174
175 config LIMIT_HT_UP_WIDTH_8
176         bool "8 bits"
177 config LIMIT_HT_UP_WIDTH_16
178         bool "16 bits"
179 endchoice
180
181 endmenu
182
183 source src/northbridge/Kconfig
184 comment "Southbridge"
185 source src/southbridge/Kconfig
186 comment "Super I/O"
187 source src/superio/Kconfig
188 comment "Devices"
189 source src/devices/Kconfig
190
191 endmenu
192
193 config PCI_BUS_SEGN_BITS
194         int
195         default 0
196
197 config MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID
198         hex
199         default 0x0
200
201 config MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID
202         hex
203         default 0x0
204
205 config CPU_ADDR_BITS
206         int
207         default 36
208
209 config XIP_ROM_BASE
210         hex
211         default 0xfffe0000
212
213 config XIP_ROM_SIZE
214         hex
215         default 0x20000
216
217 config LB_CKS_RANGE_START
218         int
219         default 49
220
221 config LB_CKS_RANGE_END
222         int
223         default 125
224
225 config LB_CKS_LOC
226         int
227         default 126
228
229 config LOGICAL_CPUS
230         bool
231         default y
232
233 config PCI_ROM_RUN
234         bool
235         default n
236
237 config HEAP_SIZE
238         hex
239         default 0x4000
240
241 config DEBUG
242         bool
243         default n
244
245 config USE_PRINTK_IN_CAR
246         bool
247         default n
248
249 config USE_OPTION_TABLE
250         bool
251         default n
252
253 config MAX_CPUS
254         int
255         default 1
256
257 config MMCONF_SUPPORT_DEFAULT
258         bool
259         default n
260
261 config MMCONF_SUPPORT
262         bool
263         default n
264
265 config RAMTOP
266         hex
267         default 0x200000
268
269 config ATI_RAGE_XL
270         bool
271
272 source src/console/Kconfig
273
274 config HAVE_ACPI_RESUME
275         bool
276         default n
277
278 config ACPI_SSDTX_NUM
279         int
280         default 0
281
282 config HAVE_HARD_RESET
283         bool
284         default y if BOARD_HAS_HARD_RESET
285         default n
286         help
287           This variable specifies whether a given board has a hard_reset
288           function, no matter if it's provided by board code or chipset code.
289
290 config HAVE_INIT_TIMER
291         bool
292         default n if UDELAY_IO
293         default y
294
295 config HAVE_MAINBOARD_RESOURCES
296         bool
297         default n
298
299 config HAVE_OPTION_TABLE
300         bool
301         default y
302         help
303           This variable specifies whether a given board has a cmos.layout
304           file containing NVRAM/CMOS bit definitions.
305           It defaults to 'y' but can be changed to 'n' in mainboard/*/Kconfig.
306
307 config PIRQ_ROUTE
308         bool
309         default n
310
311 config HAVE_SMI_HANDLER
312         bool
313         default n
314
315 config PCI_IO_CFG_EXT
316         bool
317         default n
318
319 config IOAPIC
320         bool
321         default n
322
323 # TODO: Can probably be removed once all chipsets have kconfig options for it.
324 config VIDEO_MB
325         int
326         default 0
327
328 config USE_WATCHDOG_ON_BOOT
329         bool
330         default n
331
332 config VGA
333         bool
334         default n
335         help
336           Build board-specific VGA code.
337
338 config GFXUMA
339         bool
340         default n
341         help
342           Enable Unified Memory Architecture for graphics.
343
344 # TODO
345 # menu "Drivers"
346 #
347 # endmenu
348
349 #TODO Remove this option or make it useful.
350 config HAVE_LOW_TABLES
351         bool
352         default y
353         help
354           This Option is unused in the code.  Since two boards try to set it to
355           'n', they may be broken.  We either need to make the option useful or
356           get rid of it.  The broken boards are:
357           asus/m2v-mx_se
358           supermicro/h8dme
359
360 config HAVE_HIGH_TABLES
361         bool
362         default y
363         help
364           This variable specifies whether a given northbridge has high table
365           support.
366           It is set in northbridge/*/Kconfig.
367           Whether or not the high tables are actually written by coreboot is
368           configurable by the user via WRITE_HIGH_TABLES.
369
370 config HAVE_ACPI_TABLES
371         bool
372         help
373           This variable specifies whether a given board has ACPI table support.
374           It is usually set in mainboard/*/Kconfig.
375           Whether or not the ACPI tables are actually generated by coreboot
376           is configurable by the user via GENERATE_ACPI_TABLES.
377
378 config HAVE_MP_TABLE
379         bool
380         help
381           This variable specifies whether a given board has MP table support.
382           It is usually set in mainboard/*/Kconfig.
383           Whether or not the MP table is actually generated by coreboot
384           is configurable by the user via GENERATE_MP_TABLE.
385
386 config HAVE_PIRQ_TABLE
387         bool
388         help
389           This variable specifies whether a given board has PIRQ table support.
390           It is usually set in mainboard/*/Kconfig.
391           Whether or not the PIRQ table is actually generated by coreboot
392           is configurable by the user via GENERATE_PIRQ_TABLE.
393
394 #These Options are here to avoid "undefined" warnings.
395 #The actual selection and help texts are in the following menu.
396
397 config GENERATE_ACPI_TABLES
398         bool
399         default HAVE_ACPI_TABLES
400
401 config GENERATE_MP_TABLE
402         bool
403         default HAVE_MP_TABLE
404
405 config GENERATE_PIRQ_TABLE
406         bool
407         default HAVE_PIRQ_TABLE
408
409 config WRITE_HIGH_TABLES
410         bool
411         default HAVE_HIGH_TABLES
412
413 menu "System tables"
414
415 config WRITE_HIGH_TABLES
416         bool "Write 'high' tables to avoid being overwritten in F segment"
417         depends on HAVE_HIGH_TABLES
418         default y
419
420 config MULTIBOOT
421         bool "Generate Multiboot tables (for GRUB2)"
422         default y
423
424 config GENERATE_ACPI_TABLES
425         depends on HAVE_ACPI_TABLES
426         bool "Generate ACPI tables"
427         default y
428         help
429           Generate ACPI tables for this board.
430
431           If unsure, say Y.
432
433 config GENERATE_MP_TABLE
434         depends on HAVE_MP_TABLE
435         bool "Generate an MP table"
436         default y
437         help
438           Generate an MP table (conforming to the Intel MultiProcessor
439           specification 1.4) for this board.
440
441           If unsure, say Y.
442
443 config GENERATE_PIRQ_TABLE
444         depends on HAVE_PIRQ_TABLE
445         bool "Generate a PIRQ table"
446         default y
447         help
448           Generate a PIRQ table for this board.
449
450           If unsure, say Y.
451
452 endmenu
453
454 menu "Payload"
455
456 choice
457         prompt "Add a payload"
458         default PAYLOAD_NONE
459
460 config PAYLOAD_NONE
461         bool "None"
462         help
463           Select this option if you want to create an "empty" coreboot
464           ROM image for a certain mainboard, i.e. a coreboot ROM image
465           which does not yet contain a payload.
466
467           For such an image to be useful, you have to use 'cbfstool'
468           to add a payload to the ROM image later.
469
470 config PAYLOAD_ELF
471         bool "An ELF executable payload"
472         help
473           Select this option if you have a payload image (an ELF file)
474           which coreboot should run as soon as the basic hardware
475           initialization is completed.
476
477           You will be able to specify the location and file name of the
478           payload image later.
479
480 endchoice
481
482 config FALLBACK_PAYLOAD_FILE
483         string "Payload path and filename"
484         depends on PAYLOAD_ELF
485         default "payload.elf"
486         help
487           The path and filename of the ELF executable file to use as payload.
488
489 # TODO: Defined if no payload? Breaks build?
490 config COMPRESSED_PAYLOAD_LZMA
491         bool "Use LZMA compression for payloads"
492         default y
493         depends on PAYLOAD_ELF
494         help
495           In order to reduce the size payloads take up in the ROM chip
496           coreboot can compress them using the LZMA algorithm.
497
498 config COMPRESSED_PAYLOAD_NRV2B
499         bool
500         default n
501
502 endmenu
503
504 menu "VGA BIOS"
505
506 config VGA_BIOS
507         bool "Add a VGA BIOS image"
508         help
509           Select this option if you have a VGA BIOS image that you would
510           like to add to your ROM.
511
512           You will be able to specify the location and file name of the
513           image later.
514
515 config FALLBACK_VGA_BIOS_FILE
516         string "VGA BIOS path and filename"
517         depends on VGA_BIOS
518         default "vgabios.bin"
519         help
520           The path and filename of the file to use as VGA BIOS.
521
522 config FALLBACK_VGA_BIOS_ID
523         string "VGA device PCI IDs"
524         depends on VGA_BIOS
525         default "1106,3230"
526         help
527           The comma-separated PCI vendor and device ID that would associate
528           your VGA BIOS to your video card.
529
530           Example: 1106,3230
531
532           In the above example 1106 is the PCI vendor ID (in hex, but without
533           the "0x" prefix) and 3230 specifies the PCI device ID of the
534           video card (also in hex, without "0x" prefix).
535
536 config INTEL_MBI
537         bool "Add an MBI image"
538         depends on NORTHBRIDGE_INTEL_I82830
539         help
540           Select this option if you have an Intel MBI image that you would
541           like to add to your ROM.
542
543           You will be able to specify the location and file name of the
544           image later.
545
546 config FALLBACK_MBI_FILE
547         string "Intel MBI path and filename"
548         depends on INTEL_MBI
549         default "mbi.bin"
550         help
551           The path and filename of the file to use as VGA BIOS.
552
553 endmenu
554
555 menu "Bootsplash"
556         depends on PCI_OPTION_ROM_RUN_YABEL
557
558 config BOOTSPLASH
559         prompt "Show graphical bootsplash"
560         bool
561         depends on PCI_OPTION_ROM_RUN_YABEL
562         help
563           This option shows a graphical bootsplash screen. The grapics are
564           loaded from the CBFS file bootsplash.jpg.
565
566 config FALLBACK_BOOTSPLASH_FILE
567         string "Bootsplash path and filename"
568         depends on BOOTSPLASH
569         default "bootsplash.jpg"
570         help
571           The path and filename of the file to use as graphical bootsplash 
572           screen. The file format has to be jpg. 
573
574 # TODO: Turn this into a "choice".
575 config FRAMEBUFFER_VESA_MODE
576         prompt "VESA framebuffer video mode"
577         hex
578         default 0x117
579         depends on BOOTSPLASH
580         help
581           This option sets the resolution used for the coreboot framebuffer and
582           bootsplash screen. Set to 0x117 for 1024x768x16. A diligent soul will
583           some day make this a "choice".
584
585 config COREBOOT_KEEP_FRAMEBUFFER
586         prompt "Keep VESA framebuffer"
587         bool
588         depends on BOOTSPLASH
589         help
590           This option keeps the framebuffer mode set after coreboot finishes
591           execution. If this option is enabled, coreboot will pass a
592           framebuffer entry in its coreboot table and the payload will need a
593           framebuffer driver. If this option is disabled, coreboot will switch
594           back to text mode before handing control to a payload.
595
596 endmenu
597
598 menu "Debugging"
599
600 # TODO: Better help text and detailed instructions.
601 config GDB_STUB
602         bool "GDB debugging support"
603         default y
604         help
605           If enabled, you will be able to set breakpoints for gdb debugging.
606           See src/arch/i386/lib/c_start.S for details.
607
608 config DEBUG_RAM_SETUP
609         bool "Output verbose RAM init debug messages"
610         default n
611         depends on (NORTHBRIDGE_AMD_AMDFAM10 \
612                  || NORTHBRIDGE_AMD_AMDK8 \
613                  || NORTHBRIDGE_VIA_CN700 \
614                  || NORTHBRIDGE_VIA_CX700 \
615                  || NORTHBRIDGE_VIA_VX800 \
616                  || NORTHBRIDGE_INTEL_E7501 \
617                  || NORTHBRIDGE_INTEL_I440BX \
618                  || NORTHBRIDGE_INTEL_I82810 \
619                  || NORTHBRIDGE_INTEL_I82830 \
620                  || NORTHBRIDGE_INTEL_I945)
621         help
622           This option enables additional RAM init related debug messages.
623           It is recommended to enable this when debugging issues on your
624           board which might be RAM init related.
625
626           Note: This option will increase the size of the coreboot image.
627
628           If unsure, say N.
629
630 config DEBUG_SMBUS
631         bool "Output verbose SMBus debug messages"
632         default n
633         depends on (SOUTHBRIDGE_VIA_VT8237R \
634                  || NORTHBRIDGE_VIA_VX800 \
635                  || NORTHBRIDGE_VIA_CX700 \
636                  || NORTHBRIDGE_AMD_AMDK8)
637         help
638           This option enables additional SMBus (and SPD) debug messages.
639
640           Note: This option will increase the size of the coreboot image.
641
642           If unsure, say N.
643
644 config DEBUG_SMI
645         bool "Output verbose SMI debug messages"
646         default n
647         depends on HAVE_SMI_HANDLER
648         help
649           This option enables additional SMI related debug messages.
650
651           Note: This option will increase the size of the coreboot image.
652
653           If unsure, say N.
654
655 config X86EMU_DEBUG
656         bool "Output verbose x86emu debug messages"
657         default n
658         depends on PCI_OPTION_ROM_RUN_YABEL
659         help
660           This option enables additional x86emu related debug messages.
661
662           Note: This option will increase the size of the coreboot image.
663
664           If unsure, say N.
665
666 config X86EMU_DEBUG_JMP
667         bool "Trace JMP/RETF"
668         default n
669         depends on X86EMU_DEBUG
670         help
671           Print information about JMP and RETF opcodes from x86emu.
672
673           Note: This option will increase the size of the coreboot image.
674
675           If unsure, say N.
676
677 config X86EMU_DEBUG_TRACE
678         bool "Trace all opcodes"
679         default n
680         depends on X86EMU_DEBUG
681         help
682           Print _all_ opcodes that are executed by x86emu.
683           
684           WARNING: This will produce a LOT of output and take a long time.
685
686           Note: This option will increase the size of the coreboot image.
687
688           If unsure, say N.
689
690 config X86EMU_DEBUG_PNP
691         bool "Log Plug&Play accesses"
692         default n
693         depends on X86EMU_DEBUG
694         help
695           Print Plug And Play accesses made by option ROMs.
696
697           Note: This option will increase the size of the coreboot image.
698
699           If unsure, say N.
700
701 config X86EMU_DEBUG_DISK
702         bool "Log Disk I/O"
703         default n
704         depends on X86EMU_DEBUG
705         help
706           Print Disk I/O related messages.
707
708           Note: This option will increase the size of the coreboot image.
709
710           If unsure, say N.
711
712 config X86EMU_DEBUG_PMM
713         bool "Log PMM"
714         default n
715         depends on X86EMU_DEBUG
716         help
717           Print messages related to POST Memory Manager (PMM).
718
719           Note: This option will increase the size of the coreboot image.
720
721           If unsure, say N.
722
723
724 config X86EMU_DEBUG_VBE
725         bool "Debug VESA BIOS Extensions"
726         default n
727         depends on X86EMU_DEBUG
728         help
729           Print messages related to VESA BIOS Extension (VBE) functions.
730
731           Note: This option will increase the size of the coreboot image.
732
733           If unsure, say N.
734
735 config X86EMU_DEBUG_INT10
736         bool "Redirect INT10 output to console"
737         default n
738         depends on X86EMU_DEBUG
739         help
740           Let INT10 (i.e. character output) calls print messages to debug output.
741
742           Note: This option will increase the size of the coreboot image.
743
744           If unsure, say N.
745
746 config X86EMU_DEBUG_INTERRUPTS
747         bool "Log intXX calls"
748         default n
749         depends on X86EMU_DEBUG
750         help
751           Print messages related to interrupt handling.
752
753           Note: This option will increase the size of the coreboot image.
754
755           If unsure, say N.
756
757 config X86EMU_DEBUG_CHECK_VMEM_ACCESS
758         bool "Log special memory accesses"
759         default n
760         depends on X86EMU_DEBUG
761         help
762           Print messages related to accesses to certain areas of the virtual
763           memory (e.g. BDA (BIOS Data Area) or interrupt vectors)
764
765           Note: This option will increase the size of the coreboot image.
766
767           If unsure, say N.
768
769 config X86EMU_DEBUG_MEM
770         bool "Log all memory accesses"
771         default n
772         depends on X86EMU_DEBUG
773         help
774           Print memory accesses made by option ROM.
775           Note: This also includes accesses to fetch instructions.
776
777           Note: This option will increase the size of the coreboot image.
778
779           If unsure, say N.
780
781 config X86EMU_DEBUG_IO
782         bool "Log IO accesses"
783         default n
784         depends on X86EMU_DEBUG
785         help
786           Print I/O accesses made by option ROM.
787
788           Note: This option will increase the size of the coreboot image.
789
790           If unsure, say N.
791
792 config LLSHELL
793         bool "Built-in low-level shell"
794         default n
795         help
796           If enabled, you will have a low level shell to examine your machine.
797           Put llshell() in your (romstage) code to start the shell.
798           See src/arch/i386/llshell/llshell.inc for details.
799
800 endmenu
801
802 config LIFT_BSP_APIC_ID
803         bool
804         default n
805
806 # These probably belong somewhere else, but they are needed somewhere.
807 config AP_CODE_IN_CAR
808         bool
809         default n
810
811 config USE_INIT
812         bool
813         default n
814
815 config ENABLE_APIC_EXT_ID
816         bool
817         default n
818
819 config WARNINGS_ARE_ERRORS
820         bool
821         default n
822
823 config ID_SECTION_OFFSET
824         hex
825         default 0x10
826
827 source src/Kconfig.deprecated_options