← Documents Documentation/ABI/testing/sysfs-firmware-acpi GitHub 원문 ↗

Linux 6.18.37 · ABI / testing

ACPI firmware sysfs ABI

ACPI FPDT performance, BGRT boot image, hotplug profiles, SCI·GPE interrupt statistics와 MRRM memory ranges를 설명합니다.

Source pathDocumentation/ABI/testing/sysfs-firmware-acpi
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

Boot performance and graphics

sysfs-firmware-acpi:1-66

FPDT는 boot와 S3 timing을 nanoseconds로 제공하고 BGRT는 firmware splash bitmap, validity와 screen offsets를 제공합니다.

Hotplug profile policy

sysfs-firmware-acpi:67-94

Device-class profile의 enabled bit가 notification handling과 _EJ0 ejection 허용 여부를 결정합니다.

SCI, GPE and fixed-event diagnostics

sysfs-firmware-acpi:95-250

Per-source counters와 enable·disable·clear controls로 SCI/GPE activity와 interrupt storms를 진단할 수 있습니다.

MRRM physical ranges and locality

sysfs-firmware-acpi:251-271

MRRM ranges는 physical base·length, NUMA node와 local·remote region IDs를 제공합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 What: /sys/firmware/acpi/fpdt/
2 Date: Jan 2021
3 Contact: Zhang Rui <[email protected]>
4 Description:
5 ACPI Firmware Performance Data Table (FPDT) provides
6 information for firmware performance data for system boot,
7 S3 suspend and S3 resume. This sysfs entry contains the
8 performance data retrieved from the FPDT.
9
10 boot:
11 firmware_start_ns: Timer value logged at the beginning
12 of firmware image execution. In nanoseconds.
13 bootloader_load_ns: Timer value logged just prior to
14 loading the OS boot loader into memory.
15 In nanoseconds.
16 bootloader_launch_ns: Timer value logged just prior to
17 launching the currently loaded OS boot loader
18 image. In nanoseconds.
19 exitbootservice_start_ns: Timer value logged at the
20 point when the OS loader calls the
21 ExitBootServices function for UEFI compatible
22 firmware. In nanoseconds.
23 exitbootservice_end_ns: Timer value logged at the point
24 just prior to the OS loader gaining control
25 back from the ExitBootServices function for
26 UEFI compatible firmware. In nanoseconds.
27 suspend:
28 suspend_start_ns: Timer value recorded at the previous
29 OS write to SLP_TYP upon entry to S3. In
30 nanoseconds.
31 suspend_end_ns: Timer value recorded at the previous
32 firmware write to SLP_TYP used to trigger
33 hardware entry to S3. In nanoseconds.
34 resume:
35 resume_count: A count of the number of S3 resume cycles
36 since the last full boot sequence.
37 resume_avg_ns: Average timer value of all resume cycles
38 logged since the last full boot sequence,
39 including the most recent resume. In nanoseconds.
40 resume_prev_ns: Timer recorded at the end of the previous
41 platform runtime firmware S3 resume, just prior to
42 handoff to the OS waking vector. In nanoseconds.
43
44 What: /sys/firmware/acpi/bgrt/
45 Date: January 2012
46 Contact: Matthew Garrett <[email protected]>
47 Description:
48 The BGRT is an ACPI 5.0 feature that allows the OS
49 to obtain a copy of the firmware boot splash and
50 some associated metadata. This is intended to be used
51 by boot splash applications in order to interact with
52 the firmware boot splash in order to avoid jarring
53 transitions.
54
55 image: The image bitmap. Currently a 32-bit BMP.
56 status: 1 if the image is valid, 0 if firmware invalidated it.
57 type: 0 indicates image is in BMP format.
58
59 ======== ===================================================
60 version: The version of the BGRT. Currently 1.
61 xoffset: The number of pixels between the left of the screen
62 and the left edge of the image.
63 yoffset: The number of pixels between the top of the screen
64 and the top edge of the image.
65 ======== ===================================================
66
67 What: /sys/firmware/acpi/hotplug/
68 Date: February 2013
69 Contact: Rafael J. Wysocki <[email protected]>
70 Description:
71 There are separate hotplug profiles for different classes of
72 devices supported by ACPI, such as containers, memory modules,
73 processors, PCI root bridges etc. A hotplug profile for a given
74 class of devices is a collection of settings defining the way
75 that class of devices will be handled by the ACPI core hotplug
76 code. Those profiles are represented in sysfs as subdirectories
77 of /sys/firmware/acpi/hotplug/.
78
79 The following setting is available to user space for each
80 hotplug profile:
81
82 ======== =======================================================
83 enabled: If set, the ACPI core will handle notifications of
84 hotplug events associated with the given class of
85 devices and will allow those devices to be ejected with
86 the help of the _EJ0 control method. Unsetting it
87 effectively disables hotplug for the corresponding
88 class of devices.
89 ======== =======================================================
90
91 The value of the above attribute is an integer number: 1 (set)
92 or 0 (unset). Attempts to write any other values to it will
93 cause -EINVAL to be returned.
94
95 What: /sys/firmware/acpi/interrupts/
96 Date: February 2008
97 Contact: Len Brown <[email protected]>
98 Description:
99 All ACPI interrupts are handled via a single IRQ,
100 the System Control Interrupt (SCI), which appears
101 as "acpi" in /proc/interrupts.
102
103 However, one of the main functions of ACPI is to make
104 the platform understand random hardware without
105 special driver support. So while the SCI handles a few
106 well known (fixed feature) interrupts sources, such
107 as the power button, it can also handle a variable
108 number of a "General Purpose Events" (GPE).
109
110 A GPE vectors to a specified handler in AML, which
111 can do anything the BIOS writer wants from
112 OS context. GPE 0x12, for example, would vector
113 to a level or edge handler called _L12 or _E12.
114 The handler may do its business and return.
115 Or the handler may send a Notify event
116 to a Linux device driver registered on an ACPI device,
117 such as a battery, or a processor.
118
119 To figure out where all the SCIs are coming from,
120 /sys/firmware/acpi/interrupts contains a file listing
121 every possible source, and the count of how many
122 times it has triggered::
123
124 $ cd /sys/firmware/acpi/interrupts
125 $ grep . *
126 error: 0
127 ff_gbl_lock: 0 enable
128 ff_pmtimer: 0 invalid
129 ff_pwr_btn: 0 enable
130 ff_rt_clk: 2 disable
131 ff_slp_btn: 0 invalid
132 gpe00: 0 invalid
133 gpe01: 0 enable
134 gpe02: 108 enable
135 gpe03: 0 invalid
136 gpe04: 0 invalid
137 gpe05: 0 invalid
138 gpe06: 0 enable
139 gpe07: 0 enable
140 gpe08: 0 invalid
141 gpe09: 0 invalid
142 gpe0A: 0 invalid
143 gpe0B: 0 invalid
144 gpe0C: 0 invalid
145 gpe0D: 0 invalid
146 gpe0E: 0 invalid
147 gpe0F: 0 invalid
148 gpe10: 0 invalid
149 gpe11: 0 invalid
150 gpe12: 0 invalid
151 gpe13: 0 invalid
152 gpe14: 0 invalid
153 gpe15: 0 invalid
154 gpe16: 0 invalid
155 gpe17: 1084 enable
156 gpe18: 0 enable
157 gpe19: 0 invalid
158 gpe1A: 0 invalid
159 gpe1B: 0 invalid
160 gpe1C: 0 invalid
161 gpe1D: 0 invalid
162 gpe1E: 0 invalid
163 gpe1F: 0 invalid
164 gpe_all: 1192
165 sci: 1194
166 sci_not: 0
167
168 =========== ==================================================
169 sci The number of times the ACPI SCI
170 has been called and claimed an interrupt.
171
172 sci_not The number of times the ACPI SCI
173 has been called and NOT claimed an interrupt.
174
175 gpe_all count of SCI caused by GPEs.
176
177 gpeXX count for individual GPE source
178
179 ff_gbl_lock Global Lock
180
181 ff_pmtimer PM Timer
182
183 ff_pwr_btn Power Button
184
185 ff_rt_clk Real Time Clock
186
187 ff_slp_btn Sleep Button
188
189 error an interrupt that can't be accounted for above.
190
191 invalid it's either a GPE or a Fixed Event that
192 doesn't have an event handler.
193
194 disable the GPE/Fixed Event is valid but disabled.
195
196 enable the GPE/Fixed Event is valid and enabled.
197 =========== ==================================================
198
199 Root has permission to clear any of these counters. Eg.::
200
201 # echo 0 > gpe11
202
203 All counters can be cleared by clearing the total "sci"::
204
205 # echo 0 > sci
206
207 None of these counters has an effect on the function
208 of the system, they are simply statistics.
209
210 Besides this, user can also write specific strings to these files
211 to enable/disable/clear ACPI interrupts in user space, which can be
212 used to debug some ACPI interrupt storm issues.
213
214 Note that only writing to VALID GPE/Fixed Event is allowed,
215 i.e. user can only change the status of runtime GPE and
216 Fixed Event with event handler installed.
217
218 Let's take power button fixed event for example, please kill acpid
219 and other user space applications so that the machine won't shutdown
220 when pressing the power button::
221
222 # cat ff_pwr_btn
223 0 enabled
224 # press the power button for 3 times;
225 # cat ff_pwr_btn
226 3 enabled
227 # echo disable > ff_pwr_btn
228 # cat ff_pwr_btn
229 3 disabled
230 # press the power button for 3 times;
231 # cat ff_pwr_btn
232 3 disabled
233 # echo enable > ff_pwr_btn
234 # cat ff_pwr_btn
235 4 enabled
236 /*
237 * this is because the status bit is set even if the enable
238 * bit is cleared, and it triggers an ACPI fixed event when
239 * the enable bit is set again
240 */
241 # press the power button for 3 times;
242 # cat ff_pwr_btn
243 7 enabled
244 # echo disable > ff_pwr_btn
245 # press the power button for 3 times;
246 # echo clear > ff_pwr_btn /* clear the status bit */
247 # echo disable > ff_pwr_btn
248 # cat ff_pwr_btn
249 7 enabled
250
251 What: /sys/firmware/acpi/memory_ranges/rangeX
252 Date: February 2025
253 Contact: Tony Luck <[email protected]>
254 Description:
255 On systems with the ACPI MRRM table reports the parameters for
256 each range.
257
258 base: Starting system physical address.
259
260 length: Length of this range in bytes.
261
262 node: NUMA node that this range belongs to. Negative numbers
263 indicate that the node number could not be determined (e.g
264 for an address range that is reserved for future hot add of
265 memory).
266
267 local_region_id: ID associated with access by agents
268 local to this range of addresses.
269
270 remote_region_id: ID associated with access by agents
271 non-local to this range of addresses.
272

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

