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