^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) What: /sys/firmware/acpi/bgrt/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) Date: January 2012
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) Contact: Matthew Garrett <mjg@redhat.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) The BGRT is an ACPI 5.0 feature that allows the OS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) to obtain a copy of the firmware boot splash and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) some associated metadata. This is intended to be used
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) by boot splash applications in order to interact with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) the firmware boot splash in order to avoid jarring
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) transitions.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) image: The image bitmap. Currently a 32-bit BMP.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) status: 1 if the image is valid, 0 if firmware invalidated it.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) type: 0 indicates image is in BMP format.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) ======== ===================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) version: The version of the BGRT. Currently 1.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) xoffset: The number of pixels between the left of the screen
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) and the left edge of the image.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) yoffset: The number of pixels between the top of the screen
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) and the top edge of the image.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) ======== ===================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) What: /sys/firmware/acpi/hotplug/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) Date: February 2013
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) Contact: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) There are separate hotplug profiles for different classes of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) devices supported by ACPI, such as containers, memory modules,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) processors, PCI root bridges etc. A hotplug profile for a given
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) class of devices is a collection of settings defining the way
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) that class of devices will be handled by the ACPI core hotplug
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) code. Those profiles are represented in sysfs as subdirectories
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) of /sys/firmware/acpi/hotplug/.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) The following setting is available to user space for each
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) hotplug profile:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) ======== =======================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) enabled: If set, the ACPI core will handle notifications of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) hotplug events associated with the given class of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) devices and will allow those devices to be ejected with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) the help of the _EJ0 control method. Unsetting it
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) effectively disables hotplug for the correspoinding
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) class of devices.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) ======== =======================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) The value of the above attribute is an integer number: 1 (set)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) or 0 (unset). Attempts to write any other values to it will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) cause -EINVAL to be returned.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) What: /sys/firmware/acpi/interrupts/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) Date: February 2008
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) Contact: Len Brown <lenb@kernel.org>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) Description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) All ACPI interrupts are handled via a single IRQ,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) the System Control Interrupt (SCI), which appears
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) as "acpi" in /proc/interrupts.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) However, one of the main functions of ACPI is to make
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) the platform understand random hardware without
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) special driver support. So while the SCI handles a few
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) well known (fixed feature) interrupts sources, such
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) as the power button, it can also handle a variable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) number of a "General Purpose Events" (GPE).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) A GPE vectors to a specified handler in AML, which
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) can do a anything the BIOS writer wants from
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) OS context. GPE 0x12, for example, would vector
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) to a level or edge handler called _L12 or _E12.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) The handler may do its business and return.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) Or the handler may send send a Notify event
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) to a Linux device driver registered on an ACPI device,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) such as a battery, or a processor.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) To figure out where all the SCI's are coming from,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) /sys/firmware/acpi/interrupts contains a file listing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) every possible source, and the count of how many
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) times it has triggered::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) $ cd /sys/firmware/acpi/interrupts
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) $ grep . *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) error: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) ff_gbl_lock: 0 enable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) ff_pmtimer: 0 invalid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) ff_pwr_btn: 0 enable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) ff_rt_clk: 2 disable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) ff_slp_btn: 0 invalid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) gpe00: 0 invalid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) gpe01: 0 enable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) gpe02: 108 enable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) gpe03: 0 invalid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) gpe04: 0 invalid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) gpe05: 0 invalid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) gpe06: 0 enable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) gpe07: 0 enable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) gpe08: 0 invalid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) gpe09: 0 invalid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) gpe0A: 0 invalid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) gpe0B: 0 invalid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) gpe0C: 0 invalid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) gpe0D: 0 invalid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) gpe0E: 0 invalid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) gpe0F: 0 invalid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) gpe10: 0 invalid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) gpe11: 0 invalid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) gpe12: 0 invalid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) gpe13: 0 invalid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) gpe14: 0 invalid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) gpe15: 0 invalid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) gpe16: 0 invalid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) gpe17: 1084 enable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) gpe18: 0 enable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) gpe19: 0 invalid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) gpe1A: 0 invalid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) gpe1B: 0 invalid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) gpe1C: 0 invalid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) gpe1D: 0 invalid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) gpe1E: 0 invalid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) gpe1F: 0 invalid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) gpe_all: 1192
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) sci: 1194
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) sci_not: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) =========== ==================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) sci The number of times the ACPI SCI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) has been called and claimed an interrupt.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) sci_not The number of times the ACPI SCI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) has been called and NOT claimed an interrupt.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) gpe_all count of SCI caused by GPEs.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) gpeXX count for individual GPE source
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) ff_gbl_lock Global Lock
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) ff_pmtimer PM Timer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) ff_pwr_btn Power Button
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) ff_rt_clk Real Time Clock
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) ff_slp_btn Sleep Button
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) error an interrupt that can't be accounted for above.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) invalid it's either a GPE or a Fixed Event that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) doesn't have an event handler.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) disable the GPE/Fixed Event is valid but disabled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) enable the GPE/Fixed Event is valid and enabled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) =========== ==================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) Root has permission to clear any of these counters. Eg.::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) # echo 0 > gpe11
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) All counters can be cleared by clearing the total "sci"::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) # echo 0 > sci
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) None of these counters has an effect on the function
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) of the system, they are simply statistics.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) Besides this, user can also write specific strings to these files
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) to enable/disable/clear ACPI interrupts in user space, which can be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) used to debug some ACPI interrupt storm issues.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) Note that only writing to VALID GPE/Fixed Event is allowed,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) i.e. user can only change the status of runtime GPE and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) Fixed Event with event handler installed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) Let's take power button fixed event for example, please kill acpid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) and other user space applications so that the machine won't shutdown
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) when pressing the power button::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) # cat ff_pwr_btn
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 0 enabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) # press the power button for 3 times;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) # cat ff_pwr_btn
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 3 enabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) # echo disable > ff_pwr_btn
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) # cat ff_pwr_btn
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 3 disabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) # press the power button for 3 times;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) # cat ff_pwr_btn
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 3 disabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) # echo enable > ff_pwr_btn
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) # cat ff_pwr_btn
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 4 enabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) * this is because the status bit is set even if the enable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) * bit is cleared, and it triggers an ACPI fixed event when
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) * the enable bit is set again
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) # press the power button for 3 times;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) # cat ff_pwr_btn
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 7 enabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) # echo disable > ff_pwr_btn
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) # press the power button for 3 times;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) # echo clear > ff_pwr_btn /* clear the status bit */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) # echo disable > ff_pwr_btn
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) # cat ff_pwr_btn
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) 7 enabled
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207)