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