0001 What: /sys/firmware/acpi/fpdt/
0002 Date: Jan 2021
0003 Contact: Zhang Rui <rui.zhang@intel.com>
0004 Description:
0005 ACPI Firmware Performance Data Table (FPDT) provides
0006 information for firmware performance data for system boot,
0007 S3 suspend and S3 resume. This sysfs entry contains the
0008 performance data retrieved from the FPDT.
0009
0010 boot:
0011 firmware_start_ns: Timer value logged at the beginning
0012 of firmware image execution. In nanoseconds.
0013 bootloader_load_ns: Timer value logged just prior to
0014 loading the OS boot loader into memory.
0015 In nanoseconds.
0016 bootloader_launch_ns: Timer value logged just prior to
0017 launching the currently loaded OS boot loader
0018 image. In nanoseconds.
0019 exitbootservice_start_ns: Timer value logged at the
0020 point when the OS loader calls the
0021 ExitBootServices function for UEFI compatible
0022 firmware. In nanoseconds.
0023 exitbootservice_end_ns: Timer value logged at the point
0024 just prior to the OS loader gaining control
0025 back from the ExitBootServices function for
0026 UEFI compatible firmware. In nanoseconds.
0027 suspend:
0028 suspend_start_ns: Timer value recorded at the previous
0029 OS write to SLP_TYP upon entry to S3. In
0030 nanoseconds.
0031 suspend_end_ns: Timer value recorded at the previous
0032 firmware write to SLP_TYP used to trigger
0033 hardware entry to S3. In nanoseconds.
0034 resume:
0035 resume_count: A count of the number of S3 resume cycles
0036 since the last full boot sequence.
0037 resume_avg_ns: Average timer value of all resume cycles
0038 logged since the last full boot sequence,
0039 including the most recent resume. In nanoseconds.
0040 resume_prev_ns: Timer recorded at the end of the previous
0041 platform runtime firmware S3 resume, just prior to
0042 handoff to the OS waking vector. In nanoseconds.
0043
0044 What: /sys/firmware/acpi/bgrt/
0045 Date: January 2012
0046 Contact: Matthew Garrett <mjg@redhat.com>
0047 Description:
0048 The BGRT is an ACPI 5.0 feature that allows the OS
0049 to obtain a copy of the firmware boot splash and
0050 some associated metadata. This is intended to be used
0051 by boot splash applications in order to interact with
0052 the firmware boot splash in order to avoid jarring
0053 transitions.
0054
0055 image: The image bitmap. Currently a 32-bit BMP.
0056 status: 1 if the image is valid, 0 if firmware invalidated it.
0057 type: 0 indicates image is in BMP format.
0058
0059 ======== ===================================================
0060 version: The version of the BGRT. Currently 1.
0061 xoffset: The number of pixels between the left of the screen
0062 and the left edge of the image.
0063 yoffset: The number of pixels between the top of the screen
0064 and the top edge of the image.
0065 ======== ===================================================
0066
0067 What: /sys/firmware/acpi/hotplug/
0068 Date: February 2013
0069 Contact: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
0070 Description:
0071 There are separate hotplug profiles for different classes of
0072 devices supported by ACPI, such as containers, memory modules,
0073 processors, PCI root bridges etc. A hotplug profile for a given
0074 class of devices is a collection of settings defining the way
0075 that class of devices will be handled by the ACPI core hotplug
0076 code. Those profiles are represented in sysfs as subdirectories
0077 of /sys/firmware/acpi/hotplug/.
0078
0079 The following setting is available to user space for each
0080 hotplug profile:
0081
0082 ======== =======================================================
0083 enabled: If set, the ACPI core will handle notifications of
0084 hotplug events associated with the given class of
0085 devices and will allow those devices to be ejected with
0086 the help of the _EJ0 control method. Unsetting it
0087 effectively disables hotplug for the correspoinding
0088 class of devices.
0089 ======== =======================================================
0090
0091 The value of the above attribute is an integer number: 1 (set)
0092 or 0 (unset). Attempts to write any other values to it will
0093 cause -EINVAL to be returned.
0094
0095 What: /sys/firmware/acpi/interrupts/
0096 Date: February 2008
0097 Contact: Len Brown <lenb@kernel.org>
0098 Description:
0099 All ACPI interrupts are handled via a single IRQ,
0100 the System Control Interrupt (SCI), which appears
0101 as "acpi" in /proc/interrupts.
0102
0103 However, one of the main functions of ACPI is to make
0104 the platform understand random hardware without
0105 special driver support. So while the SCI handles a few
0106 well known (fixed feature) interrupts sources, such
0107 as the power button, it can also handle a variable
0108 number of a "General Purpose Events" (GPE).
0109
0110 A GPE vectors to a specified handler in AML, which
0111 can do a anything the BIOS writer wants from
0112 OS context. GPE 0x12, for example, would vector
0113 to a level or edge handler called _L12 or _E12.
0114 The handler may do its business and return.
0115 Or the handler may send send a Notify event
0116 to a Linux device driver registered on an ACPI device,
0117 such as a battery, or a processor.
0118
0119 To figure out where all the SCI's are coming from,
0120 /sys/firmware/acpi/interrupts contains a file listing
0121 every possible source, and the count of how many
0122 times it has triggered::
0123
0124 $ cd /sys/firmware/acpi/interrupts
0125 $ grep . *
0126 error: 0
0127 ff_gbl_lock: 0 enable
0128 ff_pmtimer: 0 invalid
0129 ff_pwr_btn: 0 enable
0130 ff_rt_clk: 2 disable
0131 ff_slp_btn: 0 invalid
0132 gpe00: 0 invalid
0133 gpe01: 0 enable
0134 gpe02: 108 enable
0135 gpe03: 0 invalid
0136 gpe04: 0 invalid
0137 gpe05: 0 invalid
0138 gpe06: 0 enable
0139 gpe07: 0 enable
0140 gpe08: 0 invalid
0141 gpe09: 0 invalid
0142 gpe0A: 0 invalid
0143 gpe0B: 0 invalid
0144 gpe0C: 0 invalid
0145 gpe0D: 0 invalid
0146 gpe0E: 0 invalid
0147 gpe0F: 0 invalid
0148 gpe10: 0 invalid
0149 gpe11: 0 invalid
0150 gpe12: 0 invalid
0151 gpe13: 0 invalid
0152 gpe14: 0 invalid
0153 gpe15: 0 invalid
0154 gpe16: 0 invalid
0155 gpe17: 1084 enable
0156 gpe18: 0 enable
0157 gpe19: 0 invalid
0158 gpe1A: 0 invalid
0159 gpe1B: 0 invalid
0160 gpe1C: 0 invalid
0161 gpe1D: 0 invalid
0162 gpe1E: 0 invalid
0163 gpe1F: 0 invalid
0164 gpe_all: 1192
0165 sci: 1194
0166 sci_not: 0
0167
0168 =========== ==================================================
0169 sci The number of times the ACPI SCI
0170 has been called and claimed an interrupt.
0171
0172 sci_not The number of times the ACPI SCI
0173 has been called and NOT claimed an interrupt.
0174
0175 gpe_all count of SCI caused by GPEs.
0176
0177 gpeXX count for individual GPE source
0178
0179 ff_gbl_lock Global Lock
0180
0181 ff_pmtimer PM Timer
0182
0183 ff_pwr_btn Power Button
0184
0185 ff_rt_clk Real Time Clock
0186
0187 ff_slp_btn Sleep Button
0188
0189 error an interrupt that can't be accounted for above.
0190
0191 invalid it's either a GPE or a Fixed Event that
0192 doesn't have an event handler.
0193
0194 disable the GPE/Fixed Event is valid but disabled.
0195
0196 enable the GPE/Fixed Event is valid and enabled.
0197 =========== ==================================================
0198
0199 Root has permission to clear any of these counters. Eg.::
0200
0201 # echo 0 > gpe11
0202
0203 All counters can be cleared by clearing the total "sci"::
0204
0205 # echo 0 > sci
0206
0207 None of these counters has an effect on the function
0208 of the system, they are simply statistics.
0209
0210 Besides this, user can also write specific strings to these files
0211 to enable/disable/clear ACPI interrupts in user space, which can be
0212 used to debug some ACPI interrupt storm issues.
0213
0214 Note that only writing to VALID GPE/Fixed Event is allowed,
0215 i.e. user can only change the status of runtime GPE and
0216 Fixed Event with event handler installed.
0217
0218 Let's take power button fixed event for example, please kill acpid
0219 and other user space applications so that the machine won't shutdown
0220 when pressing the power button::
0221
0222 # cat ff_pwr_btn
0223 0 enabled
0224 # press the power button for 3 times;
0225 # cat ff_pwr_btn
0226 3 enabled
0227 # echo disable > ff_pwr_btn
0228 # cat ff_pwr_btn
0229 3 disabled
0230 # press the power button for 3 times;
0231 # cat ff_pwr_btn
0232 3 disabled
0233 # echo enable > ff_pwr_btn
0234 # cat ff_pwr_btn
0235 4 enabled
0236 /*
0237 * this is because the status bit is set even if the enable
0238 * bit is cleared, and it triggers an ACPI fixed event when
0239 * the enable bit is set again
0240 */
0241 # press the power button for 3 times;
0242 # cat ff_pwr_btn
0243 7 enabled
0244 # echo disable > ff_pwr_btn
0245 # press the power button for 3 times;
0246 # echo clear > ff_pwr_btn /* clear the status bit */
0247 # echo disable > ff_pwr_btn
0248 # cat ff_pwr_btn
0249 7 enabled
0250