pcengines/apu2: add support for apu4 variant
[coreboot.git] / src / device / Kconfig
blob28298d55d30af79d7c63c1fe4e2bff7592108d9c
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 config RUN_FSP_GOP
86         bool "Run a GOP driver"
87         depends on HAVE_FSP_GOP
88         select HAVE_LINEAR_FRAMEBUFFER
89         help
90           Some platforms (e.g. Intel Braswell and Skylake/Kaby Lake) support
91           to run a GOP blob. This option enables graphics initialization with
92           such a blob.
94 # TODO: Explain differences (if any) for onboard cards.
95 config VGA_ROM_RUN
96         bool "Run VGA Option ROMs"
97         depends on PCI && !MAINBOARD_FORCE_NATIVE_VGA_INIT
98         select HAVE_VGA_TEXT_FRAMEBUFFER
99         help
100           Execute VGA Option ROMs in coreboot if found. This can be used
101           to enable PCI/AGP/PCI-E video cards when not using a SeaBIOS
102           payload.
104           When using a SeaBIOS payload it runs all option ROMs with much
105           more complete BIOS interrupt services available than coreboot,
106           which some option ROMs require in order to function correctly.
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 ON_DEVICE_ROM_LOAD
144         bool "Load Option ROMs on PCI devices"
145         default n if PAYLOAD_SEABIOS
146         default y if !PAYLOAD_SEABIOS
147         depends on VGA_ROM_RUN
148         help
149           Load Option ROMs stored on PCI/PCIe/AGP VGA devices in coreboot.
151           If disabled, only Option ROMs stored in CBFS will be executed by
152           coreboot. If you are concerned about security, you might want to
153           disable this option, but it might leave your system in a state of
154           degraded functionality.
156           When using a SeaBIOS payload it runs all option ROMs with much
157           more complete BIOS interrupt services available than coreboot,
158           which some option ROMs require in order to function correctly.
160           If unsure, say N when using SeaBIOS as payload, Y otherwise.
162 choice
163         prompt "Option ROM execution type"
164         default PCI_OPTION_ROM_RUN_YABEL if !ARCH_X86
165         default PCI_OPTION_ROM_RUN_REALMODE if ARCH_X86
166         depends on VGA_ROM_RUN || GEODE_VSA
168 config PCI_OPTION_ROM_RUN_REALMODE
169         prompt "Native mode"
170         bool
171         depends on ARCH_X86
172         help
173           If you select this option, PCI Option ROMs will be executed
174           natively on the CPU in real mode. No CPU emulation is involved,
175           so this is the fastest, but also the least secure option.
176           (only works on x86/x64 systems)
178 config PCI_OPTION_ROM_RUN_YABEL
179         prompt "Secure mode"
180         bool
181         depends on !GEODE_VSA
182         help
183           If you select this option, the x86emu CPU emulator will be used to
184           execute PCI Option ROMs.
186           This option prevents Option ROMs from doing dirty tricks with the
187           system (such as installing SMM modules or hypervisors), but it is
188           also significantly slower than the native Option ROM initialization
189           method.
191           This is the default choice for non-x86 systems.
193 endchoice
195 config YABEL_PCI_ACCESS_OTHER_DEVICES
196         prompt "Allow Option ROMs to access other devices"
197         bool
198         depends on PCI_OPTION_ROM_RUN_YABEL
199         help
200           Per default, YABEL only allows Option ROMs to access the PCI device
201           that they are associated with. However, this causes trouble for some
202           onboard graphics chips whose Option ROM needs to reconfigure the
203           north bridge.
205 config YABEL_PCI_FAKE_WRITING_OTHER_DEVICES_CONFIG
206         prompt "Fake success on writing other device's config space"
207         bool
208         depends on YABEL_PCI_ACCESS_OTHER_DEVICES
209         help
210           By default, YABEL aborts when the Option ROM tries to write to other
211           devices' config spaces. With this option enabled, the write doesn't
212           follow through, but the Option ROM is allowed to go on.
213           This can create issues such as hanging Option ROMs (if it depends on
214           that other register changing to the written value), so test for
215           impact before using this option.
217 config YABEL_VIRTMEM_LOCATION
218         prompt "Location of YABEL's virtual memory"
219         hex
220         depends on PCI_OPTION_ROM_RUN_YABEL
221         default 0x1000000
222         help
223           YABEL requires 1MB memory for its CPU emulation. This memory is
224           normally located at 16MB.
226 config YABEL_DIRECTHW
227         prompt "Direct hardware access"
228         bool
229         depends on PCI_OPTION_ROM_RUN_YABEL && ARCH_X86
230         help
231           YABEL consists of two parts: It uses x86emu for the CPU emulation and
232           additionally provides a PC system emulation that filters bad device
233           and memory access (such as PCI config space access to other devices
234           than the initialized one).
236           When choosing this option, x86emu will pass through all hardware
237           accesses to memory and I/O devices to the underlying memory and I/O
238           addresses. While this option prevents Option ROMs from doing dirty
239           tricks with the CPU (such as installing SMM modules or hypervisors),
240           they can still access all devices in the system.
241           Enable this option for a good compromise between security and speed.
243 config MULTIPLE_VGA_ADAPTERS
244         bool
245         default n
247 menu "Display"
248         depends on HAVE_VGA_TEXT_FRAMEBUFFER || HAVE_LINEAR_FRAMEBUFFER
250 config FRAMEBUFFER_SET_VESA_MODE
251         prompt "Set framebuffer graphics resolution"
252         bool
253         depends on PCI_OPTION_ROM_RUN_YABEL || PCI_OPTION_ROM_RUN_REALMODE
254         select HAVE_VBE_LINEAR_FRAMEBUFFER
255         help
256           Set VESA/native framebuffer mode (needed for bootsplash and graphical framebuffer console)
258 if FRAMEBUFFER_SET_VESA_MODE
260 choice
261         prompt "framebuffer graphics resolution"
262         default FRAMEBUFFER_VESA_MODE_117
263         help
264           This option sets the resolution used for the coreboot framebuffer (and
265           bootsplash screen).
267 config FRAMEBUFFER_VESA_MODE_100
268         bool "640x400 256-color"
270 config FRAMEBUFFER_VESA_MODE_101
271         bool "640x480 256-color"
273 config FRAMEBUFFER_VESA_MODE_102
274         bool "800x600 16-color"
276 config FRAMEBUFFER_VESA_MODE_103
277         bool "800x600 256-color"
279 config FRAMEBUFFER_VESA_MODE_104
280         bool "1024x768 16-color"
282 config FRAMEBUFFER_VESA_MODE_105
283         bool "1024x768 256-color"
285 config FRAMEBUFFER_VESA_MODE_106
286         bool "1280x1024 16-color"
288 config FRAMEBUFFER_VESA_MODE_107
289         bool "1280x1024 256-color"
291 config FRAMEBUFFER_VESA_MODE_108
292         bool "80x60 text"
294 config FRAMEBUFFER_VESA_MODE_109
295         bool "132x25 text"
297 config FRAMEBUFFER_VESA_MODE_10A
298         bool "132x43 text"
300 config FRAMEBUFFER_VESA_MODE_10B
301         bool "132x50 text"
303 config FRAMEBUFFER_VESA_MODE_10C
304         bool "132x60 text"
306 config FRAMEBUFFER_VESA_MODE_10D
307         bool "320x200 32k-color (1:5:5:5)"
309 config FRAMEBUFFER_VESA_MODE_10E
310         bool "320x200 64k-color (5:6:5)"
312 config FRAMEBUFFER_VESA_MODE_10F
313         bool "320x200 16.8M-color (8:8:8)"
315 config FRAMEBUFFER_VESA_MODE_110
316         bool "640x480 32k-color (1:5:5:5)"
318 config FRAMEBUFFER_VESA_MODE_111
319         bool "640x480 64k-color (5:6:5)"
321 config FRAMEBUFFER_VESA_MODE_112
322         bool "640x480 16.8M-color (8:8:8)"
324 config FRAMEBUFFER_VESA_MODE_113
325         bool "800x600 32k-color (1:5:5:5)"
327 config FRAMEBUFFER_VESA_MODE_114
328         bool "800x600 64k-color (5:6:5)"
330 config FRAMEBUFFER_VESA_MODE_115
331         bool "800x600 16.8M-color (8:8:8)"
333 config FRAMEBUFFER_VESA_MODE_116
334         bool "1024x768 32k-color (1:5:5:5)"
336 config FRAMEBUFFER_VESA_MODE_117
337         bool "1024x768 64k-color (5:6:5)"
339 config FRAMEBUFFER_VESA_MODE_118
340         bool "1024x768 16.8M-color (8:8:8)"
342 config FRAMEBUFFER_VESA_MODE_119
343         bool "1280x1024 32k-color (1:5:5:5)"
345 config FRAMEBUFFER_VESA_MODE_11A
346         bool "1280x1024 64k-color (5:6:5)"
348 config FRAMEBUFFER_VESA_MODE_11B
349         bool "1280x1024 16.8M-color (8:8:8)"
351 config FRAMEBUFFER_VESA_MODE_USER
352         bool "Manually select VESA mode"
354 endchoice
356 # Map the config names to an integer (KB).
357 config FRAMEBUFFER_VESA_MODE
358         prompt "VESA mode" if FRAMEBUFFER_VESA_MODE_USER
359         hex
360         default 0x100 if FRAMEBUFFER_VESA_MODE_100
361         default 0x101 if FRAMEBUFFER_VESA_MODE_101
362         default 0x102 if FRAMEBUFFER_VESA_MODE_102
363         default 0x103 if FRAMEBUFFER_VESA_MODE_103
364         default 0x104 if FRAMEBUFFER_VESA_MODE_104
365         default 0x105 if FRAMEBUFFER_VESA_MODE_105
366         default 0x106 if FRAMEBUFFER_VESA_MODE_106
367         default 0x107 if FRAMEBUFFER_VESA_MODE_107
368         default 0x108 if FRAMEBUFFER_VESA_MODE_108
369         default 0x109 if FRAMEBUFFER_VESA_MODE_109
370         default 0x10A if FRAMEBUFFER_VESA_MODE_10A
371         default 0x10B if FRAMEBUFFER_VESA_MODE_10B
372         default 0x10C if FRAMEBUFFER_VESA_MODE_10C
373         default 0x10D if FRAMEBUFFER_VESA_MODE_10D
374         default 0x10E if FRAMEBUFFER_VESA_MODE_10E
375         default 0x10F if FRAMEBUFFER_VESA_MODE_10F
376         default 0x110 if FRAMEBUFFER_VESA_MODE_110
377         default 0x111 if FRAMEBUFFER_VESA_MODE_111
378         default 0x112 if FRAMEBUFFER_VESA_MODE_112
379         default 0x113 if FRAMEBUFFER_VESA_MODE_113
380         default 0x114 if FRAMEBUFFER_VESA_MODE_114
381         default 0x115 if FRAMEBUFFER_VESA_MODE_115
382         default 0x116 if FRAMEBUFFER_VESA_MODE_116
383         default 0x117 if FRAMEBUFFER_VESA_MODE_117
384         default 0x118 if FRAMEBUFFER_VESA_MODE_118
385         default 0x119 if FRAMEBUFFER_VESA_MODE_119
386         default 0x11A if FRAMEBUFFER_VESA_MODE_11A
387         default 0x11B if FRAMEBUFFER_VESA_MODE_11B
388         default 0x117 if FRAMEBUFFER_VESA_MODE_USER
390 config BOOTSPLASH
391         prompt "Show graphical bootsplash"
392         bool
393         help
394           This option shows a graphical bootsplash screen. The graphics are
395           loaded from the CBFS file bootsplash.jpg.
397           You can either specify the location and file name of the
398           image in the 'General' section or add it manually to CBFS, using,
399           for example, cbfstool.
401 endif # FRAMEBUFFER_SET_VESA_MODE
403 choice
404         prompt "Framebuffer mode"
405         default VGA_TEXT_FRAMEBUFFER
407 config VGA_TEXT_FRAMEBUFFER
408         bool "Legacy VGA text mode"
409         depends on HAVE_VGA_TEXT_FRAMEBUFFER
410         help
411           If this option is enabled, coreboot will initialize graphics in
412           legacy VGA text mode or, if a VGA BIOS is used and a VESA mode set,
413           switch to text mode before handing control to a payload.
415 config VBE_LINEAR_FRAMEBUFFER
416         bool "VESA framebuffer"
417         depends on HAVE_VBE_LINEAR_FRAMEBUFFER
418         help
419           This option keeps the framebuffer mode set after coreboot finishes
420           execution. If this option is enabled, coreboot will pass a
421           framebuffer entry in its coreboot table and the payload will need a
422           compatible driver.
424 config GENERIC_LINEAR_FRAMEBUFFER
425         bool "Linear \"high-resolution\" framebuffer"
426         depends on HAVE_LINEAR_FRAMEBUFFER
427         help
428           This option enables a high-resolution, linear framebuffer. If this
429           option is enabled, coreboot will pass a framebuffer entry in its
430           coreboot table and the payload will need a compatible driver.
432 endchoice
434 # Workaround to have LINEAR_FRAMEBUFFER set in both cases
435 # VBE_LINEAR_FRAMEBUFFER and GENERIC_LINEAR_FRAMEBUFFER.
436 # `kconfig_lint` doesn't let us use the same name with
437 # different texts in the choice above.
438 config LINEAR_FRAMEBUFFER
439         def_bool y
440         depends on VBE_LINEAR_FRAMEBUFFER || GENERIC_LINEAR_FRAMEBUFFER
442 endmenu # "Display"
444 config SMBUS_HAS_AUX_CHANNELS
445         bool
446         default n
448 config PCI
449         bool
450         default n
452 if PCI
454 config NO_MMCONF_SUPPORT
455         bool
456         default n
458 config MMCONF_SUPPORT
459         bool
460         default !NO_MMCONF_SUPPORT
462 config HYPERTRANSPORT_PLUGIN_SUPPORT
463         bool
464         default n
466 config PCIX_PLUGIN_SUPPORT
467         bool
468         default y
470 config CARDBUS_PLUGIN_SUPPORT
471         bool
472         default y
474 config AZALIA_PLUGIN_SUPPORT
475         bool
476         default n
478 config PCIEXP_PLUGIN_SUPPORT
479         bool
480         default y
482 endif # PCI
484 if PCIEXP_PLUGIN_SUPPORT
486 config PCIEXP_COMMON_CLOCK
487         prompt "Enable PCIe Common Clock"
488         bool
489         default n
490         help
491           Detect and enable Common Clock on PCIe links.
493 config PCIEXP_ASPM
494         prompt "Enable PCIe ASPM"
495         bool
496         default n
497         help
498           Detect and enable ASPM (Active State Power Management) on PCIe links.
500 config PCIEXP_CLK_PM
501         prompt "Enable PCIe Clock Power Management"
502         bool
503         default n
504         help
505           Detect and enable Clock Power Management on PCIe.
507 config PCIEXP_L1_SUB_STATE
508         prompt "Enable PCIe ASPM L1 SubState"
509         bool
510         depends on (MMCONF_SUPPORT || PCI_IO_CFG_EXT)
511         default n
512         help
513           Detect and enable ASPM on PCIe links.
515 endif # PCIEXP_PLUGIN_SUPPORT
517 config EARLY_PCI_BRIDGE
518         bool "Early PCI bridge"
519         depends on PCI
520         default n
521         help
522           While coreboot is executing code from ROM, the coreboot resource
523           allocator has not been running yet. Hence PCI devices living behind
524           a bridge are not yet visible to the system.
526           This option enables static configuration for a single pre-defined
527           PCI bridge function on bus 0.
529 if EARLY_PCI_BRIDGE
531 config EARLY_PCI_BRIDGE_DEVICE
532         hex "bridge device"
533         default 0x0
535 config EARLY_PCI_BRIDGE_FUNCTION
536         hex "bridge function"
537         default 0x0
539 config EARLY_PCI_MMIO_BASE
540         hex "MMIO window base"
541         default 0x0
543 endif # EARLY_PCI_BRIDGE
545 config SUBSYSTEM_VENDOR_ID
546         hex "Override PCI Subsystem Vendor ID"
547         depends on PCI
548         default 0x0000
549         help
550           This config option will override the devicetree settings for
551           PCI Subsystem Vendor ID.
553 config SUBSYSTEM_DEVICE_ID
554         hex "Override PCI Subsystem Device ID"
555         depends on PCI
556         default 0x0000
557         help
558           This config option will override the devicetree settings for
559           PCI Subsystem Device ID.
561 config VGA_BIOS
562         bool "Add a VGA BIOS image"
563         depends on ARCH_X86
564         help
565           Select this option if you have a VGA BIOS image that you would
566           like to add to your ROM.
568           You will be able to specify the location and file name of the
569           image later.
571 config VGA_BIOS_FILE
572         string "VGA BIOS path and filename"
573         depends on VGA_BIOS
574         default "vgabios.bin"
575         help
576           The path and filename of the file to use as VGA BIOS.
578 config VGA_BIOS_ID
579         string "VGA device PCI IDs"
580         depends on VGA_BIOS
581         default "1106,3230"
582         help
583           The comma-separated PCI vendor and device ID that would associate
584           your VGA BIOS to your video card.
586           Example: 1106,3230
588           In the above example 1106 is the PCI vendor ID (in hex, but without
589           the "0x" prefix) and 3230 specifies the PCI device ID of the
590           video card (also in hex, without "0x" prefix).
592           Under GNU/Linux you can run `lspci -nn` to list the IDs of your PCI devices.
594 config INTEL_GMA_ADD_VBT_DATA_FILE
595         depends on SOC_INTEL_COMMON || CPU_INTEL_COMMON
596         bool "Add a Video Bios Table (VBT) binary to CBFS"
597         help
598           Add a VBT data file to CBFS. The VBT describes the integrated
599           GPU and connections, and is needed by the GOP driver integrated into
600           FSP and the OS driver in order to initialize the display.
602 config INTEL_GMA_VBT_FILE
603         string "VBT binary path and filename"
604         depends on INTEL_GMA_ADD_VBT_DATA_FILE
605         help
606           The path and filename of the VBT binary.
608 config INTEL_MBI
609         bool "Add an MBI image"
610         depends on NORTHBRIDGE_INTEL_I82830
611         help
612           Select this option if you have an Intel MBI image that you would
613           like to add to your ROM.
615           You will be able to specify the location and file name of the
616           image later.
618 config MBI_FILE
619         string "Intel MBI path and filename"
620         depends on INTEL_MBI
621         default "mbi.bin"
622         help
623           The path and filename of the file to use as VGA BIOS.
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