← Documents Documentation/hwmon/smpro-hwmon.rst GitHub 원문 ↗

Linux 6.18.37 · Hardware Monitoring

Kernel driver smpro-hwmon

Ampere Altra SMpro가 제공하는 SoC·VRD·DIMM 온도와 전기 센서를 노출합니다.

Source pathDocumentation/hwmon/smpro-hwmon.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약·해설

smpro-hwmon.rst:1-102

SMpro 인스턴스별로 13개 온도 입력과 Core·SoC·DIMM·RCA VRD의 전압·전류·전력을 제공하며 SoC가 꺼지면 -ENXIO를 반환합니다.

문서 개요
항목
SourceDocumentation/hwmon/smpro-hwmon.rst
분량102 source lines
온도13개 입력
전기 채널VRD 영역 5개

원문 분량과 핵심 장치 구성을 정리합니다.

운영 흐름
SMpro 인스턴스 선택레이블 확인온도·임계값 판독VRD 전기값 판독전원 꺼짐 오류 처리

장치 식별부터 센서 확인까지의 핵심 순서입니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0-only
2
3 Kernel driver Ampere(R)'s Altra(R) SMpro hwmon
4 ==============================================
5
6 Supported chips:
7
8 * Ampere(R) Altra(R)
9
10 Prefix: ``smpro``
11
12 Reference: `Altra SoC BMC Interface Specification`
13
14 Author: Thu Nguyen <thu@os.amperecomputing.com>
15
16 Description
17 -----------
18 The smpro-hwmon driver supports hardware monitoring for Ampere(R) Altra(R)
19 SoCs based on the SMpro co-processor (SMpro). The following sensor metrics
20 are supported by the driver:
21
22 * temperature
23 * voltage
24 * current
25 * power
26
27 The interface provides the registers to query the various sensors and
28 their values which are then exported to userspace by this driver.
29
30 Usage Notes
31 -----------
32
33 The driver creates at least two sysfs files for each sensor.
34
35 * ``<sensor_type><idx>_label`` reports the sensor label.
36 * ``<sensor_type><idx>_input`` returns the sensor value.
37
38 The sysfs files are allocated in the SMpro rootfs folder, with one root
39 directory for each instance.
40
41 When the SoC is turned off, the driver will fail to read registers and
42 return ``-ENXIO``.
43
44 Sysfs entries
45 -------------
46
47 The following sysfs files are supported:
48
49 * Ampere(R) Altra(R):
50
51 ============ ============= ====== ===============================================
52 Name Unit Perm Description
53 ============ ============= ====== ===============================================
54 temp1_input millicelsius RO SoC temperature
55 temp2_input millicelsius RO Max temperature reported among SoC VRDs
56 temp2_crit millicelsius RO SoC VRD HOT Threshold temperature
57 temp3_input millicelsius RO Max temperature reported among DIMM VRDs
58 temp4_input millicelsius RO Max temperature reported among Core VRDs
59 temp5_input millicelsius RO Temperature of DIMM0 on CH0
60 temp5_crit millicelsius RO MEM HOT Threshold for all DIMMs
61 temp6_input millicelsius RO Temperature of DIMM0 on CH1
62 temp6_crit millicelsius RO MEM HOT Threshold for all DIMMs
63 temp7_input millicelsius RO Temperature of DIMM0 on CH2
64 temp7_crit millicelsius RO MEM HOT Threshold for all DIMMs
65 temp8_input millicelsius RO Temperature of DIMM0 on CH3
66 temp8_crit millicelsius RO MEM HOT Threshold for all DIMMs
67 temp9_input millicelsius RO Temperature of DIMM0 on CH4
68 temp9_crit millicelsius RO MEM HOT Threshold for all DIMMs
69 temp10_input millicelsius RO Temperature of DIMM0 on CH5
70 temp10_crit millicelsius RO MEM HOT Threshold for all DIMMs
71 temp11_input millicelsius RO Temperature of DIMM0 on CH6
72 temp11_crit millicelsius RO MEM HOT Threshold for all DIMMs
73 temp12_input millicelsius RO Temperature of DIMM0 on CH7
74 temp12_crit millicelsius RO MEM HOT Threshold for all DIMMs
75 temp13_input millicelsius RO Max temperature reported among RCA VRDs
76 in0_input millivolts RO Core voltage
77 in1_input millivolts RO SoC voltage
78 in2_input millivolts RO DIMM VRD1 voltage
79 in3_input millivolts RO DIMM VRD2 voltage
80 in4_input millivolts RO RCA VRD voltage
81 cur1_input milliamperes RO Core VRD current
82 cur2_input milliamperes RO SoC VRD current
83 cur3_input milliamperes RO DIMM VRD1 current
84 cur4_input milliamperes RO DIMM VRD2 current
85 cur5_input milliamperes RO RCA VRD current
86 power1_input microwatts RO Core VRD power
87 power2_input microwatts RO SoC VRD power
88 power3_input microwatts RO DIMM VRD1 power
89 power4_input microwatts RO DIMM VRD2 power
90 power5_input microwatts RO RCA VRD power
91 ============ ============= ====== ===============================================
92
93 Example::
94
95 # cat in0_input
96 830
97 # cat temp1_input
98 37000
99 # cat curr1_input
100 9000
101 # cat power5_input
102 19500000
103

