1 # SPDX-License-Identifier: GPL-2.0
2 #
3 # ACPI Configuration
4 #
5 
6 config ARCH_SUPPORTS_ACPI
7 	bool
8 
9 menuconfig ACPI
10 	bool "ACPI (Advanced Configuration and Power Interface) Support"
11 	depends on ARCH_SUPPORTS_ACPI
12 	select PNP
13 	select NLS
14 	select CRC32
15 	select FIRMWARE_TABLE
16 	default y if X86
17 	help
18 	  Advanced Configuration and Power Interface (ACPI) support for
19 	  Linux requires an ACPI-compliant platform (hardware/firmware),
20 	  and assumes the presence of OS-directed configuration and power
21 	  management (OSPM) software.  This option will enlarge your
22 	  kernel by about 70K.
23 
24 	  Linux ACPI provides a robust functional replacement for several
25 	  legacy configuration and power management interfaces, including
26 	  the Plug-and-Play BIOS specification (PnP BIOS), the
27 	  MultiProcessor Specification (MPS), and the Advanced Power
28 	  Management (APM) specification.  If both ACPI and APM support
29 	  are configured, ACPI is used.
30 
31 	  Linux support for ACPI is based on Intel Corporation's ACPI
32 	  Component Architecture (ACPI CA).  For more information on the
33 	  ACPI CA, see:
34 	  <https://acpica.org/>
35 
36 	  ACPI is an open industry specification originally co-developed by
37 	  Hewlett-Packard, Intel, Microsoft, Phoenix, and Toshiba. Currently,
38 	  it is developed by the ACPI Specification Working Group (ASWG) under
39 	  the UEFI Forum and any UEFI member can join the ASWG and contribute
40 	  to the ACPI specification.
41 	  The specification is available at:
42 	  <https://uefi.org/specifications>
43 
44 if ACPI
45 
46 config ACPI_LEGACY_TABLES_LOOKUP
47 	bool
48 
49 config ARCH_MIGHT_HAVE_ACPI_PDC
50 	bool
51 
52 config ACPI_GENERIC_GSI
53 	bool
54 
55 config ACPI_SYSTEM_POWER_STATES_SUPPORT
56 	bool
57 
58 config ACPI_CCA_REQUIRED
59 	bool
60 
61 config ACPI_TABLE_LIB
62 	bool
63 
64 config ACPI_THERMAL_LIB
65        depends on THERMAL
66        bool
67 
68 config ACPI_DEBUGGER
69 	bool "AML debugger interface"
70 	select ACPI_DEBUG
71 	help
72 	  Enable in-kernel debugging of AML facilities: statistics,
73 	  internal object dump, single step control method execution.
74 	  This is still under development, currently enabling this only
75 	  results in the compilation of the ACPICA debugger files.
76 
77 if ACPI_DEBUGGER
78 
79 config ACPI_DEBUGGER_USER
80 	tristate "Userspace debugger accessibility"
81 	depends on DEBUG_FS
82 	help
83 	  Export /sys/kernel/debug/acpi/acpidbg for userspace utilities
84 	  to access the debugger functionalities.
85 
86 endif
87 
88 config ACPI_SPCR_TABLE
89 	bool "ACPI Serial Port Console Redirection Support"
90 	default y if X86
91 	help
92 	  Enable support for Serial Port Console Redirection (SPCR) Table.
93 	  This table provides information about the configuration of the
94 	  earlycon console.
95 
96 config ACPI_FPDT
97 	bool "ACPI Firmware Performance Data Table (FPDT) support"
98 	depends on X86_64 || ARM64
99 	help
100 	  Enable support for the Firmware Performance Data Table (FPDT).
101 	  This table provides information on the timing of the system
102 	  boot, S3 suspend and S3 resume firmware code paths.
103 
104 config ACPI_LPIT
105 	bool
106 	depends on X86_64
107 	default y
108 
109 config ACPI_SLEEP
110 	bool
111 	depends on SUSPEND || HIBERNATION
112 	depends on ACPI_SYSTEM_POWER_STATES_SUPPORT
113 	default y
114 
115 config ACPI_REV_OVERRIDE_POSSIBLE
116 	bool "Allow supported ACPI revision to be overridden"
117 	depends on X86
118 	default y
119 	help
120 	  The platform firmware on some systems expects Linux to return "5" as
121 	  the supported ACPI revision which makes it expose system configuration
122 	  information in a special way.
123 
124 	  For example, based on what ACPI exports as the supported revision,
125 	  Dell XPS 13 (2015) configures its audio device to either work in HDA
126 	  mode or in I2S mode, where the former is supposed to be used on Linux
127 	  until the latter is fully supported (in the kernel as well as in user
128 	  space).
129 
130 	  This option enables a DMI-based quirk for the above Dell machine (so
131 	  that HDA audio is exposed by the platform firmware to the kernel) and
132 	  makes it possible to force the kernel to return "5" as the supported
133 	  ACPI revision via the "acpi_rev_override" command line switch.
134 
135 config ACPI_EC_DEBUGFS
136 	tristate "EC read/write access through /sys/kernel/debug/ec"
137 	help
138 	  Say N to disable Embedded Controller /sys/kernel/debug interface
139 
140 	  Be aware that using this interface can confuse your Embedded
141 	  Controller in a way that a normal reboot is not enough. You then
142 	  have to power off your system, and remove the laptop battery for
143 	  some seconds.
144 	  An Embedded Controller typically is available on laptops and reads
145 	  sensor values like battery state and temperature.
146 	  The kernel accesses the EC through ACPI parsed code provided by BIOS
147 	  tables. This option allows to access the EC directly without ACPI
148 	  code being involved.
149 	  Thus this option is a debug option that helps to write ACPI drivers
150 	  and can be used to identify ACPI code or EC firmware bugs.
151 
152 config ACPI_AC
153 	tristate "AC Adapter"
154 	select POWER_SUPPLY
155 	default y
156 	help
157 	  This driver supports the AC Adapter object, which indicates
158 	  whether a system is on AC or not.  If you have a system that can
159 	  switch between A/C and battery, say Y.
160 
161 	  To compile this driver as a module, choose M here:
162 	  the module will be called ac.
163 
164 config ACPI_BATTERY
165 	tristate "Battery"
166 	select POWER_SUPPLY
167 	default y
168 	help
169 	  This driver adds support for battery information through
170 	  /proc/acpi/battery. If you have a mobile system with a battery,
171 	  say Y.
172 
173 	  To compile this driver as a module, choose M here:
174 	  the module will be called battery.
175 
176 config ACPI_BUTTON
177 	tristate "Button"
178 	depends on INPUT
179 	default y
180 	help
181 	  This driver handles events on the power, sleep, and lid buttons.
182 	  A daemon reads events from input devices or via netlink and
183 	  performs user-defined actions such as shutting down the system.
184 	  This is necessary for software-controlled poweroff.
185 
186 	  To compile this driver as a module, choose M here:
187 	  the module will be called button.
188 
189 config ACPI_TINY_POWER_BUTTON
190 	tristate "Tiny Power Button Driver"
191 	depends on !ACPI_BUTTON
192 	help
193 	  This driver provides a tiny alternative to the ACPI Button driver.
194 	  The tiny power button driver only handles the power button. Rather
195 	  than notifying userspace via the input layer or a netlink event, this
196 	  driver directly signals the init process to shut down.
197 
198 	  This driver is particularly suitable for cloud and VM environments,
199 	  which use a simulated power button to initiate a controlled poweroff,
200 	  but which may not want to run a separate userspace daemon to process
201 	  input events.
202 
203 config ACPI_TINY_POWER_BUTTON_SIGNAL
204 	int "Tiny Power Button Signal"
205 	depends on ACPI_TINY_POWER_BUTTON
206 	default 38
207 	help
208 	  Default signal to send to init in response to the power button.
209 
210 	  Likely values here include 38 (SIGRTMIN+4) to power off, or 2
211 	  (SIGINT) to simulate Ctrl+Alt+Del.
212 
213 config ACPI_VIDEO
214 	tristate "Video"
215 	depends on BACKLIGHT_CLASS_DEVICE
216 	depends on INPUT
217 	depends on ACPI_WMI || !X86
218 	select THERMAL
219 	help
220 	  This driver implements the ACPI Extensions For Display Adapters
221 	  for integrated graphics devices on motherboard, as specified in
222 	  ACPI 2.0 Specification, Appendix B.  This supports basic operations
223 	  such as defining the video POST device, retrieving EDID information,
224 	  and setting up a video output.
225 
226 	  To compile this driver as a module, choose M here:
227 	  the module will be called video.
228 
229 config ACPI_FAN
230 	tristate "Fan"
231 	depends on THERMAL
232 	default y
233 	help
234 	  This driver supports ACPI fan devices, allowing user-mode
235 	  applications to perform basic fan control (on, off, status).
236 
237 	  To compile this driver as a module, choose M here:
238 	  the module will be called fan.
239 
240 config ACPI_TAD
241 	tristate "ACPI Time and Alarm (TAD) Device Support"
242 	depends on SYSFS && PM_SLEEP
243 	help
244 	  The ACPI Time and Alarm (TAD) device is an alternative to the Real
245 	  Time Clock (RTC).  Its wake timers allow the system to transition from
246 	  the S3 (or optionally S4/S5) state to S0 state after a time period
247 	  elapses.  In comparison with the RTC Alarm, the TAD provides a larger
248 	  scale of flexibility in the wake timers.  The time capabilities of the
249 	  TAD maintain the time of day information across platform power
250 	  transitions, and keep track of time even when the platform is turned
251 	  off.
252 
253 config ACPI_DOCK
254 	bool "Dock"
255 	help
256 	  This driver supports ACPI-controlled docking stations and removable
257 	  drive bays such as the IBM Ultrabay and the Dell Module Bay.
258 
259 config ACPI_CPU_FREQ_PSS
260 	bool
261 
262 config ACPI_PROCESSOR_CSTATE
263 	def_bool y
264 	depends on ACPI_PROCESSOR
265 	depends on X86
266 
267 config ACPI_PROCESSOR_IDLE
268 	bool
269 	select CPU_IDLE
270 
271 config ACPI_MCFG
272 	bool
273 
274 config ACPI_CPPC_LIB
275 	bool
276 	depends on ACPI_PROCESSOR
277 	select MAILBOX
278 	select PCC
279 	help
280 	  If this option is enabled, this file implements common functionality
281 	  to parse CPPC tables as described in the ACPI 5.1+ spec. The
282 	  routines implemented are meant to be used by other
283 	  drivers to control CPU performance using CPPC semantics.
284 	  If your platform does not support CPPC in firmware,
285 	  leave this option disabled.
286 
287 config ACPI_PROCESSOR
288 	tristate "Processor"
289 	depends on X86 || ARM64 || LOONGARCH || RISCV
290 	select ACPI_PROCESSOR_IDLE
291 	select ACPI_CPU_FREQ_PSS if X86 || LOONGARCH
292 	select THERMAL
293 	default y
294 	help
295 	  This driver adds support for the ACPI Processor package. It is required
296 	  by several flavors of cpufreq performance-state, thermal, throttling and
297 	  idle drivers.
298 
299 	  To compile this driver as a module, choose M here:
300 	  the module will be called processor.
301 
302 config ACPI_IPMI
303 	tristate "IPMI"
304 	depends on IPMI_HANDLER
305 	help
306 	  This driver enables the ACPI to access the BMC controller. And it
307 	  uses the IPMI request/response message to communicate with BMC
308 	  controller, which can be found on the server.
309 
310 	  To compile this driver as a module, choose M here:
311 	  the module will be called as acpi_ipmi.
312 
313 config ACPI_HOTPLUG_CPU
314 	bool
315 	depends on ACPI_PROCESSOR && HOTPLUG_CPU
316 	select ACPI_CONTAINER
317 
318 config ACPI_PROCESSOR_AGGREGATOR
319 	tristate "Processor Aggregator"
320 	depends on ACPI_PROCESSOR
321 	depends on X86
322 	help
323 	  ACPI 4.0 defines processor Aggregator, which enables OS to perform
324 	  specific processor configuration and control that applies to all
325 	  processors in the platform. Currently only logical processor idling
326 	  is defined, which is to reduce power consumption. This driver
327 	  supports the new device.
328 
329 config ACPI_THERMAL
330 	tristate "Thermal Zone"
331 	depends on ACPI_PROCESSOR
332 	select THERMAL
333 	select ACPI_THERMAL_LIB
334 	default y
335 	help
336 	  This driver supports ACPI thermal zones.  Most mobile and
337 	  some desktop systems support ACPI thermal zones.  It is HIGHLY
338 	  recommended that this option be enabled, as your processor(s)
339 	  may be damaged without it.
340 
341 	  To compile this driver as a module, choose M here:
342 	  the module will be called thermal.
343 
344 config ACPI_PLATFORM_PROFILE
345 	tristate
346 
347 config ACPI_CUSTOM_DSDT_FILE
348 	string "Custom DSDT Table file to include"
349 	default ""
350 	depends on !STANDALONE
351 	help
352 	  This option supports a custom DSDT by linking it into the kernel.
353 
354 	  Enter the full path name to the file which includes the AmlCode
355 	  or dsdt_aml_code declaration.
356 
357 	  If unsure, don't enter a file name.
358 
359 config ACPI_CUSTOM_DSDT
360 	bool
361 	default ACPI_CUSTOM_DSDT_FILE != ""
362 
363 config ARCH_HAS_ACPI_TABLE_UPGRADE
364 	def_bool n
365 
366 config ACPI_TABLE_UPGRADE
367 	bool "Allow upgrading ACPI tables via initrd"
368 	depends on BLK_DEV_INITRD && ARCH_HAS_ACPI_TABLE_UPGRADE
369 	default y
370 	help
371 	  This option provides functionality to upgrade arbitrary ACPI tables
372 	  via initrd. No functional change if no ACPI tables are passed via
373 	  initrd, therefore it's safe to say Y.
374 	  See Documentation/admin-guide/acpi/initrd_table_override.rst for details
375 
376 config ACPI_TABLE_OVERRIDE_VIA_BUILTIN_INITRD
377 	bool "Override ACPI tables from built-in initrd"
378 	depends on ACPI_TABLE_UPGRADE
379 	depends on INITRAMFS_SOURCE!="" && INITRAMFS_COMPRESSION_NONE
380 	help
381 	  This option provides functionality to override arbitrary ACPI tables
382 	  from built-in uncompressed initrd.
383 
384 	  See Documentation/admin-guide/acpi/initrd_table_override.rst for details
385 
386 config ACPI_DEBUG
387 	bool "Debug Statements"
388 	help
389 	  The ACPI subsystem can produce debug output.  Saying Y enables this
390 	  output and increases the kernel size by around 50K.
391 
392 	  Use the acpi.debug_layer and acpi.debug_level kernel command-line
393 	  parameters documented in Documentation/firmware-guide/acpi/debug.rst and
394 	  Documentation/admin-guide/kernel-parameters.rst to control the type and
395 	  amount of debug output.
396 
397 config ACPI_PCI_SLOT
398 	bool "PCI slot detection driver"
399 	depends on SYSFS && PCI
400 	help
401 	  This driver creates entries in /sys/bus/pci/slots/ for all PCI
402 	  slots in the system.  This can help correlate PCI bus addresses,
403 	  i.e., segment/bus/device/function tuples, with physical slots in
404 	  the system.  If you are unsure, say N.
405 
406 config ACPI_CONTAINER
407 	bool "Container and Module Devices"
408 	default (ACPI_HOTPLUG_MEMORY || ACPI_HOTPLUG_CPU)
409 	help
410 	  This driver supports ACPI Container and Module devices (IDs
411 	  ACPI0004, PNP0A05, and PNP0A06).
412 
413 	  This helps support hotplug of nodes, CPUs, and memory.
414 
415 config ACPI_HOTPLUG_MEMORY
416 	bool "Memory Hotplug"
417 	depends on MEMORY_HOTPLUG
418 	help
419 	  This driver supports ACPI memory hotplug.  The driver
420 	  fields notifications on ACPI memory devices (PNP0C80),
421 	  which represent memory ranges that may be onlined or
422 	  offlined during runtime.
423 
424 	  If your hardware and firmware do not support adding or
425 	  removing memory devices at runtime, you need not enable
426 	  this driver.
427 
428 config ACPI_HOTPLUG_IOAPIC
429 	bool
430 	depends on PCI
431 	depends on X86_IO_APIC
432 	default y
433 
434 config ACPI_SBS
435 	tristate "Smart Battery System"
436 	depends on X86
437 	select POWER_SUPPLY
438 	help
439 	  This driver supports the Smart Battery System, another
440 	  type of access to battery information, found on some laptops.
441 
442 	  To compile this driver as a module, choose M here:
443 	  the modules will be called sbs and sbshc.
444 
445 config ACPI_HED
446 	tristate "Hardware Error Device"
447 	help
448 	  This driver supports the Hardware Error Device (PNP0C33),
449 	  which is used to report some hardware errors notified via
450 	  SCI, mainly the corrected errors.
451 
452 config ACPI_BGRT
453 	bool "Boottime Graphics Resource Table support"
454 	depends on EFI && (X86 || ARM64 || LOONGARCH)
455 	help
456 	  This driver adds support for exposing the ACPI Boottime Graphics
457 	  Resource Table, which allows the operating system to obtain
458 	  data from the firmware boot splash. It will appear under
459 	  /sys/firmware/acpi/bgrt/ .
460 
461 config ACPI_REDUCED_HARDWARE_ONLY
462 	bool "Hardware-reduced ACPI support only" if EXPERT
463 	help
464 	  This config item changes the way the ACPI code is built.  When this
465 	  option is selected, the kernel will use a specialized version of
466 	  ACPICA that ONLY supports the ACPI "reduced hardware" mode.  The
467 	  resulting kernel will be smaller but it will also be restricted to
468 	  running in ACPI reduced hardware mode ONLY.
469 
470 	  If you are unsure what to do, do not enable this option.
471 
472 config ACPI_NHLT
473 	bool
474 
475 source "drivers/acpi/nfit/Kconfig"
476 source "drivers/acpi/numa/Kconfig"
477 source "drivers/acpi/apei/Kconfig"
478 source "drivers/acpi/dptf/Kconfig"
479 
480 config ACPI_WATCHDOG
481 	bool
482 
483 config ACPI_EXTLOG
484 	tristate "Extended Error Log support"
485 	depends on X86_MCE && X86_LOCAL_APIC && EDAC
486 	select UEFI_CPER
487 	help
488 	  Certain usages such as Predictive Failure Analysis (PFA) require
489 	  more information about the error than what can be described in
490 	  processor machine check banks. Most server processors log
491 	  additional information about the error in processor uncore
492 	  registers. Since the addresses and layout of these registers vary
493 	  widely from one processor to another, system software cannot
494 	  readily make use of them. To complicate matters further, some of
495 	  the additional error information cannot be constructed without
496 	  detailed knowledge about platform topology.
497 
498 	  Enhanced MCA Logging allows firmware to provide additional error
499 	  information to system software, synchronous with MCE or CMCI. This
500 	  driver adds support for that functionality with corresponding
501 	  tracepoint which carries that information to userspace.
502 
503 config ACPI_ADXL
504 	bool
505 
506 config ACPI_CONFIGFS
507 	tristate "ACPI configfs support"
508 	select CONFIGFS_FS
509 	help
510 	  Select this option to enable support for ACPI configuration from
511 	  userspace. The configurable ACPI groups will be visible under
512 	  /config/acpi, assuming configfs is mounted under /config.
513 
514 config ACPI_PFRUT
515 	tristate "ACPI Platform Firmware Runtime Update and Telemetry"
516 	depends on 64BIT
517 	help
518 	  This mechanism allows certain pieces of the platform firmware
519 	  to be updated on the fly while the system is running (runtime)
520 	  without the need to restart it, which is key in the cases when
521 	  the system needs to be available 100% of the time and it cannot
522 	  afford the downtime related to restarting it, or when the work
523 	  carried out by the system is particularly important, so it cannot
524 	  be interrupted, and it is not practical to wait until it is complete.
525 
526 	  The existing firmware code can be modified (driver update) or
527 	  extended by adding new code to the firmware (code injection).
528 
529 	  Besides, the telemetry driver allows user space to fetch telemetry
530 	  data from the firmware with the help of the Platform Firmware Runtime
531 	  Telemetry interface.
532 
533 	  To compile the drivers as modules, choose M here:
534 	  the modules will be called pfr_update and pfr_telemetry.
535 
536 if ARM64
537 source "drivers/acpi/arm64/Kconfig"
538 endif
539 
540 config ACPI_PPTT
541 	bool
542 
543 config ACPI_PCC
544 	bool "ACPI PCC Address Space"
545 	depends on PCC
546 	default y
547 	help
548 	  The PCC Address Space also referred as PCC Operation Region pertains
549 	  to the region of PCC subspace that succeeds the PCC signature.
550 
551 	  The PCC Operation Region works in conjunction with the PCC Table
552 	  (Platform Communications Channel Table). PCC subspaces that are
553 	  marked for use as PCC Operation Regions must not be used as PCC
554 	  subspaces for the standard ACPI features such as CPPC, RASF, PDTT and
555 	  MPST. These standard features must always use the PCC Table instead.
556 
557 	  Enable this feature if you want to set up and install the PCC Address
558 	  Space handler to handle PCC OpRegion in the firmware.
559 
560 config ACPI_FFH
561 	bool "ACPI FFH Address Space"
562 	default n
563 	help
564 	  The FFH(Fixed Function Hardware) Address Space also referred as FFH
565 	  Operation Region allows to define platform specific opregion.
566 
567 	  Enable this feature if you want to set up and install the FFH Address
568 	  Space handler to handle FFH OpRegion in the firmware.
569 
570 source "drivers/acpi/pmic/Kconfig"
571 
572 config ACPI_VIOT
573 	bool
574 
575 config ACPI_PRMT
576 	bool "Platform Runtime Mechanism Support"
577 	depends on EFI_RUNTIME_WRAPPERS && (X86_64 || ARM64)
578 	default y
579 	help
580 	  Platform Runtime Mechanism (PRM) is a firmware interface exposing a
581 	  set of binary executables that can be called from the AML interpreter
582 	  or directly from device drivers.
583 
584 	  Say Y to enable the AML interpreter to execute the PRM code.
585 
586 	  While this feature is optional in principle, leaving it out may
587 	  substantially increase computational overhead related to the
588 	  initialization of some server systems.
589 
590 endif	# ACPI
591 
592 config X86_PM_TIMER
593 	bool "Power Management Timer Support" if EXPERT
594 	depends on X86 && (ACPI || JAILHOUSE_GUEST)
595 	default y
596 	help
597 	  The Power Management Timer is available on all ACPI-capable,
598 	  in most cases even if ACPI is unusable or blacklisted.
599 
600 	  This timing source is not affected by power management features
601 	  like aggressive processor idling, throttling, frequency and/or
602 	  voltage scaling, unlike the commonly used Time Stamp Counter
603 	  (TSC) timing source.
604 
605 	  You should nearly always say Y here because many modern
606 	  systems require this timer.
607