ACPI firmware performance data

1-43
항목한국어 전문 번역
What/sys/firmware/acpi/fpdt/
Date2021년 1월
ContactZhang Rui <[email protected]>
DescriptionACPI FPDT(Firmware Performance Data Table)가 제공하는 system boot, S3 suspend와 S3 resume firmware performance data를 노출합니다. `boot/firmware_start_ns`는 firmware image execution 시작, `bootloader_load_ns`는 OS boot loader를 memory에 load하기 직전, `bootloader_launch_ns`는 loaded image를 launch하기 직전, `exitbootservice_start_ns`는 UEFI OS loader가 `ExitBootServices`를 call한 시점, `exitbootservice_end_ns`는 해당 call에서 control을 돌려받기 직전의 timer입니다. Suspend의 `suspend_start_ns`는 이전 S3 entry에서 OS가 `SLP_TYP`에 write한 시점, `suspend_end_ns`는 firmware가 hardware S3 entry를 trigger하기 위해 write한 시점입니다. Resume의 `resume_count`는 last full boot 이후 S3 resume cycles, `resume_avg_ns`는 most recent resume를 포함한 average, `resume_prev_ns`는 이전 platform runtime firmware S3 resume 끝에서 OS waking vector로 handoff하기 직전 timer입니다. Count를 제외한 timer values는 nanoseconds입니다.
AccessPerformance-data directory
FPDT boot timestamps
FieldRecorded eventUnit
firmware_start_nsFirmware image execution beginsns
bootloader_load_nsBefore loading OS boot loaderns
bootloader_launch_nsBefore launching OS boot loaderns
exitbootservice_start_nsOS loader calls ExitBootServicesns
exitbootservice_end_nsBefore control returns from ExitBootServicesns

