sysfs-firmware-acpi 6.5 KB

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