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

Linux 6.18.37 · ABI / testing

ACPI device sysfs ABI

ACPI device object의 namespace path, PNP modalias·_HID, _STR·_ADR·_UID output, _EJ0 hot removal, _STA status bitmap과 non-PCI _HRV hardware version을 설명합니다.

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

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

1. 요약·해설

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

ACPI namespace path

sysfs-bus-acpi:1-11

path는 device object와 연결된 ACPI namespace object의 full path를 제공하지만 power·sleep button 같은 fixed ACPI hardware feature에는 존재하지 않습니다.

PNP modalias와 hardware ID

sysfs-bus-acpi:13-28

modalias는 _HID·_CID에서 얻은 PNP IDs를 acpi 형식으로 나타내고 hid는 _HID control method가 있는 object의 hardware ID를 제공합니다.

_STR, _ADR와 _UID outputs

sysfs-bus-acpi:30-51

description·adr·uid는 각각 _STR·_ADR·_UID control method의 output이며 _ADR은 PCI처럼 standard enumeration algorithm을 사용하는 device object에 있습니다.

_EJ0 hot removal

sysfs-bus-acpi:53-59

_EJ0 method가 있는 device object의 eject attribute에 1을 쓰면 hot removal을 시작합니다.

_STA device status bitmap

sysfs-bus-acpi:61-89

status는 _STA method의 decimal bitmap을 제공하며 presence, enable·resource decoding, UI visibility, diagnostics/functioning과 battery presence를 bit 0–4로 나타냅니다.

Non-PCI hardware version

sysfs-bus-acpi:91-98

hrv는 _HRV control method가 있는 non-PCI hardware의 version을 읽게 하며 PCI version은 lspci로 확인할 수 있습니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 What: /sys/bus/acpi/devices/.../path
2 Date: December 2006
3 Contact: Rafael J. Wysocki <rafael@kernel.org>
4 Description:
5 This attribute indicates the full path of ACPI namespace
6 object associated with the device object. For example,
7 \_SB_.PCI0.
8
9 This file is not present for device objects representing
10 fixed ACPI hardware features (like power and sleep
11 buttons).
12
13 What: /sys/bus/acpi/devices/.../modalias
14 Date: July 2007
15 Contact: Rafael J. Wysocki <rafael@kernel.org>
16 Description:
17 This attribute indicates the PNP IDs of the device object.
18 That is acpi:HHHHHHHH:[CCCCCCC:]. Where each HHHHHHHH or
19 CCCCCCCC contains device object's PNPID (_HID or _CID).
20
21 What: /sys/bus/acpi/devices/.../hid
22 Date: April 2005
23 Contact: Rafael J. Wysocki <rafael@kernel.org>
24 Description:
25 This attribute indicates the hardware ID (_HID) of the
26 device object. For example, PNP0103.
27 This file is present for device objects having the _HID
28 control method.
29
30 What: /sys/bus/acpi/devices/.../description
31 Date: October 2012
32 Contact: Rafael J. Wysocki <rafael@kernel.org>
33 Description:
34 This attribute contains the output of the device object's
35 _STR control method, if present.
36
37 What: /sys/bus/acpi/devices/.../adr
38 Date: October 2012
39 Contact: Rafael J. Wysocki <rafael@kernel.org>
40 Description:
41 This attribute contains the output of the device object's
42 _ADR control method, which is present for ACPI device
43 objects representing devices having standard enumeration
44 algorithms, such as PCI.
45
46 What: /sys/bus/acpi/devices/.../uid
47 Date: October 2012
48 Contact: Rafael J. Wysocki <rafael@kernel.org>
49 Description:
50 This attribute contains the output of the device object's
51 _UID control method, if present.
52
53 What: /sys/bus/acpi/devices/.../eject
54 Date: December 2006
55 Contact: Rafael J. Wysocki <rafael@kernel.org>
56 Description:
57 Writing 1 to this attribute will trigger hot removal of
58 this device object. This file exists for every device
59 object that has _EJ0 method.
60
61 What: /sys/bus/acpi/devices/.../status
62 Date: Jan, 2014
63 Contact: Rafael J. Wysocki <rafael@kernel.org>
64 Description:
65 (RO) Returns the ACPI device status: enabled, disabled or
66 functioning or present, if the method _STA is present.
67
68 The return value is a decimal integer representing the device's
69 status bitmap:
70
71 =========== ==================================================
72 Bit [0] Set if the device is present.
73 Bit [1] Set if the device is enabled and decoding its
74 resources.
75 Bit [2] Set if the device should be shown in the UI.
76 Bit [3] Set if the device is functioning properly (cleared
77 if device failed its diagnostics).
78 Bit [4] Set if the battery is present.
79 Bits [31:5] Reserved (must be cleared)
80 =========== ==================================================
81
82 If bit [0] is clear, then bit 1 must also be clear (a device
83 that is not present cannot be enabled).
84
85 Bit 0 can be clear (not present) with bit [3] set (device is
86 functional). This case is used to indicate a valid device for
87 which no device driver should be loaded.
88
89 More special cases are covered in the ACPI specification.
90
91 What: /sys/bus/acpi/devices/.../hrv
92 Date: Apr, 2016
93 Contact: Rafael J. Wysocki <rafael@kernel.org>
94 Description:
95 (RO) Allows users to read the hardware version of non-PCI
96 hardware, if the _HRV control method is present. It is mostly
97 useful for non-PCI devices because lspci can list the hardware
98 version for PCI devices.
99

