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