Firmware에서 OS loader handoff까지의 boot events입니다.

FPDT S3 suspend and resume data
ScopeFieldMeaning
Suspendsuspend_start_nsOS writes SLP_TYP
Suspendsuspend_end_nsFirmware triggers S3 entry
Resumeresume_countCycles since full boot
Resumeresume_avg_nsAverage resume timer
Resumeresume_prev_nsPrevious resume handoff timer

S3 transition timers와 cycle statistics입니다.

ACPI boot graphics resource table

44-66
항목한국어 전문 번역
What/sys/firmware/acpi/bgrt/
Date2012년 1월
ContactMatthew Garrett <[email protected]>
DescriptionBGRT는 OS가 firmware boot splash의 copy와 metadata를 얻도록 하는 ACPI 5.0 feature입니다. Boot-splash application이 firmware splash와 상호작용해 화면 전환이 부자연스러워지는 것을 피할 수 있습니다. `image`는 현재 32-bit BMP bitmap, `status`는 image valid이면 1이고 firmware가 invalidated했으면 0, `type` 0은 BMP format입니다. `version`은 현재 1, `xoffset`은 screen left에서 image left edge까지 pixels, `yoffset`은 screen top에서 image top edge까지 pixels입니다.
AccessBoot-graphics directory
ACPI BGRT fields
FieldMeaning
image32-bit BMP bitmap
status1 valid, 0 invalidated
type0 = BMP
versionCurrently 1
xoffsetPixels from screen left
yoffsetPixels from screen top