3. 한국어 전문 번역

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

Ampere Altra SMpro 센서 인터페이스

1-29

GPL-2.0-only 라이선스의 `smpro-hwmon` 드라이버는 Ampere Altra SoC의 SMpro 보조 프로세서 기반 하드웨어 모니터링을 지원합니다. 접두사는 `smpro`이며 참조 문서는 `Altra SoC BMC Interface Specification`입니다. 작성자는 Thu Nguyen입니다.

드라이버가 지원하는 측정 범주는 온도, 전압, 전류, 전력입니다. SMpro 인터페이스는 여러 센서와 값을 질의할 레지스터를 제공하고 드라이버가 이를 사용자 공간에 노출합니다.

SMpro 측정 범주
센서 유형사용자 공간 단위
온도밀리섭씨
전압밀리볼트
전류밀리암페어
전력마이크로와트

SMpro 레지스터에서 hwmon으로 전달되는 네 센서 유형입니다.

SMpro 센서 전달
Ampere Altra SMpro 인스턴스 탐지센서 목록과 레지스터 확인온도·전압·전류·전력 값 질의유형별 단위로 변환label·input 속성 생성

보조 프로세서 레지스터의 센서 값을 유형별 hwmon 속성으로 만듭니다.

.. SPDX-License-Identifier: GPL-2.0-only

Kernel driver Ampere(R)'s Altra(R) SMpro hwmon
==============================================

Supported chips:

  * Ampere(R) Altra(R)

    Prefix: ``smpro``

    Reference: `Altra SoC BMC Interface Specification`

Author: Thu Nguyen <thu@os.amperecomputing.com>

Description
-----------
The smpro-hwmon driver supports hardware monitoring for Ampere(R) Altra(R)
SoCs based on the SMpro co-processor (SMpro).  The following sensor metrics
are supported by the driver:

  * temperature
  * voltage
  * current
  * power

The interface provides the registers to query the various sensors and
their values which are then exported to userspace by this driver.

인스턴스별 rootfs와 SoC 꺼짐 오류

30-43

드라이버는 센서마다 최소 두 개의 sysfs 파일을 만듭니다. `<sensor_type><idx>_label`은 센서 레이블, `<sensor_type><idx>_input`은 센서 값을 반환합니다.

sysfs 파일은 인스턴스마다 하나의 루트 디렉터리를 갖는 SMpro rootfs 폴더에 배치됩니다.

SoC 전원이 꺼져 있으면 레지스터 읽기에 실패하고 드라이버는 `-ENXIO`를 반환합니다.

SMpro sysfs 생성 규칙
항목동작
<sensor_type><idx>_label센서 레이블
<sensor_type><idx>_input센서 측정값
루트 디렉터리SMpro 인스턴스마다 하나
SoC 꺼짐레지스터 읽기 실패, -ENXIO

각 센서의 기본 파일과 전원 상태 오류입니다.

