1d1ff4b1cSMatthew GarrettWhat: /sys/firmware/acpi/bgrt/ 2d1ff4b1cSMatthew GarrettDate: January 2012 3d1ff4b1cSMatthew GarrettContact: Matthew Garrett <mjg@redhat.com> 4d1ff4b1cSMatthew GarrettDescription: 5d1ff4b1cSMatthew Garrett The BGRT is an ACPI 5.0 feature that allows the OS 6d1ff4b1cSMatthew Garrett to obtain a copy of the firmware boot splash and 7d1ff4b1cSMatthew Garrett some associated metadata. This is intended to be used 8d1ff4b1cSMatthew Garrett by boot splash applications in order to interact with 9d1ff4b1cSMatthew Garrett the firmware boot splash in order to avoid jarring 10d1ff4b1cSMatthew Garrett transitions. 11d1ff4b1cSMatthew Garrett 12d1ff4b1cSMatthew Garrett image: The image bitmap. Currently a 32-bit BMP. 13d1ff4b1cSMatthew Garrett status: 1 if the image is valid, 0 if firmware invalidated it. 14d1ff4b1cSMatthew Garrett type: 0 indicates image is in BMP format. 15d1ff4b1cSMatthew Garrett version: The version of the BGRT. Currently 1. 16d1ff4b1cSMatthew Garrett xoffset: The number of pixels between the left of the screen 17d1ff4b1cSMatthew Garrett and the left edge of the image. 18d1ff4b1cSMatthew Garrett yoffset: The number of pixels between the top of the screen 19d1ff4b1cSMatthew Garrett and the top edge of the image. 20d1ff4b1cSMatthew Garrett 213f8055c3SRafael J. WysockiWhat: /sys/firmware/acpi/hotplug/ 223f8055c3SRafael J. WysockiDate: February 2013 233f8055c3SRafael J. WysockiContact: Rafael J. Wysocki <rafael.j.wysocki@intel.com> 243f8055c3SRafael J. WysockiDescription: 253f8055c3SRafael J. Wysocki There are separate hotplug profiles for different classes of 263f8055c3SRafael J. Wysocki devices supported by ACPI, such as containers, memory modules, 273f8055c3SRafael J. Wysocki processors, PCI root bridges etc. A hotplug profile for a given 283f8055c3SRafael J. Wysocki class of devices is a collection of settings defining the way 293f8055c3SRafael J. Wysocki that class of devices will be handled by the ACPI core hotplug 303f8055c3SRafael J. Wysocki code. Those profiles are represented in sysfs as subdirectories 313f8055c3SRafael J. Wysocki of /sys/firmware/acpi/hotplug/. 323f8055c3SRafael J. Wysocki 333f8055c3SRafael J. Wysocki The following setting is available to user space for each 343f8055c3SRafael J. Wysocki hotplug profile: 353f8055c3SRafael J. Wysocki 363f8055c3SRafael J. Wysocki enabled: If set, the ACPI core will handle notifications of 373f8055c3SRafael J. Wysocki hotplug events associated with the given class of 383f8055c3SRafael J. Wysocki devices and will allow those devices to be ejected with 393f8055c3SRafael J. Wysocki the help of the _EJ0 control method. Unsetting it 403f8055c3SRafael J. Wysocki effectively disables hotplug for the correspoinding 413f8055c3SRafael J. Wysocki class of devices. 423f8055c3SRafael J. Wysocki 433f8055c3SRafael J. Wysocki The value of the above attribute is an integer number: 1 (set) 443f8055c3SRafael J. Wysocki or 0 (unset). Attempts to write any other values to it will 453f8055c3SRafael J. Wysocki cause -EINVAL to be returned. 463f8055c3SRafael J. Wysocki 47683058e3SRafael J. WysockiWhat: /sys/firmware/acpi/hotplug/force_remove 48683058e3SRafael J. WysockiDate: May 2013 49683058e3SRafael J. WysockiContact: Rafael J. Wysocki <rafael.j.wysocki@intel.com> 50683058e3SRafael J. WysockiDescription: 51683058e3SRafael J. Wysocki The number in this file (0 or 1) determines whether (1) or not 52683058e3SRafael J. Wysocki (0) the ACPI subsystem will allow devices to be hot-removed even 53683058e3SRafael J. Wysocki if they cannot be put offline gracefully (from the kernel's 54683058e3SRafael J. Wysocki viewpoint). That number can be changed by writing a boolean 55683058e3SRafael J. Wysocki value to this file. 56683058e3SRafael J. Wysocki 575229e87dSLen BrownWhat: /sys/firmware/acpi/interrupts/ 585229e87dSLen BrownDate: February 2008 595229e87dSLen BrownContact: Len Brown <lenb@kernel.org> 605229e87dSLen BrownDescription: 615229e87dSLen Brown All ACPI interrupts are handled via a single IRQ, 625229e87dSLen Brown the System Control Interrupt (SCI), which appears 635229e87dSLen Brown as "acpi" in /proc/interrupts. 645229e87dSLen Brown 655229e87dSLen Brown However, one of the main functions of ACPI is to make 665229e87dSLen Brown the platform understand random hardware without 675229e87dSLen Brown special driver support. So while the SCI handles a few 685229e87dSLen Brown well known (fixed feature) interrupts sources, such 695229e87dSLen Brown as the power button, it can also handle a variable 705229e87dSLen Brown number of a "General Purpose Events" (GPE). 715229e87dSLen Brown 725229e87dSLen Brown A GPE vectors to a specified handler in AML, which 735229e87dSLen Brown can do a anything the BIOS writer wants from 745229e87dSLen Brown OS context. GPE 0x12, for example, would vector 755229e87dSLen Brown to a level or edge handler called _L12 or _E12. 765229e87dSLen Brown The handler may do its business and return. 775229e87dSLen Brown Or the handler may send send a Notify event 785229e87dSLen Brown to a Linux device driver registered on an ACPI device, 795229e87dSLen Brown such as a battery, or a processor. 805229e87dSLen Brown 815229e87dSLen Brown To figure out where all the SCI's are coming from, 825229e87dSLen Brown /sys/firmware/acpi/interrupts contains a file listing 835229e87dSLen Brown every possible source, and the count of how many 845229e87dSLen Brown times it has triggered. 855229e87dSLen Brown 865229e87dSLen Brown $ cd /sys/firmware/acpi/interrupts 875229e87dSLen Brown $ grep . * 885229e87dSLen Brown error: 0 8971b58cbbSZhang Rui ff_gbl_lock: 0 enable 9071b58cbbSZhang Rui ff_pmtimer: 0 invalid 9171b58cbbSZhang Rui ff_pwr_btn: 0 enable 9271b58cbbSZhang Rui ff_rt_clk: 2 disable 9371b58cbbSZhang Rui ff_slp_btn: 0 invalid 9471b58cbbSZhang Rui gpe00: 0 invalid 9571b58cbbSZhang Rui gpe01: 0 enable 9671b58cbbSZhang Rui gpe02: 108 enable 9771b58cbbSZhang Rui gpe03: 0 invalid 9871b58cbbSZhang Rui gpe04: 0 invalid 9971b58cbbSZhang Rui gpe05: 0 invalid 10071b58cbbSZhang Rui gpe06: 0 enable 10171b58cbbSZhang Rui gpe07: 0 enable 10271b58cbbSZhang Rui gpe08: 0 invalid 10371b58cbbSZhang Rui gpe09: 0 invalid 10471b58cbbSZhang Rui gpe0A: 0 invalid 10571b58cbbSZhang Rui gpe0B: 0 invalid 10671b58cbbSZhang Rui gpe0C: 0 invalid 10771b58cbbSZhang Rui gpe0D: 0 invalid 10871b58cbbSZhang Rui gpe0E: 0 invalid 10971b58cbbSZhang Rui gpe0F: 0 invalid 11071b58cbbSZhang Rui gpe10: 0 invalid 11171b58cbbSZhang Rui gpe11: 0 invalid 11271b58cbbSZhang Rui gpe12: 0 invalid 11371b58cbbSZhang Rui gpe13: 0 invalid 11471b58cbbSZhang Rui gpe14: 0 invalid 11571b58cbbSZhang Rui gpe15: 0 invalid 11671b58cbbSZhang Rui gpe16: 0 invalid 11771b58cbbSZhang Rui gpe17: 1084 enable 11871b58cbbSZhang Rui gpe18: 0 enable 11971b58cbbSZhang Rui gpe19: 0 invalid 12071b58cbbSZhang Rui gpe1A: 0 invalid 12171b58cbbSZhang Rui gpe1B: 0 invalid 12271b58cbbSZhang Rui gpe1C: 0 invalid 12371b58cbbSZhang Rui gpe1D: 0 invalid 12471b58cbbSZhang Rui gpe1E: 0 invalid 12571b58cbbSZhang Rui gpe1F: 0 invalid 12671b58cbbSZhang Rui gpe_all: 1192 12771b58cbbSZhang Rui sci: 1194 12888bea188SLen Brown sci_not: 0 1295229e87dSLen Brown 13088bea188SLen Brown sci - The number of times the ACPI SCI 13188bea188SLen Brown has been called and claimed an interrupt. 13288bea188SLen Brown 13388bea188SLen Brown sci_not - The number of times the ACPI SCI 13488bea188SLen Brown has been called and NOT claimed an interrupt. 1355229e87dSLen Brown 1365229e87dSLen Brown gpe_all - count of SCI caused by GPEs. 1375229e87dSLen Brown 1385229e87dSLen Brown gpeXX - count for individual GPE source 1395229e87dSLen Brown 1405229e87dSLen Brown ff_gbl_lock - Global Lock 1415229e87dSLen Brown 1425229e87dSLen Brown ff_pmtimer - PM Timer 1435229e87dSLen Brown 1445229e87dSLen Brown ff_pwr_btn - Power Button 1455229e87dSLen Brown 1465229e87dSLen Brown ff_rt_clk - Real Time Clock 1475229e87dSLen Brown 1485229e87dSLen Brown ff_slp_btn - Sleep Button 1495229e87dSLen Brown 1505229e87dSLen Brown error - an interrupt that can't be accounted for above. 1515229e87dSLen Brown 152ed206facSZhang Rui invalid: it's either a GPE or a Fixed Event that 15371b58cbbSZhang Rui doesn't have an event handler. 15471b58cbbSZhang Rui 15571b58cbbSZhang Rui disable: the GPE/Fixed Event is valid but disabled. 15671b58cbbSZhang Rui 15771b58cbbSZhang Rui enable: the GPE/Fixed Event is valid and enabled. 15871b58cbbSZhang Rui 1595229e87dSLen Brown Root has permission to clear any of these counters. Eg. 1605229e87dSLen Brown # echo 0 > gpe11 1615229e87dSLen Brown 1625229e87dSLen Brown All counters can be cleared by clearing the total "sci": 1635229e87dSLen Brown # echo 0 > sci 1645229e87dSLen Brown 1655229e87dSLen Brown None of these counters has an effect on the function 1665229e87dSLen Brown of the system, they are simply statistics. 16771b58cbbSZhang Rui 16871b58cbbSZhang Rui Besides this, user can also write specific strings to these files 16971b58cbbSZhang Rui to enable/disable/clear ACPI interrupts in user space, which can be 17071b58cbbSZhang Rui used to debug some ACPI interrupt storm issues. 17171b58cbbSZhang Rui 172*08559657SKees Cook Note that only writing to VALID GPE/Fixed Event is allowed, 17371b58cbbSZhang Rui i.e. user can only change the status of runtime GPE and 17471b58cbbSZhang Rui Fixed Event with event handler installed. 17571b58cbbSZhang Rui 17671b58cbbSZhang Rui Let's take power button fixed event for example, please kill acpid 17771b58cbbSZhang Rui and other user space applications so that the machine won't shutdown 17871b58cbbSZhang Rui when pressing the power button. 17971b58cbbSZhang Rui # cat ff_pwr_btn 180ed206facSZhang Rui 0 enabled 18171b58cbbSZhang Rui # press the power button for 3 times; 18271b58cbbSZhang Rui # cat ff_pwr_btn 183ed206facSZhang Rui 3 enabled 18471b58cbbSZhang Rui # echo disable > ff_pwr_btn 18571b58cbbSZhang Rui # cat ff_pwr_btn 186ed206facSZhang Rui 3 disabled 18771b58cbbSZhang Rui # press the power button for 3 times; 18871b58cbbSZhang Rui # cat ff_pwr_btn 189ed206facSZhang Rui 3 disabled 19071b58cbbSZhang Rui # echo enable > ff_pwr_btn 19171b58cbbSZhang Rui # cat ff_pwr_btn 192ed206facSZhang Rui 4 enabled 19371b58cbbSZhang Rui /* 19471b58cbbSZhang Rui * this is because the status bit is set even if the enable bit is cleared, 19571b58cbbSZhang Rui * and it triggers an ACPI fixed event when the enable bit is set again 19671b58cbbSZhang Rui */ 19771b58cbbSZhang Rui # press the power button for 3 times; 19871b58cbbSZhang Rui # cat ff_pwr_btn 199ed206facSZhang Rui 7 enabled 20071b58cbbSZhang Rui # echo disable > ff_pwr_btn 20171b58cbbSZhang Rui # press the power button for 3 times; 20271b58cbbSZhang Rui # echo clear > ff_pwr_btn /* clear the status bit */ 20371b58cbbSZhang Rui # echo disable > ff_pwr_btn 20471b58cbbSZhang Rui # cat ff_pwr_btn 205ed206facSZhang Rui 7 enabled 20671b58cbbSZhang Rui 207