Boot image data, validity와 placement metadata입니다.

ACPI hotplug profiles

67-94
항목한국어 전문 번역
What/sys/firmware/acpi/hotplug/
Date2013년 2월
ContactRafael J. Wysocki <[email protected]>
DescriptionContainer, memory module, processor, PCI root bridge 등 ACPI-supported device classes마다 별도 hotplug profile이 있습니다. Profile은 ACPI core hotplug code가 해당 class를 처리하는 방식을 정의하는 settings collection이며 `/sys/firmware/acpi/hotplug/` 아래 subdirectories로 표현됩니다. 각 profile의 `enabled`가 1이면 ACPI core가 hotplug-event notifications를 처리하고 `_EJ0` control method로 device ejection을 허용합니다. 0이면 해당 class hotplug를 effectively disable합니다. 0과 1 이외의 write는 `-EINVAL`을 반환합니다.
AccessProfile directories with read-write enabled control
ACPI hotplug profile control
ValueNotification handling_EJ0 ejection
0DisabledNot allowed by profile
1EnabledAllowed
Other-EINVAL-EINVAL

enabled attribute values와 effect입니다.

ACPI interrupt counters and controls

95-250
항목한국어 전문 번역
What/sys/firmware/acpi/interrupts/
Date2008년 2월
ContactLen Brown <[email protected]>
Description모든 ACPI interrupts는 `/proc/interrupts`에 `acpi`로 보이는 단일 SCI(System Control Interrupt)를 통해 처리됩니다. SCI는 power button 같은 fixed-feature sources와 variable number의 GPEs(General Purpose Events)를 처리합니다. GPE는 AML handler로 vector되며 예를 들어 GPE `0x12`는 level handler `_L12` 또는 edge handler `_E12`로 갑니다. Handler는 직접 return하거나 battery·processor 등 ACPI device에 registered된 Linux driver로 Notify event를 보낼 수 있습니다. 이 directory의 각 file은 possible source, trigger count와 `invalid`, `disable`, `enable` status를 표시합니다. `sci`는 claimed SCI, `sci_not`은 unclaimed SCI, `gpe_all`은 GPE-caused SCI total, `gpeXX`는 individual source입니다. `ff_gbl_lock`, `ff_pmtimer`, `ff_pwr_btn`, `ff_rt_clk`, `ff_slp_btn`은 fixed events이고 `error`는 다른 항목으로 account할 수 없는 interrupt입니다. `invalid`는 handler가 없는 GPE/fixed event, `disable`은 valid하지만 disabled, `enable`은 valid하고 enabled 상태입니다. Root는 individual counter에 0을 써서 clear할 수 있고 `sci`를 clear하면 모든 counters가 cleared됩니다. Counters는 statistics일 뿐 system function에 영향을 주지 않습니다. Valid runtime GPE 또는 handler-installed fixed event에만 `enable`, `disable`, `clear` strings를 쓸 수 있으며 ACPI interrupt storm debugging에 사용합니다. Disabled 상태에서도 status bit는 set될 수 있어 다시 enable할 때 한 event가 trigger될 수 있습니다.
AccessRead-write statistics and debug controls
ACPI interrupt dispatch
Hardware raises ACPI eventSCI handles the interruptDispatch fixed feature or GPEGPE invokes _Lxx or _Exx AML handlerHandler returns or sends Notify to a Linux driver