SMpro 값 읽기
SMpro 인스턴스 루트 선택label 파일로 센서 식별SoC 전원 상태 확인input 레지스터 읽기꺼진 SoC의 -ENXIO 처리

인스턴스와 레이블을 찾은 뒤 SoC 전원 상태를 고려해 값을 읽습니다.

Usage Notes
-----------

The driver creates at least two sysfs files for each sensor.

* ``<sensor_type><idx>_label`` reports the sensor label.
* ``<sensor_type><idx>_input`` returns the sensor value.

The sysfs files are allocated in the SMpro rootfs folder, with one root
directory for each instance.

When the SoC is turned off, the driver will fail to read registers and
return ``-ENXIO``.

SoC·VRD·DIMM 온도 채널

44-74

Ampere Altra의 온도 속성은 모두 읽기 전용이고 밀리섭씨 단위를 사용합니다. `temp1_input`은 SoC 온도입니다. `temp2_input`은 SoC VRD들 중 최대 온도이며 `temp2_crit`은 SoC VRD HOT 임계 온도입니다.

`temp3_input`은 DIMM VRD 중 최대 온도, `temp4_input`은 Core VRD 중 최대 온도입니다.

`temp5_input`부터 `temp12_input`은 각각 CH0부터 CH7의 DIMM0 온도입니다. 각 채널의 `tempX_crit`은 모든 DIMM에 적용되는 MEM HOT 임계값입니다. `temp13_input`은 RCA VRD 중 최대 온도입니다.

SMpro 온도 속성
속성단위설명
temp1_input밀리섭씨SoC 온도
temp2_input밀리섭씨SoC VRD 중 최대 온도
temp2_crit밀리섭씨SoC VRD HOT 임계 온도
temp3_input밀리섭씨DIMM VRD 중 최대 온도
temp4_input밀리섭씨Core VRD 중 최대 온도
temp5_input / temp5_crit밀리섭씨CH0 DIMM0 온도 / 전체 DIMM MEM HOT 임계값
temp6_input / temp6_crit밀리섭씨CH1 DIMM0 온도 / 전체 DIMM MEM HOT 임계값
temp7_input / temp7_crit밀리섭씨CH2 DIMM0 온도 / 전체 DIMM MEM HOT 임계값
temp8_input / temp8_crit밀리섭씨CH3 DIMM0 온도 / 전체 DIMM MEM HOT 임계값
temp9_input / temp9_crit밀리섭씨CH4 DIMM0 온도 / 전체 DIMM MEM HOT 임계값
temp10_input / temp10_crit밀리섭씨CH5 DIMM0 온도 / 전체 DIMM MEM HOT 임계값
temp11_input / temp11_crit밀리섭씨CH6 DIMM0 온도 / 전체 DIMM MEM HOT 임계값
temp12_input / temp12_crit밀리섭씨CH7 DIMM0 온도 / 전체 DIMM MEM HOT 임계값
temp13_input밀리섭씨RCA VRD 중 최대 온도

13개 온도 입력과 관련 임계값을 채널별로 보존합니다.

Altra 열 상태 집계
temp1에서 SoC 온도 판독SoC·DIMM·Core·RCA VRD 최대 온도 판독CH0~CH7 DIMM0 온도 판독VRD HOT·MEM HOT 임계값과 비교가장 높은 열 위험 영역 보고

SoC와 VRD 최대값, 채널별 DIMM 온도를 함께 확인합니다.

Sysfs entries
-------------

The following sysfs files are supported:

