sysfs-firmware-acpi 6.7 KB

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