SCI에서 fixed event 또는 GPE AML handler로 이어지는 흐름입니다.

ACPI interrupt counters
NameMeaning
sciClaimed SCI calls
sci_notUnclaimed SCI calls
gpe_allSCI calls caused by GPEs
gpeXXIndividual GPE source
ff_gbl_lockGlobal Lock
ff_pmtimerPM Timer
ff_pwr_btnPower Button
ff_rt_clkReal Time Clock
ff_slp_btnSleep Button
errorUnaccounted interrupt

Aggregate, per-source와 fixed-feature counter names입니다.

ACPI interrupt source states
StateMeaning
invalidNo event handler
disableValid but disabled
enableValid and enabled

Handler validity와 enablement 상태입니다.

$ cd /sys/firmware/acpi/interrupts
$ grep . *
error:             0
ff_gbl_lock:       0   enable
ff_pmtimer:        0  invalid
ff_pwr_btn:        0   enable
ff_rt_clk:         2  disable
ff_slp_btn:        0  invalid
gpe00:             0  invalid
gpe01:             0   enable
gpe02:           108   enable
gpe03:             0  invalid
gpe04:             0  invalid
gpe05:             0  invalid
gpe06:             0   enable
gpe07:             0   enable
gpe08:             0  invalid
gpe09:             0  invalid
gpe0A:             0  invalid
gpe0B:             0  invalid
gpe0C:             0  invalid
gpe0D:             0  invalid
gpe0E:             0  invalid
gpe0F:             0  invalid
gpe10:             0  invalid
gpe11:             0  invalid
gpe12:             0  invalid
gpe13:             0  invalid
gpe14:             0  invalid
gpe15:             0  invalid
gpe16:             0  invalid
gpe17:          1084   enable
gpe18:             0   enable
gpe19:             0  invalid
gpe1A:             0  invalid
gpe1B:             0  invalid
gpe1C:             0  invalid
gpe1D:             0  invalid
gpe1E:             0  invalid
gpe1F:             0  invalid
gpe_all:        1192
sci:            1194
sci_not:           0
# echo 0 > gpe11
# echo 0 > sci
# cat ff_pwr_btn
0 enabled
# press the power button for 3 times
# cat ff_pwr_btn
3 enabled
# echo disable > ff_pwr_btn
# cat ff_pwr_btn
3 disabled
# press the power button for 3 times
# cat ff_pwr_btn
3 disabled
# echo enable > ff_pwr_btn
# cat ff_pwr_btn
4 enabled
# press the power button for 3 times
# cat ff_pwr_btn
7 enabled
# echo disable > ff_pwr_btn
# press the power button for 3 times
# echo clear > ff_pwr_btn
# echo disable > ff_pwr_btn
# cat ff_pwr_btn
7 enabled

ACPI MRRM memory ranges

251-271
항목한국어 전문 번역
What/sys/firmware/acpi/memory_ranges/rangeX
Date2025년 2월
ContactTony Luck <[email protected]>
DescriptionACPI MRRM table이 있는 system에서 각 memory range의 parameters를 보고합니다. `base`는 starting system physical address, `length`는 bytes 단위 range length, `node`는 range가 속한 NUMA node입니다. Negative node value는 future memory hot-add reserved range처럼 node를 determine할 수 없음을 뜻합니다. `local_region_id`는 이 address range에 local한 agents의 access와 associated된 ID이고 `remote_region_id`는 non-local agents access의 ID입니다.
AccessRead-only range attributes
ACPI MRRM range fields
FieldMeaning
baseStarting system physical address
lengthRange length in bytes
nodeNUMA node; negative if unknown
local_region_idID for local-agent access
remote_region_idID for non-local-agent access

Physical range, NUMA placement와 locality IDs입니다.