soc/intel/apl: Call mca_configure() on cold boots only
[coreboot.git] / src / device / Kconfig
blob85f1d65719275b6f73b28cdc32748d4bedc49aa2
1 ##
2 ## This file is part of the coreboot project.
3 ##
4 ## Copyright (C) 2007-2010 coresystems GmbH
5 ## (Written by Stefan Reinauer <stepan@coresystems.de> for coresystems GmbH)
6 ##
7 ## This program is free software; you can redistribute it and/or modify
8 ## it under the terms of the GNU General Public License as published by
9 ## the Free Software Foundation; version 2 of the License.
11 ## This program is distributed in the hope that it will be useful,
12 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 ## GNU General Public License for more details.
17 menu "Devices"
19 config HAVE_VGA_TEXT_FRAMEBUFFER
20         bool
21         help
22           Selected by graphics drivers that support legacy VGA text mode.
24 config HAVE_VBE_LINEAR_FRAMEBUFFER
25         bool
26         help
27           Selected by graphics drivers that can set up a VBE linear-framebuffer
28           mode.
30 config HAVE_LINEAR_FRAMEBUFFER
31         bool
32         help
33           Selected by graphics drivers that can set up a generic linear
34           framebuffer.
36 config HAVE_FSP_GOP
37         bool
38         help
39           Selected by drivers that support to run a blob that implements
40           the Graphics Output Protocol (GOP).
42 config MAINBOARD_HAS_NATIVE_VGA_INIT
43         def_bool n
44         help
45           Selected by mainboards / drivers that provide native graphics
46           init within coreboot.
48 config MAINBOARD_FORCE_NATIVE_VGA_INIT
49         def_bool n
50         depends on MAINBOARD_HAS_NATIVE_VGA_INIT || MAINBOARD_HAS_LIBGFXINIT
51         help
52           Selected by mainboards / chipsets whose graphics driver can't or
53           shouldn't be disabled.
55 config MAINBOARD_HAS_LIBGFXINIT
56         def_bool n
57         help
58           Selected by mainboards that implement support for `libgfxinit`.
59           Usually this requires a list of ports to be probed for displays.
61 choice
62         prompt "Graphics initialization"
63         default NO_GFX_INIT if VGA_BIOS && PAYLOAD_SEABIOS
64         default VGA_ROM_RUN if VGA_BIOS
66 config MAINBOARD_DO_NATIVE_VGA_INIT
67         bool "Use native graphics init"
68         depends on MAINBOARD_HAS_NATIVE_VGA_INIT
69         help
70           Some mainboards, such as the Google Link, allow initializing the
71           display without the need of a binary only VGA OPROM. Enabling this
72           option may be faster, but also lacks flexibility in setting modes.
74 config MAINBOARD_USE_LIBGFXINIT
75         bool "Use libgfxinit"
76         depends on MAINBOARD_HAS_LIBGFXINIT
77         select HAVE_VGA_TEXT_FRAMEBUFFER
78         select HAVE_LINEAR_FRAMEBUFFER
79         select RAMSTAGE_LIBHWBASE
80         select VGA if VGA_TEXT_FRAMEBUFFER
81         help
82           Use the SPARK library `libgfxinit` for the native graphics
83           initialization. This requires an Ada toolchain.
85 # TODO: Explain differences (if any) for onboard cards.
86 config VGA_ROM_RUN
87         bool "Run VGA Option ROMs"
88         depends on PCI && (ARCH_X86 || ARCH_PPC64) && !MAINBOARD_FORCE_NATIVE_VGA_INIT
89         select HAVE_VGA_TEXT_FRAMEBUFFER
90         help
91           Execute VGA Option ROMs in coreboot if found. This can be used
92           to enable PCI/AGP/PCI-E video cards when not using a SeaBIOS
93           payload.
95           When using a SeaBIOS payload it runs all option ROMs with much
96           more complete BIOS interrupt services available than coreboot,
97           which some option ROMs require in order to function correctly.
99 config RUN_FSP_GOP
100         bool "Run a GOP driver"
101         depends on HAVE_FSP_GOP
102         select HAVE_LINEAR_FRAMEBUFFER
103         help
104           Some platforms (e.g. Intel Braswell and Skylake/Kaby Lake) support
105           to run a GOP blob. This option enables graphics initialization with
106           such a blob.
108 config NO_GFX_INIT
109         bool "None"
110         depends on !MAINBOARD_FORCE_NATIVE_VGA_INIT
111         help
112           Select this to not perform any graphics initialization in
113           coreboot. This is useful if the payload (e.g. SeaBIOS) can
114           initialize graphics or if pre-boot graphics are not required.
116 endchoice
118 config S3_VGA_ROM_RUN
119         bool "Re-run VGA Option ROMs on S3 resume"
120         default y
121         depends on VGA_ROM_RUN && HAVE_ACPI_RESUME
122         help
123           Execute VGA Option ROMs in coreboot when resuming from S3 suspend.
125           When using a SeaBIOS payload it runs all option ROMs with much
126           more complete BIOS interrupt services available than coreboot,
127           which some option ROMs require in order to function correctly.
129           If unsure, say N when using SeaBIOS as payload, Y otherwise.
131 config ALWAYS_LOAD_OPROM
132         def_bool n
133         depends on VGA_ROM_RUN
134         help
135           Always load option ROMs if any are found. The decision to run
136           the ROM is still determined at runtime, but the distinction
137           between loading and not running comes into play for CHROMEOS.
139           An example where this is required is that VBT (Video BIOS Tables)
140           are needed for the kernel's display driver to know how a piece of
141           hardware is configured to be used.
143 config ALWAYS_RUN_OPROM
144         def_bool n
145         depends on VGA_ROM_RUN && ALWAYS_LOAD_OPROM
146         help
147           Always uncondtionally run the option regardless of other
148           policies.
150 config ON_DEVICE_ROM_LOAD
151         bool "Load Option ROMs on PCI devices"
152         default n if PAYLOAD_SEABIOS
153         default y if !PAYLOAD_SEABIOS
154         depends on VGA_ROM_RUN
155         help
156           Load Option ROMs stored on PCI/PCIe/AGP VGA devices in coreboot.
158           If disabled, only Option ROMs stored in CBFS will be executed by
159           coreboot. If you are concerned about security, you might want to
160           disable this option, but it might leave your system in a state of
161           degraded functionality.
163           When using a SeaBIOS payload it runs all option ROMs with much
164           more complete BIOS interrupt services available than coreboot,
165           which some option ROMs require in order to function correctly.
167           If unsure, say N when using SeaBIOS as payload, Y otherwise.
169 choice
170         prompt "Option ROM execution type"
171         default PCI_OPTION_ROM_RUN_YABEL if !ARCH_X86
172         default PCI_OPTION_ROM_RUN_REALMODE if ARCH_X86
173         depends on VGA_ROM_RUN
175 config PCI_OPTION_ROM_RUN_REALMODE
176         prompt "Native mode"
177         bool
178         depends on ARCH_X86
179         help
180           If you select this option, PCI Option ROMs will be executed
181           natively on the CPU in real mode. No CPU emulation is involved,
182           so this is the fastest, but also the least secure option.
183           (only works on x86/x64 systems)
185 config PCI_OPTION_ROM_RUN_YABEL
186         prompt "Secure mode"
187         bool
188         help
189           If you select this option, the x86emu CPU emulator will be used to
190           execute PCI Option ROMs.
192           This option prevents Option ROMs from doing dirty tricks with the
193           system (such as installing SMM modules or hypervisors), but it is
194           also significantly slower than the native Option ROM initialization
195           method.
197           This is the default choice for non-x86 systems.
199 endchoice
201 config YABEL_PCI_ACCESS_OTHER_DEVICES
202         prompt "Allow Option ROMs to access other devices"
203         bool
204         depends on PCI_OPTION_ROM_RUN_YABEL
205         help
206           Per default, YABEL only allows Option ROMs to access the PCI device
207           that they are associated with. However, this causes trouble for some
208           onboard graphics chips whose Option ROM needs to reconfigure the
209           north bridge.
211 config YABEL_PCI_FAKE_WRITING_OTHER_DEVICES_CONFIG
212         prompt "Fake success on writing other device's config space"
213         bool
214         depends on YABEL_PCI_ACCESS_OTHER_DEVICES
215         help
216           By default, YABEL aborts when the Option ROM tries to write to other
217           devices' config spaces. With this option enabled, the write doesn't
218           follow through, but the Option ROM is allowed to go on.
219           This can create issues such as hanging Option ROMs (if it depends on
220           that other register changing to the written value), so test for
221           impact before using this option.
223 config YABEL_VIRTMEM_LOCATION
224         prompt "Location of YABEL's virtual memory"
225         hex
226         depends on PCI_OPTION_ROM_RUN_YABEL
227         default 0x1000000
228         help
229           YABEL requires 1MB memory for its CPU emulation. This memory is
230           normally located at 16MB.
232 config YABEL_DIRECTHW
233         prompt "Direct hardware access"
234         bool
235         depends on PCI_OPTION_ROM_RUN_YABEL && ARCH_X86
236         help
237           YABEL consists of two parts: It uses x86emu for the CPU emulation and
238           additionally provides a PC system emulation that filters bad device
239           and memory access (such as PCI config space access to other devices
240           than the initialized one).
242           When choosing this option, x86emu will pass through all hardware
243           accesses to memory and I/O devices to the underlying memory and I/O
244           addresses. While this option prevents Option ROMs from doing dirty
245           tricks with the CPU (such as installing SMM modules or hypervisors),
246           they can still access all devices in the system.
247           Enable this option for a good compromise between security and speed.
249 config MULTIPLE_VGA_ADAPTERS
250         bool
251         default n
253 menu "Display"
254         depends on HAVE_VGA_TEXT_FRAMEBUFFER || HAVE_LINEAR_FRAMEBUFFER
256 config FRAMEBUFFER_SET_VESA_MODE
257         prompt "Set framebuffer graphics resolution"
258         bool
259         depends on PCI_OPTION_ROM_RUN_YABEL || PCI_OPTION_ROM_RUN_REALMODE
260         select HAVE_VBE_LINEAR_FRAMEBUFFER
261         help
262           Set VESA/native framebuffer mode (needed for bootsplash and graphical framebuffer console)
264 if FRAMEBUFFER_SET_VESA_MODE
266 choice
267         prompt "framebuffer graphics resolution"
268         default FRAMEBUFFER_VESA_MODE_117
269         help
270           This option sets the resolution used for the coreboot framebuffer (and
271           bootsplash screen).
273 config FRAMEBUFFER_VESA_MODE_100
274         bool "640x400 256-color"
276 config FRAMEBUFFER_VESA_MODE_101
277         bool "640x480 256-color"
279 config FRAMEBUFFER_VESA_MODE_102
280         bool "800x600 16-color"
282 config FRAMEBUFFER_VESA_MODE_103
283         bool "800x600 256-color"
285 config FRAMEBUFFER_VESA_MODE_104
286         bool "1024x768 16-color"
288 config FRAMEBUFFER_VESA_MODE_105
289         bool "1024x768 256-color"
291 config FRAMEBUFFER_VESA_MODE_106
292         bool "1280x1024 16-color"
294 config FRAMEBUFFER_VESA_MODE_107
295         bool "1280x1024 256-color"
297 config FRAMEBUFFER_VESA_MODE_108
298         bool "80x60 text"
300 config FRAMEBUFFER_VESA_MODE_109
301         bool "132x25 text"
303 config FRAMEBUFFER_VESA_MODE_10A
304         bool "132x43 text"
306 config FRAMEBUFFER_VESA_MODE_10B
307         bool "132x50 text"
309 config FRAMEBUFFER_VESA_MODE_10C
310         bool "132x60 text"
312 config FRAMEBUFFER_VESA_MODE_10D
313         bool "320x200 32k-color (1:5:5:5)"
315 config FRAMEBUFFER_VESA_MODE_10E
316         bool "320x200 64k-color (5:6:5)"
318 config FRAMEBUFFER_VESA_MODE_10F
319         bool "320x200 16.8M-color (8:8:8)"
321 config FRAMEBUFFER_VESA_MODE_110
322         bool "640x480 32k-color (1:5:5:5)"
324 config FRAMEBUFFER_VESA_MODE_111
325         bool "640x480 64k-color (5:6:5)"
327 config FRAMEBUFFER_VESA_MODE_112
328         bool "640x480 16.8M-color (8:8:8)"
330 config FRAMEBUFFER_VESA_MODE_113
331         bool "800x600 32k-color (1:5:5:5)"
333 config FRAMEBUFFER_VESA_MODE_114
334         bool "800x600 64k-color (5:6:5)"
336 config FRAMEBUFFER_VESA_MODE_115
337         bool "800x600 16.8M-color (8:8:8)"
339 config FRAMEBUFFER_VESA_MODE_116
340         bool "1024x768 32k-color (1:5:5:5)"
342 config FRAMEBUFFER_VESA_MODE_117
343         bool "1024x768 64k-color (5:6:5)"
345 config FRAMEBUFFER_VESA_MODE_118
346         bool "1024x768 16.8M-color (8:8:8)"
348 config FRAMEBUFFER_VESA_MODE_119
349         bool "1280x1024 32k-color (1:5:5:5)"
351 config FRAMEBUFFER_VESA_MODE_11A
352         bool "1280x1024 64k-color (5:6:5)"
354 config FRAMEBUFFER_VESA_MODE_11B
355         bool "1280x1024 16.8M-color (8:8:8)"
357 config FRAMEBUFFER_VESA_MODE_USER
358         bool "Manually select VESA mode"
360 endchoice
362 # Map the config names to an integer (KB).
363 config FRAMEBUFFER_VESA_MODE
364         prompt "VESA mode" if FRAMEBUFFER_VESA_MODE_USER
365         hex
366         default 0x100 if FRAMEBUFFER_VESA_MODE_100
367         default 0x101 if FRAMEBUFFER_VESA_MODE_101
368         default 0x102 if FRAMEBUFFER_VESA_MODE_102
369         default 0x103 if FRAMEBUFFER_VESA_MODE_103
370         default 0x104 if FRAMEBUFFER_VESA_MODE_104
371         default 0x105 if FRAMEBUFFER_VESA_MODE_105
372         default 0x106 if FRAMEBUFFER_VESA_MODE_106
373         default 0x107 if FRAMEBUFFER_VESA_MODE_107
374         default 0x108 if FRAMEBUFFER_VESA_MODE_108
375         default 0x109 if FRAMEBUFFER_VESA_MODE_109
376         default 0x10A if FRAMEBUFFER_VESA_MODE_10A
377         default 0x10B if FRAMEBUFFER_VESA_MODE_10B
378         default 0x10C if FRAMEBUFFER_VESA_MODE_10C
379         default 0x10D if FRAMEBUFFER_VESA_MODE_10D
380         default 0x10E if FRAMEBUFFER_VESA_MODE_10E
381         default 0x10F if FRAMEBUFFER_VESA_MODE_10F
382         default 0x110 if FRAMEBUFFER_VESA_MODE_110
383         default 0x111 if FRAMEBUFFER_VESA_MODE_111
384         default 0x112 if FRAMEBUFFER_VESA_MODE_112
385         default 0x113 if FRAMEBUFFER_VESA_MODE_113
386         default 0x114 if FRAMEBUFFER_VESA_MODE_114
387         default 0x115 if FRAMEBUFFER_VESA_MODE_115
388         default 0x116 if FRAMEBUFFER_VESA_MODE_116
389         default 0x117 if FRAMEBUFFER_VESA_MODE_117
390         default 0x118 if FRAMEBUFFER_VESA_MODE_118
391         default 0x119 if FRAMEBUFFER_VESA_MODE_119
392         default 0x11A if FRAMEBUFFER_VESA_MODE_11A
393         default 0x11B if FRAMEBUFFER_VESA_MODE_11B
394         default 0x117 if FRAMEBUFFER_VESA_MODE_USER
396 config BOOTSPLASH
397         prompt "Show graphical bootsplash"
398         bool
399         help
400           This option shows a graphical bootsplash screen. The graphics are
401           loaded from the CBFS file bootsplash.jpg.
403           You can either specify the location and file name of the
404           image in the 'General' section or add it manually to CBFS, using,
405           for example, cbfstool.
407 endif # FRAMEBUFFER_SET_VESA_MODE
409 choice
410         prompt "Framebuffer mode"
411         default VGA_TEXT_FRAMEBUFFER
413 config VGA_TEXT_FRAMEBUFFER
414         bool "Legacy VGA text mode"
415         depends on HAVE_VGA_TEXT_FRAMEBUFFER
416         help
417           If this option is enabled, coreboot will initialize graphics in
418           legacy VGA text mode or, if a VGA BIOS is used and a VESA mode set,
419           switch to text mode before handing control to a payload.
421 config VBE_LINEAR_FRAMEBUFFER
422         bool "VESA framebuffer"
423         depends on HAVE_VBE_LINEAR_FRAMEBUFFER
424         help
425           This option keeps the framebuffer mode set after coreboot finishes
426           execution. If this option is enabled, coreboot will pass a
427           framebuffer entry in its coreboot table and the payload will need a
428           compatible driver.
430 config GENERIC_LINEAR_FRAMEBUFFER
431         bool "Linear \"high-resolution\" framebuffer"
432         depends on HAVE_LINEAR_FRAMEBUFFER
433         help
434           This option enables a high-resolution, linear framebuffer. If this
435           option is enabled, coreboot will pass a framebuffer entry in its
436           coreboot table and the payload will need a compatible driver.
438 endchoice
440 # Workaround to have LINEAR_FRAMEBUFFER set in both cases
441 # VBE_LINEAR_FRAMEBUFFER and GENERIC_LINEAR_FRAMEBUFFER.
442 # `kconfig_lint` doesn't let us use the same name with
443 # different texts in the choice above.
444 config LINEAR_FRAMEBUFFER
445         def_bool y
446         depends on VBE_LINEAR_FRAMEBUFFER || GENERIC_LINEAR_FRAMEBUFFER
448 endmenu # "Display"
450 config SMBUS_HAS_AUX_CHANNELS
451         bool
452         default n
454 config PCI
455         bool
456         default n
458 if PCI
460 config NO_MMCONF_SUPPORT
461         bool
462         default n
464 config MMCONF_SUPPORT
465         bool
466         default !NO_MMCONF_SUPPORT
468 config HYPERTRANSPORT_PLUGIN_SUPPORT
469         bool
470         default n
472 config PCIX_PLUGIN_SUPPORT
473         bool
474         default y
476 config CARDBUS_PLUGIN_SUPPORT
477         bool
478         default y
480 config AZALIA_PLUGIN_SUPPORT
481         bool
482         default n
484 config PCIEXP_PLUGIN_SUPPORT
485         bool
486         default y
488 endif # PCI
490 if PCIEXP_PLUGIN_SUPPORT
492 config PCIEXP_COMMON_CLOCK
493         prompt "Enable PCIe Common Clock"
494         bool
495         default n
496         help
497           Detect and enable Common Clock on PCIe links.
499 config PCIEXP_ASPM
500         prompt "Enable PCIe ASPM"
501         bool
502         default n
503         help
504           Detect and enable ASPM (Active State Power Management) on PCIe links.
506 config PCIEXP_CLK_PM
507         prompt "Enable PCIe Clock Power Management"
508         bool
509         default n
510         help
511           Detect and enable Clock Power Management on PCIe.
513 config PCIEXP_L1_SUB_STATE
514         prompt "Enable PCIe ASPM L1 SubState"
515         bool
516         depends on (MMCONF_SUPPORT || PCI_IO_CFG_EXT)
517         default n
518         help
519           Detect and enable ASPM on PCIe links.
521 endif # PCIEXP_PLUGIN_SUPPORT
523 config EARLY_PCI_BRIDGE
524         bool "Early PCI bridge"
525         depends on PCI
526         default n
527         help
528           While coreboot is executing code from ROM, the coreboot resource
529           allocator has not been running yet. Hence PCI devices living behind
530           a bridge are not yet visible to the system.
532           This option enables static configuration for a single pre-defined
533           PCI bridge function on bus 0.
535 if EARLY_PCI_BRIDGE
537 config EARLY_PCI_BRIDGE_DEVICE
538         hex "bridge device"
539         default 0x0
541 config EARLY_PCI_BRIDGE_FUNCTION
542         hex "bridge function"
543         default 0x0
545 config EARLY_PCI_MMIO_BASE
546         hex "MMIO window base"
547         default 0x0
549 endif # EARLY_PCI_BRIDGE
551 config SUBSYSTEM_VENDOR_ID
552         hex "Override PCI Subsystem Vendor ID"
553         depends on PCI
554         default 0x0000
555         help
556           This config option will override the devicetree settings for
557           PCI Subsystem Vendor ID.
559 config SUBSYSTEM_DEVICE_ID
560         hex "Override PCI Subsystem Device ID"
561         depends on PCI
562         default 0x0000
563         help
564           This config option will override the devicetree settings for
565           PCI Subsystem Device ID.
567 config VGA_BIOS
568         bool "Add a VGA BIOS image"
569         depends on ARCH_X86
570         help
571           Select this option if you have a VGA BIOS image that you would
572           like to add to your ROM.
574           You will be able to specify the location and file name of the
575           image later.
577 config VGA_BIOS_FILE
578         string "VGA BIOS path and filename"
579         depends on VGA_BIOS
580         default "vgabios.bin"
581         help
582           The path and filename of the file to use as VGA BIOS.
584 config VGA_BIOS_ID
585         string "VGA device PCI IDs"
586         depends on VGA_BIOS
587         default "1106,3230"
588         help
589           The comma-separated PCI vendor and device ID that would associate
590           your VGA BIOS to your video card.
592           Example: 1106,3230
594           In the above example 1106 is the PCI vendor ID (in hex, but without
595           the "0x" prefix) and 3230 specifies the PCI device ID of the
596           video card (also in hex, without "0x" prefix).
598           Under GNU/Linux you can run `lspci -nn` to list the IDs of your PCI devices.
600 config INTEL_GMA_HAVE_VBT
601         bool
602         help
603           Select this in the mainboard Kconfig to indicate the board has
604           a data.vbt file.
606 config INTEL_GMA_ADD_VBT
607         depends on SOC_INTEL_COMMON || CPU_INTEL_COMMON
608         bool "Add a Video Bios Table (VBT) binary to CBFS"
609         default y if INTEL_GMA_HAVE_VBT
610         help
611           Add a VBT data file to CBFS. The VBT describes the integrated
612           GPU and connections, and is needed by the GOP driver integrated into
613           FSP and the OS driver in order to initialize the display.
615 config INTEL_GMA_VBT_FILE
616         string "VBT binary path and filename"
617         depends on INTEL_GMA_ADD_VBT
618         default "src/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/data.vbt" \
619                 if INTEL_GMA_HAVE_VBT && VARIANT_DIR != ""
620         default "src/mainboard/$(MAINBOARDDIR)/data.vbt" if INTEL_GMA_HAVE_VBT
621         default "3rdparty/blobs/mainboard/$(MAINBOARDDIR)/vbt.bin"
622         help
623           The path and filename of the VBT binary.
625 config SOFTWARE_I2C
626         bool "Enable I2C controller emulation in software"
627         default n
628         help
629           This config option will enable code to override the i2c_transfer
630           routine with a (simple) software emulation of the protocol. This may
631           be useful for debugging or on platforms where a driver for the real
632           I2C controller is not (yet) available. The platform code needs to
633           provide bindings to manually toggle I2C lines.
635 endmenu