device/Kconfig: Move "Display" menu below gfx options
[coreboot.git] / src / device / Kconfig
blob5d9aa899bb4a41bb0e4362f0b26a8c35a58c624b
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 # Only set this in the mainboard
20 config MAINBOARD_HAS_NATIVE_VGA_INIT
21         bool
22         default n
24 config HAVE_VGA_TEXT_FRAMEBUFFER
25         bool
26         help
27           Selected by graphics drivers that support legacy VGA text mode.
29 config HAVE_VBE_LINEAR_FRAMEBUFFER
30         bool
31         help
32           Selected by graphics drivers that can set up a VBE linear-framebuffer
33           mode.
35 config HAVE_LINEAR_FRAMEBUFFER
36         bool
37         help
38           Selected by graphics drivers that can set up a generic linear
39           framebuffer.
41 config MAINBOARD_DO_NATIVE_VGA_INIT
42         bool "Use native graphics initialization"
43         depends on MAINBOARD_HAS_NATIVE_VGA_INIT
44         default n
45         help
46           Some mainboards, such as the Google Link, allow initializing the display
47           without the need of a binary only VGA OPROM. Enabling this option may be
48           faster, but also lacks flexibility in setting modes.
50           If unsure, say N.
52 config MAINBOARD_HAS_LIBGFXINIT
53         def_bool n
54         select MAINBOARD_HAS_NATIVE_VGA_INIT
55         help
56           Selected by mainboards that implement support for `libgfxinit`.
57           Usually this requires a list of ports to be probed for displays.
59 config MAINBOARD_USE_LIBGFXINIT
60         bool "Use libgfxinit for native graphics initialization"
61         depends on MAINBOARD_DO_NATIVE_VGA_INIT
62         depends on MAINBOARD_HAS_LIBGFXINIT
63         select HAVE_VGA_TEXT_FRAMEBUFFER
64         select HAVE_LINEAR_FRAMEBUFFER
65         select RAMSTAGE_LIBHWBASE
66         select VGA if VGA_TEXT_FRAMEBUFFER
67         select NO_EDID_FILL_FB
68         default n
69         help
70           Use the SPARK library `libgfxinit` for the native graphics
71           initialization. This requires an Ada toolchain.
73 # TODO: Explain differences (if any) for onboard cards.
74 config VGA_ROM_RUN
75         bool "Run VGA Option ROMs"
76         default n if PAYLOAD_SEABIOS
77         default y if !PAYLOAD_SEABIOS
78         depends on PCI && !MAINBOARD_DO_NATIVE_VGA_INIT
79         select HAVE_VGA_TEXT_FRAMEBUFFER
80         help
81           Execute VGA Option ROMs in coreboot if found. This is required
82           to enable PCI/AGP/PCI-E video cards when not using a SeaBIOS
83           payload.
85           When using a SeaBIOS payload it runs all option ROMs with much
86           more complete BIOS interrupt services available than coreboot,
87           which some option ROMs require in order to function correctly.
89           If unsure, say N when using SeaBIOS as payload, Y otherwise.
91 config S3_VGA_ROM_RUN
92         bool "Re-run VGA Option ROMs on S3 resume"
93         default y
94         depends on VGA_ROM_RUN && HAVE_ACPI_RESUME
95         help
96           Execute VGA Option ROMs in coreboot when resuming from S3 suspend.
98           When using a SeaBIOS payload it runs all option ROMs with much
99           more complete BIOS interrupt services available than coreboot,
100           which some option ROMs require in order to function correctly.
102           If unsure, say N when using SeaBIOS as payload, Y otherwise.
104 config ALWAYS_LOAD_OPROM
105         def_bool n
106         depends on VGA_ROM_RUN
107         help
108           Always load option ROMs if any are found. The decision to run
109           the ROM is still determined at runtime, but the distinction
110           between loading and not running comes into play for CHROMEOS.
112           An example where this is required is that VBT (Video BIOS Tables)
113           are needed for the kernel's display driver to know how a piece of
114           hardware is configured to be used.
116 config ON_DEVICE_ROM_LOAD
117         bool "Load Option ROMs on PCI devices"
118         default n if PAYLOAD_SEABIOS
119         default y if !PAYLOAD_SEABIOS
120         depends on VGA_ROM_RUN
121         help
122           Load Option ROMs stored on PCI/PCIe/AGP VGA devices in coreboot.
124           If disabled, only Option ROMs stored in CBFS will be executed by
125           coreboot. If you are concerned about security, you might want to
126           disable this option, but it might leave your system in a state of
127           degraded functionality.
129           When using a SeaBIOS payload it runs all option ROMs with much
130           more complete BIOS interrupt services available than coreboot,
131           which some option ROMs require in order to function correctly.
133           If unsure, say N when using SeaBIOS as payload, Y otherwise.
135 choice
136         prompt "Option ROM execution type"
137         default PCI_OPTION_ROM_RUN_YABEL if !ARCH_X86
138         default PCI_OPTION_ROM_RUN_REALMODE if ARCH_X86
139         depends on VGA_ROM_RUN || GEODE_VSA
141 config PCI_OPTION_ROM_RUN_REALMODE
142         prompt "Native mode"
143         bool
144         depends on ARCH_X86
145         help
146           If you select this option, PCI Option ROMs will be executed
147           natively on the CPU in real mode. No CPU emulation is involved,
148           so this is the fastest, but also the least secure option.
149           (only works on x86/x64 systems)
151 config PCI_OPTION_ROM_RUN_YABEL
152         prompt "Secure mode"
153         bool
154         depends on !GEODE_VSA
155         help
156           If you select this option, the x86emu CPU emulator will be used to
157           execute PCI Option ROMs.
159           This option prevents Option ROMs from doing dirty tricks with the
160           system (such as installing SMM modules or hypervisors), but it is
161           also significantly slower than the native Option ROM initialization
162           method.
164           This is the default choice for non-x86 systems.
166 endchoice
168 config YABEL_PCI_ACCESS_OTHER_DEVICES
169         prompt "Allow Option ROMs to access other devices"
170         bool
171         depends on PCI_OPTION_ROM_RUN_YABEL
172         help
173           Per default, YABEL only allows Option ROMs to access the PCI device
174           that they are associated with. However, this causes trouble for some
175           onboard graphics chips whose Option ROM needs to reconfigure the
176           north bridge.
178 config YABEL_PCI_FAKE_WRITING_OTHER_DEVICES_CONFIG
179         prompt "Fake success on writing other device's config space"
180         bool
181         depends on YABEL_PCI_ACCESS_OTHER_DEVICES
182         help
183           By default, YABEL aborts when the Option ROM tries to write to other
184           devices' config spaces. With this option enabled, the write doesn't
185           follow through, but the Option ROM is allowed to go on.
186           This can create issues such as hanging Option ROMs (if it depends on
187           that other register changing to the written value), so test for
188           impact before using this option.
190 config YABEL_VIRTMEM_LOCATION
191         prompt "Location of YABEL's virtual memory"
192         hex
193         depends on PCI_OPTION_ROM_RUN_YABEL
194         default 0x1000000
195         help
196           YABEL requires 1MB memory for its CPU emulation. This memory is
197           normally located at 16MB.
199 config YABEL_DIRECTHW
200         prompt "Direct hardware access"
201         bool
202         depends on PCI_OPTION_ROM_RUN_YABEL && ARCH_X86
203         help
204           YABEL consists of two parts: It uses x86emu for the CPU emulation and
205           additionally provides a PC system emulation that filters bad device
206           and memory access (such as PCI config space access to other devices
207           than the initialized one).
209           When choosing this option, x86emu will pass through all hardware
210           accesses to memory and I/O devices to the underlying memory and I/O
211           addresses. While this option prevents Option ROMs from doing dirty
212           tricks with the CPU (such as installing SMM modules or hypervisors),
213           they can still access all devices in the system.
214           Enable this option for a good compromise between security and speed.
216 config MULTIPLE_VGA_ADAPTERS
217         bool
218         default n
220 menu "Display"
221         depends on HAVE_VGA_TEXT_FRAMEBUFFER || HAVE_LINEAR_FRAMEBUFFER
223 config FRAMEBUFFER_SET_VESA_MODE
224         prompt "Set framebuffer graphics resolution"
225         bool
226         depends on PCI_OPTION_ROM_RUN_YABEL || PCI_OPTION_ROM_RUN_REALMODE
227         select HAVE_VBE_LINEAR_FRAMEBUFFER
228         help
229           Set VESA/native framebuffer mode (needed for bootsplash and graphical framebuffer console)
231 if FRAMEBUFFER_SET_VESA_MODE
233 choice
234         prompt "framebuffer graphics resolution"
235         default FRAMEBUFFER_VESA_MODE_117
236         help
237           This option sets the resolution used for the coreboot framebuffer (and
238           bootsplash screen).
240 config FRAMEBUFFER_VESA_MODE_100
241         bool "640x400 256-color"
243 config FRAMEBUFFER_VESA_MODE_101
244         bool "640x480 256-color"
246 config FRAMEBUFFER_VESA_MODE_102
247         bool "800x600 16-color"
249 config FRAMEBUFFER_VESA_MODE_103
250         bool "800x600 256-color"
252 config FRAMEBUFFER_VESA_MODE_104
253         bool "1024x768 16-color"
255 config FRAMEBUFFER_VESA_MODE_105
256         bool "1024x768 256-color"
258 config FRAMEBUFFER_VESA_MODE_106
259         bool "1280x1024 16-color"
261 config FRAMEBUFFER_VESA_MODE_107
262         bool "1280x1024 256-color"
264 config FRAMEBUFFER_VESA_MODE_108
265         bool "80x60 text"
267 config FRAMEBUFFER_VESA_MODE_109
268         bool "132x25 text"
270 config FRAMEBUFFER_VESA_MODE_10A
271         bool "132x43 text"
273 config FRAMEBUFFER_VESA_MODE_10B
274         bool "132x50 text"
276 config FRAMEBUFFER_VESA_MODE_10C
277         bool "132x60 text"
279 config FRAMEBUFFER_VESA_MODE_10D
280         bool "320x200 32k-color (1:5:5:5)"
282 config FRAMEBUFFER_VESA_MODE_10E
283         bool "320x200 64k-color (5:6:5)"
285 config FRAMEBUFFER_VESA_MODE_10F
286         bool "320x200 16.8M-color (8:8:8)"
288 config FRAMEBUFFER_VESA_MODE_110
289         bool "640x480 32k-color (1:5:5:5)"
291 config FRAMEBUFFER_VESA_MODE_111
292         bool "640x480 64k-color (5:6:5)"
294 config FRAMEBUFFER_VESA_MODE_112
295         bool "640x480 16.8M-color (8:8:8)"
297 config FRAMEBUFFER_VESA_MODE_113
298         bool "800x600 32k-color (1:5:5:5)"
300 config FRAMEBUFFER_VESA_MODE_114
301         bool "800x600 64k-color (5:6:5)"
303 config FRAMEBUFFER_VESA_MODE_115
304         bool "800x600 16.8M-color (8:8:8)"
306 config FRAMEBUFFER_VESA_MODE_116
307         bool "1024x768 32k-color (1:5:5:5)"
309 config FRAMEBUFFER_VESA_MODE_117
310         bool "1024x768 64k-color (5:6:5)"
312 config FRAMEBUFFER_VESA_MODE_118
313         bool "1024x768 16.8M-color (8:8:8)"
315 config FRAMEBUFFER_VESA_MODE_119
316         bool "1280x1024 32k-color (1:5:5:5)"
318 config FRAMEBUFFER_VESA_MODE_11A
319         bool "1280x1024 64k-color (5:6:5)"
321 config FRAMEBUFFER_VESA_MODE_11B
322         bool "1280x1024 16.8M-color (8:8:8)"
324 config FRAMEBUFFER_VESA_MODE_USER
325         bool "Manually select VESA mode"
327 endchoice
329 # Map the config names to an integer (KB).
330 config FRAMEBUFFER_VESA_MODE
331         prompt "VESA mode" if FRAMEBUFFER_VESA_MODE_USER
332         hex
333         default 0x100 if FRAMEBUFFER_VESA_MODE_100
334         default 0x101 if FRAMEBUFFER_VESA_MODE_101
335         default 0x102 if FRAMEBUFFER_VESA_MODE_102
336         default 0x103 if FRAMEBUFFER_VESA_MODE_103
337         default 0x104 if FRAMEBUFFER_VESA_MODE_104
338         default 0x105 if FRAMEBUFFER_VESA_MODE_105
339         default 0x106 if FRAMEBUFFER_VESA_MODE_106
340         default 0x107 if FRAMEBUFFER_VESA_MODE_107
341         default 0x108 if FRAMEBUFFER_VESA_MODE_108
342         default 0x109 if FRAMEBUFFER_VESA_MODE_109
343         default 0x10A if FRAMEBUFFER_VESA_MODE_10A
344         default 0x10B if FRAMEBUFFER_VESA_MODE_10B
345         default 0x10C if FRAMEBUFFER_VESA_MODE_10C
346         default 0x10D if FRAMEBUFFER_VESA_MODE_10D
347         default 0x10E if FRAMEBUFFER_VESA_MODE_10E
348         default 0x10F if FRAMEBUFFER_VESA_MODE_10F
349         default 0x110 if FRAMEBUFFER_VESA_MODE_110
350         default 0x111 if FRAMEBUFFER_VESA_MODE_111
351         default 0x112 if FRAMEBUFFER_VESA_MODE_112
352         default 0x113 if FRAMEBUFFER_VESA_MODE_113
353         default 0x114 if FRAMEBUFFER_VESA_MODE_114
354         default 0x115 if FRAMEBUFFER_VESA_MODE_115
355         default 0x116 if FRAMEBUFFER_VESA_MODE_116
356         default 0x117 if FRAMEBUFFER_VESA_MODE_117
357         default 0x118 if FRAMEBUFFER_VESA_MODE_118
358         default 0x119 if FRAMEBUFFER_VESA_MODE_119
359         default 0x11A if FRAMEBUFFER_VESA_MODE_11A
360         default 0x11B if FRAMEBUFFER_VESA_MODE_11B
361         default 0x117 if FRAMEBUFFER_VESA_MODE_USER
363 config BOOTSPLASH
364         prompt "Show graphical bootsplash"
365         bool
366         help
367           This option shows a graphical bootsplash screen. The graphics are
368           loaded from the CBFS file bootsplash.jpg.
370           You can either specify the location and file name of the
371           image in the 'General' section or add it manually to CBFS, using,
372           for example, cbfstool.
374 endif # FRAMEBUFFER_SET_VESA_MODE
376 choice
377         prompt "Framebuffer mode"
378         default VGA_TEXT_FRAMEBUFFER
380 config VGA_TEXT_FRAMEBUFFER
381         bool "Legacy VGA text mode"
382         depends on HAVE_VGA_TEXT_FRAMEBUFFER
383         help
384           If this option is enabled, coreboot will initialize graphics in
385           legacy VGA text mode or, if a VGA BIOS is used and a VESA mode set,
386           switch to text mode before handing control to a payload.
388 config VBE_LINEAR_FRAMEBUFFER
389         bool "VESA framebuffer"
390         depends on HAVE_VBE_LINEAR_FRAMEBUFFER
391         help
392           This option keeps the framebuffer mode set after coreboot finishes
393           execution. If this option is enabled, coreboot will pass a
394           framebuffer entry in its coreboot table and the payload will need a
395           compatible driver.
397 config GENERIC_LINEAR_FRAMEBUFFER
398         bool "Linear \"high-resolution\" framebuffer"
399         depends on HAVE_LINEAR_FRAMEBUFFER
400         help
401           This option enables a high-resolution, linear framebuffer. If this
402           option is enabled, coreboot will pass a framebuffer entry in its
403           coreboot table and the payload will need a compatible driver.
405 endchoice
407 # Workaround to have LINEAR_FRAMEBUFFER set in both cases
408 # VBE_LINEAR_FRAMEBUFFER and GENERIC_LINEAR_FRAMEBUFFER.
409 # `kconfig_lint` doesn't let us use the same name with
410 # different texts in the choice above.
411 config LINEAR_FRAMEBUFFER
412         def_bool y
413         depends on VBE_LINEAR_FRAMEBUFFER || GENERIC_LINEAR_FRAMEBUFFER
415 endmenu # "Display"
417 config SMBUS_HAS_AUX_CHANNELS
418         bool
419         default n
421 config PCI
422         bool
423         default n
425 if PCI
427 config NO_MMCONF_SUPPORT
428         bool
429         default n
431 config MMCONF_SUPPORT
432         bool
433         default !NO_MMCONF_SUPPORT
435 config HYPERTRANSPORT_PLUGIN_SUPPORT
436         bool
437         default n
439 config PCIX_PLUGIN_SUPPORT
440         bool
441         default y
443 config CARDBUS_PLUGIN_SUPPORT
444         bool
445         default y
447 config AZALIA_PLUGIN_SUPPORT
448         bool
449         default n
451 config PCIEXP_PLUGIN_SUPPORT
452         bool
453         default y
455 endif # PCI
457 if PCIEXP_PLUGIN_SUPPORT
459 config PCIEXP_COMMON_CLOCK
460         prompt "Enable PCIe Common Clock"
461         bool
462         default n
463         help
464           Detect and enable Common Clock on PCIe links.
466 config PCIEXP_ASPM
467         prompt "Enable PCIe ASPM"
468         bool
469         default n
470         help
471           Detect and enable ASPM (Active State Power Management) on PCIe links.
473 config PCIEXP_CLK_PM
474         prompt "Enable PCIe Clock Power Management"
475         bool
476         default n
477         help
478           Detect and enable Clock Power Management on PCIe.
480 config PCIEXP_L1_SUB_STATE
481         prompt "Enable PCIe ASPM L1 SubState"
482         bool
483         depends on (MMCONF_SUPPORT || PCI_IO_CFG_EXT)
484         default n
485         help
486           Detect and enable ASPM on PCIe links.
488 endif # PCIEXP_PLUGIN_SUPPORT
490 config EARLY_PCI_BRIDGE
491         bool "Early PCI bridge"
492         depends on PCI
493         default n
494         help
495           While coreboot is executing code from ROM, the coreboot resource
496           allocator has not been running yet. Hence PCI devices living behind
497           a bridge are not yet visible to the system.
499           This option enables static configuration for a single pre-defined
500           PCI bridge function on bus 0.
502 if EARLY_PCI_BRIDGE
504 config EARLY_PCI_BRIDGE_DEVICE
505         hex "bridge device"
506         default 0x0
508 config EARLY_PCI_BRIDGE_FUNCTION
509         hex "bridge function"
510         default 0x0
512 config EARLY_PCI_MMIO_BASE
513         hex "MMIO window base"
514         default 0x0
516 endif # EARLY_PCI_BRIDGE
518 config SUBSYSTEM_VENDOR_ID
519         hex "Override PCI Subsystem Vendor ID"
520         depends on PCI
521         default 0x0000
522         help
523           This config option will override the devicetree settings for
524           PCI Subsystem Vendor ID.
526 config SUBSYSTEM_DEVICE_ID
527         hex "Override PCI Subsystem Device ID"
528         depends on PCI
529         default 0x0000
530         help
531           This config option will override the devicetree settings for
532           PCI Subsystem Device ID.
534 config VGA_BIOS
535         bool "Add a VGA BIOS image"
536         depends on ARCH_X86
537         help
538           Select this option if you have a VGA BIOS image that you would
539           like to add to your ROM.
541           You will be able to specify the location and file name of the
542           image later.
544 config VGA_BIOS_FILE
545         string "VGA BIOS path and filename"
546         depends on VGA_BIOS
547         default "vgabios.bin"
548         help
549           The path and filename of the file to use as VGA BIOS.
551 config VGA_BIOS_ID
552         string "VGA device PCI IDs"
553         depends on VGA_BIOS
554         default "1106,3230"
555         help
556           The comma-separated PCI vendor and device ID that would associate
557           your VGA BIOS to your video card.
559           Example: 1106,3230
561           In the above example 1106 is the PCI vendor ID (in hex, but without
562           the "0x" prefix) and 3230 specifies the PCI device ID of the
563           video card (also in hex, without "0x" prefix).
565           Under GNU/Linux you can run `lspci -nn` to list the IDs of your PCI devices.
567 config INTEL_MBI
568         bool "Add an MBI image"
569         depends on NORTHBRIDGE_INTEL_I82830
570         help
571           Select this option if you have an Intel MBI 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 MBI_FILE
578         string "Intel MBI path and filename"
579         depends on INTEL_MBI
580         default "mbi.bin"
581         help
582           The path and filename of the file to use as VGA BIOS.
584 config SOFTWARE_I2C
585         bool "Enable I2C controller emulation in software"
586         default n
587         help
588           This config option will enable code to override the i2c_transfer
589           routine with a (simple) software emulation of the protocol. This may
590           be useful for debugging or on platforms where a driver for the real
591           I2C controller is not (yet) available. The platform code needs to
592           provide bindings to manually toggle I2C lines.
594 endmenu