sysfs-firmware-acpi 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  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/interrupts/
  42. Date: February 2008
  43. Contact: Len Brown <lenb@kernel.org>
  44. Description:
  45. All ACPI interrupts are handled via a single IRQ,
  46. the System Control Interrupt (SCI), which appears
  47. as "acpi" in /proc/interrupts.
  48. However, one of the main functions of ACPI is to make
  49. the platform understand random hardware without
  50. special driver support. So while the SCI handles a few
  51. well known (fixed feature) interrupts sources, such
  52. as the power button, it can also handle a variable
  53. number of a "General Purpose Events" (GPE).
  54. A GPE vectors to a specified handler in AML, which
  55. can do a anything the BIOS writer wants from
  56. OS context. GPE 0x12, for example, would vector
  57. to a level or edge handler called _L12 or _E12.
  58. The handler may do its business and return.
  59. Or the handler may send send a Notify event
  60. to a Linux device driver registered on an ACPI device,
  61. such as a battery, or a processor.
  62. To figure out where all the SCI's are coming from,
  63. /sys/firmware/acpi/interrupts contains a file listing
  64. every possible source, and the count of how many
  65. times it has triggered.
  66. $ cd /sys/firmware/acpi/interrupts
  67. $ grep . *
  68. error: 0
  69. ff_gbl_lock: 0 enable
  70. ff_pmtimer: 0 invalid
  71. ff_pwr_btn: 0 enable
  72. ff_rt_clk: 2 disable
  73. ff_slp_btn: 0 invalid
  74. gpe00: 0 invalid
  75. gpe01: 0 enable
  76. gpe02: 108 enable
  77. gpe03: 0 invalid
  78. gpe04: 0 invalid
  79. gpe05: 0 invalid
  80. gpe06: 0 enable
  81. gpe07: 0 enable
  82. gpe08: 0 invalid
  83. gpe09: 0 invalid
  84. gpe0A: 0 invalid
  85. gpe0B: 0 invalid
  86. gpe0C: 0 invalid
  87. gpe0D: 0 invalid
  88. gpe0E: 0 invalid
  89. gpe0F: 0 invalid
  90. gpe10: 0 invalid
  91. gpe11: 0 invalid
  92. gpe12: 0 invalid
  93. gpe13: 0 invalid
  94. gpe14: 0 invalid
  95. gpe15: 0 invalid
  96. gpe16: 0 invalid
  97. gpe17: 1084 enable
  98. gpe18: 0 enable
  99. gpe19: 0 invalid
  100. gpe1A: 0 invalid
  101. gpe1B: 0 invalid
  102. gpe1C: 0 invalid
  103. gpe1D: 0 invalid
  104. gpe1E: 0 invalid
  105. gpe1F: 0 invalid
  106. gpe_all: 1192
  107. sci: 1194
  108. sci_not: 0
  109. sci - The number of times the ACPI SCI
  110. has been called and claimed an interrupt.
  111. sci_not - The number of times the ACPI SCI
  112. has been called and NOT claimed an interrupt.
  113. gpe_all - count of SCI caused by GPEs.
  114. gpeXX - count for individual GPE source
  115. ff_gbl_lock - Global Lock
  116. ff_pmtimer - PM Timer
  117. ff_pwr_btn - Power Button
  118. ff_rt_clk - Real Time Clock
  119. ff_slp_btn - Sleep Button
  120. error - an interrupt that can't be accounted for above.
  121. invalid: it's either a GPE or a Fixed Event that
  122. doesn't have an event handler.
  123. disable: the GPE/Fixed Event is valid but disabled.
  124. enable: the GPE/Fixed Event is valid and enabled.
  125. Root has permission to clear any of these counters. Eg.
  126. # echo 0 > gpe11
  127. All counters can be cleared by clearing the total "sci":
  128. # echo 0 > sci
  129. None of these counters has an effect on the function
  130. of the system, they are simply statistics.
  131. Besides this, user can also write specific strings to these files
  132. to enable/disable/clear ACPI interrupts in user space, which can be
  133. used to debug some ACPI interrupt storm issues.
  134. Note that only writting to VALID GPE/Fixed Event is allowed,
  135. i.e. user can only change the status of runtime GPE and
  136. Fixed Event with event handler installed.
  137. Let's take power button fixed event for example, please kill acpid
  138. and other user space applications so that the machine won't shutdown
  139. when pressing the power button.
  140. # cat ff_pwr_btn
  141. 0 enabled
  142. # press the power button for 3 times;
  143. # cat ff_pwr_btn
  144. 3 enabled
  145. # echo disable > ff_pwr_btn
  146. # cat ff_pwr_btn
  147. 3 disabled
  148. # press the power button for 3 times;
  149. # cat ff_pwr_btn
  150. 3 disabled
  151. # echo enable > ff_pwr_btn
  152. # cat ff_pwr_btn
  153. 4 enabled
  154. /*
  155. * this is because the status bit is set even if the enable bit is cleared,
  156. * and it triggers an ACPI fixed event when the enable bit is set again
  157. */
  158. # press the power button for 3 times;
  159. # cat ff_pwr_btn
  160. 7 enabled
  161. # echo disable > ff_pwr_btn
  162. # press the power button for 3 times;
  163. # echo clear > ff_pwr_btn /* clear the status bit */
  164. # echo disable > ff_pwr_btn
  165. # cat ff_pwr_btn
  166. 7 enabled