3. 한국어 전문 번역

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

ACPI namespace object의 full path

1-11
항목전문 번역
What/sys/bus/acpi/devices/.../path
Date2006년 12월
ContactRafael J. Wysocki <rafael@kernel.org>
Description이 attribute는 device object와 연결된 ACPI namespace object의 full path를 나타냅니다. 예: \_SB_.PCI0.
예외Power button과 sleep button 같은 fixed ACPI hardware feature를 나타내는 device object에는 이 file이 없습니다.

ACPI PNP modalias와 _HID

13-28
WhatDateContact전문 번역
/sys/bus/acpi/devices/.../modalias2007년 7월Rafael J. Wysocki <rafael@kernel.org>이 attribute는 device object의 PNP IDs를 나타냅니다. 형식은 acpi:HHHHHHHH:[CCCCCCC:]입니다. 각 HHHHHHHH 또는 CCCCCCCC에는 device object의 PNPID(_HID 또는 _CID)가 들어갑니다.
/sys/bus/acpi/devices/.../hid2005년 4월Rafael J. Wysocki <rafael@kernel.org>이 attribute는 device object의 hardware ID(_HID)를 나타냅니다. 예: PNP0103. _HID control method가 있는 device object에 이 file이 존재합니다.

ACPI control method output attributes

30-51
WhatDateContact전문 번역
/sys/bus/acpi/devices/.../description2012년 10월Rafael J. Wysocki <rafael@kernel.org>Device object의 _STR control method가 있다면 그 output을 담습니다.
/sys/bus/acpi/devices/.../adr2012년 10월Rafael J. Wysocki <rafael@kernel.org>Device object의 _ADR control method output을 담습니다. _ADR은 PCI처럼 standard enumeration algorithm을 사용하는 device를 나타내는 ACPI device object에 있습니다.
/sys/bus/acpi/devices/.../uid2012년 10월Rafael J. Wysocki <rafael@kernel.org>Device object의 _UID control method가 있다면 그 output을 담습니다.
ACPI methods에서 sysfs attributes로의 mapping
_HID and _CIDmodalias and hid
_STRdescription
_ADRadr for standard-enumerated devices such as PCI
_UIDuid
_HRVhrv
_EJ0eject control
_STAstatus bitmap

Firmware namespace의 identification·description·address·instance methods가 Linux ACPI device attributes에 대응한다.

ACPI device hot removal

53-59
항목전문 번역
What/sys/bus/acpi/devices/.../eject
Date2006년 12월
ContactRafael J. Wysocki <rafael@kernel.org>
Description이 attribute에 1을 쓰면 해당 device object의 hot removal을 trigger합니다. _EJ0 method가 있는 모든 device object에 이 file이 존재합니다.

ACPI _STA status bitmap

61-89
항목전문 번역
What/sys/bus/acpi/devices/.../status
Date2014년 1월
ContactRafael J. Wysocki <rafael@kernel.org>
Description(RO) _STA method가 있다면 enabled, disabled, functioning 또는 present 상태를 포함한 ACPI device status를 반환합니다. Return value는 device status bitmap을 나타내는 decimal integer입니다.
Bit전문 번역
Bit [0]Device가 present이면 set됩니다.
Bit [1]Device가 enabled이고 자신의 resource를 decoding하고 있으면 set됩니다.
Bit [2]Device를 UI에 표시해야 하면 set됩니다.
Bit [3]Device가 올바르게 functioning하면 set됩니다. Device가 diagnostics에 실패했다면 clear됩니다.
Bit [4]Battery가 present이면 set됩니다.
Bits [31:5]Reserved이며 반드시 clear되어야 합니다.

Bit [0]이 clear라면 bit [1]도 반드시 clear여야 합니다. Present하지 않은 device는 enabled일 수 없기 때문입니다.

Bit [0]이 clear(not present)인 동시에 bit [3]이 set(device functional)될 수 있습니다. 이 경우는 유효한 device이지만 어떤 device driver도 load하지 않아야 함을 나타낼 때 사용합니다.

그 밖의 특수 사례는 ACPI specification에서 다룹니다.

Non-PCI hardware version

91-98
항목전문 번역
What/sys/bus/acpi/devices/.../hrv
Date2016년 4월
ContactRafael J. Wysocki <rafael@kernel.org>
Description(RO) _HRV control method가 있다면 user가 non-PCI hardware의 hardware version을 읽을 수 있게 합니다. lspci가 PCI device의 hardware version을 나열할 수 있으므로 주로 non-PCI device에 유용합니다.