* Ampere(R) Altra(R):

  ============    =============  ======  ===============================================
  Name            Unit           Perm    Description
  ============    =============  ======  ===============================================
  temp1_input     millicelsius   RO      SoC temperature
  temp2_input     millicelsius   RO      Max temperature reported among SoC VRDs
  temp2_crit      millicelsius   RO      SoC VRD HOT Threshold temperature
  temp3_input     millicelsius   RO      Max temperature reported among DIMM VRDs
  temp4_input     millicelsius   RO      Max temperature reported among Core VRDs
  temp5_input     millicelsius   RO      Temperature of DIMM0 on CH0
  temp5_crit      millicelsius   RO      MEM HOT Threshold for all DIMMs
  temp6_input     millicelsius   RO      Temperature of DIMM0 on CH1
  temp6_crit      millicelsius   RO      MEM HOT Threshold for all DIMMs
  temp7_input     millicelsius   RO      Temperature of DIMM0 on CH2
  temp7_crit      millicelsius   RO      MEM HOT Threshold for all DIMMs
  temp8_input     millicelsius   RO      Temperature of DIMM0 on CH3
  temp8_crit      millicelsius   RO      MEM HOT Threshold for all DIMMs
  temp9_input     millicelsius   RO      Temperature of DIMM0 on CH4
  temp9_crit      millicelsius   RO      MEM HOT Threshold for all DIMMs
  temp10_input    millicelsius   RO      Temperature of DIMM0 on CH5
  temp10_crit     millicelsius   RO      MEM HOT Threshold for all DIMMs
  temp11_input    millicelsius   RO      Temperature of DIMM0 on CH6
  temp11_crit     millicelsius   RO      MEM HOT Threshold for all DIMMs
  temp12_input    millicelsius   RO      Temperature of DIMM0 on CH7
  temp12_crit     millicelsius   RO      MEM HOT Threshold for all DIMMs

VRD 전압·전류·전력 채널

75-102

`in0_input`부터 `in4_input`은 밀리볼트 단위이며 각각 Core, SoC, DIMM VRD1, DIMM VRD2, RCA VRD 전압입니다.

`cur1_input`부터 `cur5_input`은 밀리암페어 단위이며 같은 순서로 Core, SoC, DIMM VRD1, DIMM VRD2, RCA VRD 전류를 나타냅니다. 원문의 예제는 `curr1_input`을 읽어 `9000`을 출력하므로 표의 `cur1_input` 표기와 차이가 있음을 그대로 보존합니다.

`power1_input`부터 `power5_input`은 마이크로와트 단위이며 Core, SoC, DIMM VRD1, DIMM VRD2, RCA VRD 전력입니다.

예제 출력은 Core 전압 `in0_input=830`, SoC 온도 `temp1_input=37000`, Core 전류 `curr1_input=9000`, RCA VRD 전력 `power5_input=19500000`입니다.

SMpro 전기 채널
영역전압·밀리볼트전류·밀리암페어전력·마이크로와트
Core VRDin0_inputcur1_inputpower1_input
SoC VRDin1_inputcur2_inputpower2_input
DIMM VRD1in2_inputcur3_inputpower3_input
DIMM VRD2in3_inputcur4_inputpower4_input
RCA VRDin4_inputcur5_inputpower5_input

다섯 VRD 영역의 전압·전류·전력을 같은 순서로 대응시킵니다.

VRD 전력 상태 읽기
Core·SoC·DIMM1·DIMM2·RCA 영역 선택inX_input 전압 판독curX_input 전류 판독powerX_input 전력 판독온도 채널과 함께 VRD 상태 평가

동일한 VRD 영역의 전압·전류·전력을 묶어 해석합니다.

  temp13_input    millicelsius   RO      Max temperature reported among RCA VRDs
  in0_input       millivolts     RO      Core voltage
  in1_input       millivolts     RO      SoC voltage
  in2_input       millivolts     RO      DIMM VRD1 voltage
  in3_input       millivolts     RO      DIMM VRD2 voltage
  in4_input       millivolts     RO      RCA VRD voltage
  cur1_input      milliamperes   RO      Core VRD current
  cur2_input      milliamperes   RO      SoC VRD current
  cur3_input      milliamperes   RO      DIMM VRD1 current
  cur4_input      milliamperes   RO      DIMM VRD2 current
  cur5_input      milliamperes   RO      RCA VRD current
  power1_input    microwatts     RO      Core VRD power
  power2_input    microwatts     RO      SoC VRD power
  power3_input    microwatts     RO      DIMM VRD1 power
  power4_input    microwatts     RO      DIMM VRD2 power
  power5_input    microwatts     RO      RCA VRD power
  ============    =============  ======  ===============================================

  Example::

    # cat in0_input
    830
    # cat temp1_input
    37000
    # cat curr1_input
    9000
    # cat power5_input
    19500000