sysfs-firmware-acpi 5.0 KB

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