18c2ecf20Sopenharmony_ciWhat: /sys/firmware/acpi/bgrt/ 28c2ecf20Sopenharmony_ciDate: January 2012 38c2ecf20Sopenharmony_ciContact: Matthew Garrett <mjg@redhat.com> 48c2ecf20Sopenharmony_ciDescription: 58c2ecf20Sopenharmony_ci The BGRT is an ACPI 5.0 feature that allows the OS 68c2ecf20Sopenharmony_ci to obtain a copy of the firmware boot splash and 78c2ecf20Sopenharmony_ci some associated metadata. This is intended to be used 88c2ecf20Sopenharmony_ci by boot splash applications in order to interact with 98c2ecf20Sopenharmony_ci the firmware boot splash in order to avoid jarring 108c2ecf20Sopenharmony_ci transitions. 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci image: The image bitmap. Currently a 32-bit BMP. 138c2ecf20Sopenharmony_ci status: 1 if the image is valid, 0 if firmware invalidated it. 148c2ecf20Sopenharmony_ci type: 0 indicates image is in BMP format. 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci ======== =================================================== 178c2ecf20Sopenharmony_ci version: The version of the BGRT. Currently 1. 188c2ecf20Sopenharmony_ci xoffset: The number of pixels between the left of the screen 198c2ecf20Sopenharmony_ci and the left edge of the image. 208c2ecf20Sopenharmony_ci yoffset: The number of pixels between the top of the screen 218c2ecf20Sopenharmony_ci and the top edge of the image. 228c2ecf20Sopenharmony_ci ======== =================================================== 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ciWhat: /sys/firmware/acpi/hotplug/ 258c2ecf20Sopenharmony_ciDate: February 2013 268c2ecf20Sopenharmony_ciContact: Rafael J. Wysocki <rafael.j.wysocki@intel.com> 278c2ecf20Sopenharmony_ciDescription: 288c2ecf20Sopenharmony_ci There are separate hotplug profiles for different classes of 298c2ecf20Sopenharmony_ci devices supported by ACPI, such as containers, memory modules, 308c2ecf20Sopenharmony_ci processors, PCI root bridges etc. A hotplug profile for a given 318c2ecf20Sopenharmony_ci class of devices is a collection of settings defining the way 328c2ecf20Sopenharmony_ci that class of devices will be handled by the ACPI core hotplug 338c2ecf20Sopenharmony_ci code. Those profiles are represented in sysfs as subdirectories 348c2ecf20Sopenharmony_ci of /sys/firmware/acpi/hotplug/. 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci The following setting is available to user space for each 378c2ecf20Sopenharmony_ci hotplug profile: 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci ======== ======================================================= 408c2ecf20Sopenharmony_ci enabled: If set, the ACPI core will handle notifications of 418c2ecf20Sopenharmony_ci hotplug events associated with the given class of 428c2ecf20Sopenharmony_ci devices and will allow those devices to be ejected with 438c2ecf20Sopenharmony_ci the help of the _EJ0 control method. Unsetting it 448c2ecf20Sopenharmony_ci effectively disables hotplug for the correspoinding 458c2ecf20Sopenharmony_ci class of devices. 468c2ecf20Sopenharmony_ci ======== ======================================================= 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci The value of the above attribute is an integer number: 1 (set) 498c2ecf20Sopenharmony_ci or 0 (unset). Attempts to write any other values to it will 508c2ecf20Sopenharmony_ci cause -EINVAL to be returned. 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ciWhat: /sys/firmware/acpi/interrupts/ 538c2ecf20Sopenharmony_ciDate: February 2008 548c2ecf20Sopenharmony_ciContact: Len Brown <lenb@kernel.org> 558c2ecf20Sopenharmony_ciDescription: 568c2ecf20Sopenharmony_ci All ACPI interrupts are handled via a single IRQ, 578c2ecf20Sopenharmony_ci the System Control Interrupt (SCI), which appears 588c2ecf20Sopenharmony_ci as "acpi" in /proc/interrupts. 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ci However, one of the main functions of ACPI is to make 618c2ecf20Sopenharmony_ci the platform understand random hardware without 628c2ecf20Sopenharmony_ci special driver support. So while the SCI handles a few 638c2ecf20Sopenharmony_ci well known (fixed feature) interrupts sources, such 648c2ecf20Sopenharmony_ci as the power button, it can also handle a variable 658c2ecf20Sopenharmony_ci number of a "General Purpose Events" (GPE). 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_ci A GPE vectors to a specified handler in AML, which 688c2ecf20Sopenharmony_ci can do a anything the BIOS writer wants from 698c2ecf20Sopenharmony_ci OS context. GPE 0x12, for example, would vector 708c2ecf20Sopenharmony_ci to a level or edge handler called _L12 or _E12. 718c2ecf20Sopenharmony_ci The handler may do its business and return. 728c2ecf20Sopenharmony_ci Or the handler may send send a Notify event 738c2ecf20Sopenharmony_ci to a Linux device driver registered on an ACPI device, 748c2ecf20Sopenharmony_ci such as a battery, or a processor. 758c2ecf20Sopenharmony_ci 768c2ecf20Sopenharmony_ci To figure out where all the SCI's are coming from, 778c2ecf20Sopenharmony_ci /sys/firmware/acpi/interrupts contains a file listing 788c2ecf20Sopenharmony_ci every possible source, and the count of how many 798c2ecf20Sopenharmony_ci times it has triggered:: 808c2ecf20Sopenharmony_ci 818c2ecf20Sopenharmony_ci $ cd /sys/firmware/acpi/interrupts 828c2ecf20Sopenharmony_ci $ grep . * 838c2ecf20Sopenharmony_ci error: 0 848c2ecf20Sopenharmony_ci ff_gbl_lock: 0 enable 858c2ecf20Sopenharmony_ci ff_pmtimer: 0 invalid 868c2ecf20Sopenharmony_ci ff_pwr_btn: 0 enable 878c2ecf20Sopenharmony_ci ff_rt_clk: 2 disable 888c2ecf20Sopenharmony_ci ff_slp_btn: 0 invalid 898c2ecf20Sopenharmony_ci gpe00: 0 invalid 908c2ecf20Sopenharmony_ci gpe01: 0 enable 918c2ecf20Sopenharmony_ci gpe02: 108 enable 928c2ecf20Sopenharmony_ci gpe03: 0 invalid 938c2ecf20Sopenharmony_ci gpe04: 0 invalid 948c2ecf20Sopenharmony_ci gpe05: 0 invalid 958c2ecf20Sopenharmony_ci gpe06: 0 enable 968c2ecf20Sopenharmony_ci gpe07: 0 enable 978c2ecf20Sopenharmony_ci gpe08: 0 invalid 988c2ecf20Sopenharmony_ci gpe09: 0 invalid 998c2ecf20Sopenharmony_ci gpe0A: 0 invalid 1008c2ecf20Sopenharmony_ci gpe0B: 0 invalid 1018c2ecf20Sopenharmony_ci gpe0C: 0 invalid 1028c2ecf20Sopenharmony_ci gpe0D: 0 invalid 1038c2ecf20Sopenharmony_ci gpe0E: 0 invalid 1048c2ecf20Sopenharmony_ci gpe0F: 0 invalid 1058c2ecf20Sopenharmony_ci gpe10: 0 invalid 1068c2ecf20Sopenharmony_ci gpe11: 0 invalid 1078c2ecf20Sopenharmony_ci gpe12: 0 invalid 1088c2ecf20Sopenharmony_ci gpe13: 0 invalid 1098c2ecf20Sopenharmony_ci gpe14: 0 invalid 1108c2ecf20Sopenharmony_ci gpe15: 0 invalid 1118c2ecf20Sopenharmony_ci gpe16: 0 invalid 1128c2ecf20Sopenharmony_ci gpe17: 1084 enable 1138c2ecf20Sopenharmony_ci gpe18: 0 enable 1148c2ecf20Sopenharmony_ci gpe19: 0 invalid 1158c2ecf20Sopenharmony_ci gpe1A: 0 invalid 1168c2ecf20Sopenharmony_ci gpe1B: 0 invalid 1178c2ecf20Sopenharmony_ci gpe1C: 0 invalid 1188c2ecf20Sopenharmony_ci gpe1D: 0 invalid 1198c2ecf20Sopenharmony_ci gpe1E: 0 invalid 1208c2ecf20Sopenharmony_ci gpe1F: 0 invalid 1218c2ecf20Sopenharmony_ci gpe_all: 1192 1228c2ecf20Sopenharmony_ci sci: 1194 1238c2ecf20Sopenharmony_ci sci_not: 0 1248c2ecf20Sopenharmony_ci 1258c2ecf20Sopenharmony_ci =========== ================================================== 1268c2ecf20Sopenharmony_ci sci The number of times the ACPI SCI 1278c2ecf20Sopenharmony_ci has been called and claimed an interrupt. 1288c2ecf20Sopenharmony_ci 1298c2ecf20Sopenharmony_ci sci_not The number of times the ACPI SCI 1308c2ecf20Sopenharmony_ci has been called and NOT claimed an interrupt. 1318c2ecf20Sopenharmony_ci 1328c2ecf20Sopenharmony_ci gpe_all count of SCI caused by GPEs. 1338c2ecf20Sopenharmony_ci 1348c2ecf20Sopenharmony_ci gpeXX count for individual GPE source 1358c2ecf20Sopenharmony_ci 1368c2ecf20Sopenharmony_ci ff_gbl_lock Global Lock 1378c2ecf20Sopenharmony_ci 1388c2ecf20Sopenharmony_ci ff_pmtimer PM Timer 1398c2ecf20Sopenharmony_ci 1408c2ecf20Sopenharmony_ci ff_pwr_btn Power Button 1418c2ecf20Sopenharmony_ci 1428c2ecf20Sopenharmony_ci ff_rt_clk Real Time Clock 1438c2ecf20Sopenharmony_ci 1448c2ecf20Sopenharmony_ci ff_slp_btn Sleep Button 1458c2ecf20Sopenharmony_ci 1468c2ecf20Sopenharmony_ci error an interrupt that can't be accounted for above. 1478c2ecf20Sopenharmony_ci 1488c2ecf20Sopenharmony_ci invalid it's either a GPE or a Fixed Event that 1498c2ecf20Sopenharmony_ci doesn't have an event handler. 1508c2ecf20Sopenharmony_ci 1518c2ecf20Sopenharmony_ci disable the GPE/Fixed Event is valid but disabled. 1528c2ecf20Sopenharmony_ci 1538c2ecf20Sopenharmony_ci enable the GPE/Fixed Event is valid and enabled. 1548c2ecf20Sopenharmony_ci =========== ================================================== 1558c2ecf20Sopenharmony_ci 1568c2ecf20Sopenharmony_ci Root has permission to clear any of these counters. Eg.:: 1578c2ecf20Sopenharmony_ci 1588c2ecf20Sopenharmony_ci # echo 0 > gpe11 1598c2ecf20Sopenharmony_ci 1608c2ecf20Sopenharmony_ci All counters can be cleared by clearing the total "sci":: 1618c2ecf20Sopenharmony_ci 1628c2ecf20Sopenharmony_ci # echo 0 > sci 1638c2ecf20Sopenharmony_ci 1648c2ecf20Sopenharmony_ci None of these counters has an effect on the function 1658c2ecf20Sopenharmony_ci of the system, they are simply statistics. 1668c2ecf20Sopenharmony_ci 1678c2ecf20Sopenharmony_ci Besides this, user can also write specific strings to these files 1688c2ecf20Sopenharmony_ci to enable/disable/clear ACPI interrupts in user space, which can be 1698c2ecf20Sopenharmony_ci used to debug some ACPI interrupt storm issues. 1708c2ecf20Sopenharmony_ci 1718c2ecf20Sopenharmony_ci Note that only writing to VALID GPE/Fixed Event is allowed, 1728c2ecf20Sopenharmony_ci i.e. user can only change the status of runtime GPE and 1738c2ecf20Sopenharmony_ci Fixed Event with event handler installed. 1748c2ecf20Sopenharmony_ci 1758c2ecf20Sopenharmony_ci Let's take power button fixed event for example, please kill acpid 1768c2ecf20Sopenharmony_ci and other user space applications so that the machine won't shutdown 1778c2ecf20Sopenharmony_ci when pressing the power button:: 1788c2ecf20Sopenharmony_ci 1798c2ecf20Sopenharmony_ci # cat ff_pwr_btn 1808c2ecf20Sopenharmony_ci 0 enabled 1818c2ecf20Sopenharmony_ci # press the power button for 3 times; 1828c2ecf20Sopenharmony_ci # cat ff_pwr_btn 1838c2ecf20Sopenharmony_ci 3 enabled 1848c2ecf20Sopenharmony_ci # echo disable > ff_pwr_btn 1858c2ecf20Sopenharmony_ci # cat ff_pwr_btn 1868c2ecf20Sopenharmony_ci 3 disabled 1878c2ecf20Sopenharmony_ci # press the power button for 3 times; 1888c2ecf20Sopenharmony_ci # cat ff_pwr_btn 1898c2ecf20Sopenharmony_ci 3 disabled 1908c2ecf20Sopenharmony_ci # echo enable > ff_pwr_btn 1918c2ecf20Sopenharmony_ci # cat ff_pwr_btn 1928c2ecf20Sopenharmony_ci 4 enabled 1938c2ecf20Sopenharmony_ci /* 1948c2ecf20Sopenharmony_ci * this is because the status bit is set even if the enable 1958c2ecf20Sopenharmony_ci * bit is cleared, and it triggers an ACPI fixed event when 1968c2ecf20Sopenharmony_ci * the enable bit is set again 1978c2ecf20Sopenharmony_ci */ 1988c2ecf20Sopenharmony_ci # press the power button for 3 times; 1998c2ecf20Sopenharmony_ci # cat ff_pwr_btn 2008c2ecf20Sopenharmony_ci 7 enabled 2018c2ecf20Sopenharmony_ci # echo disable > ff_pwr_btn 2028c2ecf20Sopenharmony_ci # press the power button for 3 times; 2038c2ecf20Sopenharmony_ci # echo clear > ff_pwr_btn /* clear the status bit */ 2048c2ecf20Sopenharmony_ci # echo disable > ff_pwr_btn 2058c2ecf20Sopenharmony_ci # cat ff_pwr_btn 2068c2ecf20Sopenharmony_ci 7 enabled 2078c2ecf20Sopenharmony_ci 208