← Documents Documentation/hwmon/occ.rst GitHub 원문 ↗

Linux 6.18.37 · Hardware Monitoring

Kernel driver occ-hwmon

POWER8/POWER9 OCC의 온도·주파수·전력·시스템 전력 상한과 확장 센서를 제공합니다.

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

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

1. 요약·해설

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

요약·해설

occ.rst:1-153

I2C 또는 FSI로 OCC 센서를 읽고 버전별 온도·전력 라벨, master OCC의 시스템 상한, 6바이트 확장 데이터를 공개합니다.

문서 개요
항목
SourceDocumentation/hwmon/occ.rst
분량153 source lines
지원 칩POWER8/POWER9
전력 단위µW

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

운영 흐름
OCC 프로브센서 ID 공개버전별 속성 판별전력 상한 처리extn 데이터 제공

장치 인식부터 측정·제어까지의 핵심 순서입니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 Kernel driver occ-hwmon
2 =======================
3
4 Supported chips:
5
6 * POWER8
7 * POWER9
8
9 Author: Eddie James <[email protected]>
10
11 Description
12 -----------
13
14 This driver supports hardware monitoring for the On-Chip Controller (OCC)
15 embedded on POWER processors. The OCC is a device that collects and aggregates
16 sensor data from the processor and the system. The OCC can provide the raw
17 sensor data as well as perform thermal and power management on the system.
18
19 The P8 version of this driver is a client driver of I2C. It may be probed
20 manually if an "ibm,p8-occ-hwmon" compatible device is found under the
21 appropriate I2C bus node in the device-tree.
22
23 The P9 version of this driver is a client driver of the FSI-based OCC driver.
24 It will be probed automatically by the FSI-based OCC driver.
25
26 Sysfs entries
27 -------------
28
29 The following attributes are supported. All attributes are read-only unless
30 specified.
31
32 The OCC sensor ID is an integer that represents the unique identifier of the
33 sensor with respect to the OCC. For example, a temperature sensor for the third
34 DIMM slot in the system may have a sensor ID of 7. This mapping is unavailable
35 to the device driver, which must therefore export the sensor ID as-is.
36
37 Some entries are only present with certain OCC sensor versions or only on
38 certain OCCs in the system. The version number is not exported to the user
39 but can be inferred.
40
41 temp[1-n]_label
42 OCC sensor ID.
43
44 [with temperature sensor version 1]
45
46 temp[1-n]_input
47 Measured temperature of the component in millidegrees
48 Celsius.
49
50 [with temperature sensor version >= 2]
51
52 temp[1-n]_type
53 The FRU (Field Replaceable Unit) type
54 (represented by an integer) for the component
55 that this sensor measures.
56 temp[1-n]_fault
57 Temperature sensor fault boolean; 1 to indicate
58 that a fault is present or 0 to indicate that
59 no fault is present.
60
61 [with type == 3 (FRU type is VRM)]
62
63 temp[1-n]_alarm
64 VRM temperature alarm boolean; 1 to indicate
65 alarm, 0 to indicate no alarm
66
67 [else]
68
69 temp[1-n]_input
70 Measured temperature of the component in
71 millidegrees Celsius.
72
73 freq[1-n]_label
74 OCC sensor ID.
75 freq[1-n]_input
76 Measured frequency of the component in MHz.
77 power[1-n]_input
78 Latest measured power reading of the component in
79 microwatts.
80 power[1-n]_average
81 Average power of the component in microwatts.
82 power[1-n]_average_interval
83 The amount of time over which the power average
84 was taken in microseconds.
85
86 [with power sensor version < 2]
87
88 power[1-n]_label
89 OCC sensor ID.
90
91 [with power sensor version >= 2]
92
93 power[1-n]_label
94 OCC sensor ID + function ID + channel in the form
95 of a string, delimited by underscores, i.e. "0_15_1".
96 Both the function ID and channel are integers that
97 further identify the power sensor.
98
99 [with power sensor version 0xa0]
100
101 power[1-n]_label
102 OCC sensor ID + sensor type in the form of a string,
103 delimited by an underscore, i.e. "0_system". Sensor
104 type will be one of "system", "proc", "vdd" or "vdn".
105 For this sensor version, OCC sensor ID will be the same
106 for all power sensors.
107
108 [present only on "master" OCC; represents the whole system power; only one of
109 this type of power sensor will be present]
110
111 power[1-n]_label
112 "system"
113 power[1-n]_input
114 Latest system output power in microwatts.
115 power[1-n]_cap
116 Current system power cap in microwatts.
117 power[1-n]_cap_not_redundant
118 System power cap in microwatts when
119 there is not redundant power.
120 power[1-n]_cap_max
121 Maximum power cap that the OCC can enforce in
122 microwatts.
123 power[1-n]_cap_min Minimum power cap that the OCC can enforce in
124 microwatts.
125 power[1-n]_cap_user The power cap set by the user, in microwatts.
126 This attribute will return 0 if no user power
127 cap has been set. This attribute is read-write,
128 but writing any precision below watts will be
129 ignored, i.e. requesting a power cap of
130 500900000 microwatts will result in a power cap
131 request of 500 watts.
132
133 [with caps sensor version > 1]
134
135 power[1-n]_cap_user_source
136 Indicates how the user power cap was
137 set. This is an integer that maps to
138 system or firmware components that can
139 set the user power cap.
140
141 The following "extn" sensors are exported as a way for the OCC to provide data
142 that doesn't fit anywhere else. The meaning of these sensors is entirely
143 dependent on their data, and cannot be statically defined.
144
145 extn[1-n]_label
146 ASCII ID or OCC sensor ID.
147 extn[1-n]_flags
148 This is one byte hexadecimal value. Bit 7 indicates the
149 type of the label attribute; 1 for sensor ID, 0 for
150 ASCII ID. Other bits are reserved.
151 extn[1-n]_input
152 6 bytes of hexadecimal data, with a meaning defined by
153 the sensor ID.
154

3. 한국어 전문 번역

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

POWER8/POWER9 On-Chip Controller

1-25

`occ-hwmon` 드라이버는 POWER8과 POWER9 프로세서에 내장된 OCC(On-Chip Controller)의 하드웨어 모니터링을 지원합니다. 작성자는 Eddie James입니다.

OCC는 프로세서와 시스템의 센서 데이터를 수집하고 집계하는 장치입니다. 원시 센서 데이터를 제공하는 것뿐 아니라 시스템의 열 및 전력 관리도 수행할 수 있습니다.

POWER8 버전은 I2C 클라이언트 드라이버입니다. 적절한 I2C 버스의 장치 트리 아래에 `ibm,p8-occ-hwmon` 호환 장치가 있으면 수동으로 프로브할 수 있습니다.

POWER9 버전은 FSI 기반 OCC 드라이버의 클라이언트이며, FSI 기반 상위 드라이버가 자동으로 프로브합니다.

OCC 세대별 연결
세대상위 버스·드라이버프로브 방식
POWER8I2Cibm,p8-occ-hwmon 장치 트리로 수동 가능
POWER9FSI 기반 OCC 드라이버상위 드라이버가 자동 프로브
공통 역할OCC센서 집계, 열·전력 관리

POWER 세대에 따라 프로브 경로가 다릅니다.

OCC hwmon 등록
POWER 세대 확인P8이면 I2C 장치 트리 탐색P9이면 FSI OCC 클라이언트 등록OCC 센서 데이터 수집hwmon 속성 생성

프로세서 세대에 맞는 전송 계층을 통해 센서를 공개합니다.

Kernel driver occ-hwmon
=======================

Supported chips:

  * POWER8
  * POWER9

Author: Eddie James <[email protected]>

Description
-----------

This driver supports hardware monitoring for the On-Chip Controller (OCC)
embedded on POWER processors. The OCC is a device that collects and aggregates
sensor data from the processor and the system. The OCC can provide the raw
sensor data as well as perform thermal and power management on the system.

The P8 version of this driver is a client driver of I2C. It may be probed
manually if an "ibm,p8-occ-hwmon" compatible device is found under the
appropriate I2C bus node in the device-tree.

The P9 version of this driver is a client driver of the FSI-based OCC driver.
It will be probed automatically by the FSI-based OCC driver.

OCC 센서 ID와 온도 센서 버전

26-72

아래 속성은 별도 표시가 없으면 모두 읽기 전용입니다. OCC 센서 ID는 OCC 내부에서 센서를 고유하게 구분하는 정수입니다. 예를 들어 세 번째 DIMM 슬롯의 온도 센서가 ID 7일 수 있습니다.

센서 ID와 실제 시스템 부품의 대응 관계를 장치 드라이버는 알 수 없으므로 ID를 받은 그대로 사용자 공간에 공개해야 합니다. 일부 속성은 특정 OCC 또는 센서 버전에서만 나타나며, 버전 번호 자체는 공개되지 않지만 속성 구성을 통해 추론할 수 있습니다.

`temp[1-n]_label`은 OCC 센서 ID입니다. 온도 센서 버전 1에서는 `temp[1-n]_input`이 부품의 측정 온도를 밀리도 섭씨로 제공합니다.

온도 센서 버전 2 이상에서는 `temp[1-n]_type`이 정수형 FRU(Field Replaceable Unit) 종류를, `temp[1-n]_fault`가 센서 고장 여부를 제공합니다. 고장이 있으면 1, 없으면 0입니다.

FRU type이 3인 VRM 센서는 일반 온도 입력 대신 `temp[1-n]_alarm`을 제공하며, 경보가 있으면 1입니다. 그 밖의 FRU는 `temp[1-n]_input`으로 밀리도 섭씨 온도를 제공합니다.

OCC 온도 속성 버전
조건속성의미
모든 버전temp[1-n]_labelOCC 센서 ID
온도 버전 1temp[1-n]_input밀리°C 측정 온도
온도 버전 >= 2temp[1-n]_type정수형 FRU 종류
온도 버전 >= 2temp[1-n]_fault고장 1, 정상 0
버전 >= 2, type == 3temp[1-n]_alarmVRM 온도 경보
버전 >= 2, type != 3temp[1-n]_input밀리°C 측정 온도

센서 버전과 FRU 종류에 따라 나타나는 속성을 구분합니다.

온도 속성 해석
temp label에서 OCC 센서 ID 읽기type·fault 존재 여부 확인없으면 버전 1 input 읽기type 3이면 VRM alarm 확인그 밖에는 input 온도 읽기

노출된 속성 조합으로 센서 버전과 종류를 판단합니다.

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

The following attributes are supported. All attributes are read-only unless
specified.

The OCC sensor ID is an integer that represents the unique identifier of the
sensor with respect to the OCC. For example, a temperature sensor for the third
DIMM slot in the system may have a sensor ID of 7. This mapping is unavailable
to the device driver, which must therefore export the sensor ID as-is.

Some entries are only present with certain OCC sensor versions or only on
certain OCCs in the system. The version number is not exported to the user
but can be inferred.

temp[1-n]_label
        OCC sensor ID.

[with temperature sensor version 1]

    temp[1-n]_input
                        Measured temperature of the component in millidegrees
                        Celsius.

[with temperature sensor version >= 2]

    temp[1-n]_type
                                The FRU (Field Replaceable Unit) type
                                (represented by an integer) for the component
                                that this sensor measures.
    temp[1-n]_fault
                                Temperature sensor fault boolean; 1 to indicate
                                that a fault is present or 0 to indicate that
                                no fault is present.

    [with type == 3 (FRU type is VRM)]

        temp[1-n]_alarm
                                VRM temperature alarm boolean; 1 to indicate
                                alarm, 0 to indicate no alarm

    [else]

        temp[1-n]_input
                                Measured temperature of the component in
                                millidegrees Celsius.

주파수·전력과 전력 센서 버전

73-107

`freq[1-n]_label`은 OCC 센서 ID이고 `freq[1-n]_input`은 측정 주파수를 MHz로 제공합니다. 전력 센서의 `power[1-n]_input`은 최신 측정값, `power[1-n]_average`는 평균값을 마이크로와트로 제공합니다.

`power[1-n]_average_interval`은 평균을 계산한 시간 구간을 마이크로초로 표시합니다.

전력 센서 버전 2 미만의 `power[1-n]_label`은 OCC 센서 ID입니다. 버전 2 이상에서는 센서 ID, function ID, channel을 밑줄로 연결한 문자열이며 예시는 `0_15_1`입니다. function ID와 channel은 전력 센서를 더 세밀하게 식별하는 정수입니다.

전력 센서 버전 `0xa0`에서는 라벨이 OCC 센서 ID와 센서 종류를 밑줄로 연결한 문자열입니다. 예를 들어 `0_system`이며, 종류는 `system`, `proc`, `vdd`, `vdn` 중 하나입니다. 이 버전에서는 모든 전력 센서의 OCC 센서 ID가 같습니다.

OCC 주파수·전력 형식
조건·속성형식 또는 단위
freq label/input센서 ID / MHz7 / 3200
power input/average마이크로와트최신값 / 평균값
average_interval마이크로초평균 계산 구간
전력 버전 < 2 labelOCC 센서 ID7
전력 버전 >= 2 labelID_function_channel0_15_1
전력 버전 0xa0 labelID_sensor-type0_system

단위와 버전별 라벨 형식을 정리합니다.

전력 라벨 판독
power label 문자열 읽기단일 정수면 버전 2 미만세 정수면 ID·function·channel 분리문자 종류면 0xa0 센서 유형 분리input·average·interval과 연결

라벨 모양과 부가 속성으로 센서 버전을 추론합니다.

freq[1-n]_label
                        OCC sensor ID.
freq[1-n]_input
                        Measured frequency of the component in MHz.
power[1-n]_input
                        Latest measured power reading of the component in
                        microwatts.
power[1-n]_average
                        Average power of the component in microwatts.
power[1-n]_average_interval
                                The amount of time over which the power average
                                was taken in microseconds.

[with power sensor version < 2]

    power[1-n]_label
                        OCC sensor ID.

[with power sensor version >= 2]

    power[1-n]_label
                        OCC sensor ID + function ID + channel in the form
                        of a string, delimited by underscores, i.e. "0_15_1".
                        Both the function ID and channel are integers that
                        further identify the power sensor.

[with power sensor version 0xa0]

    power[1-n]_label
                        OCC sensor ID + sensor type in the form of a string,
                        delimited by an underscore, i.e. "0_system". Sensor
                        type will be one of "system", "proc", "vdd" or "vdn".
                        For this sensor version, OCC sensor ID will be the same
                        for all power sensors.

시스템 전력 상한과 확장 센서

108-153

시스템 전체 전력을 나타내는 센서는 master OCC에만 하나 존재합니다. 라벨은 `system`이고, `power[1-n]_input`은 최신 시스템 출력 전력을 마이크로와트로 제공합니다.

`power[1-n]_cap`은 현재 시스템 전력 상한, `cap_not_redundant`는 전원 중복성이 없을 때의 상한, `cap_max`와 `cap_min`은 OCC가 강제할 수 있는 최대·최소 상한을 마이크로와트로 제공합니다.

`power[1-n]_cap_user`는 사용자가 설정한 전력 상한이며 설정되지 않았으면 0을 반환합니다. 이 속성만 읽기·쓰기가 가능하지만 와트 미만의 정밀도는 무시됩니다. 따라서 500900000마이크로와트를 요청해도 실제 요청은 500와트가 됩니다.

caps 센서 버전이 1보다 크면 `power[1-n]_cap_user_source`가 사용자 전력 상한을 설정한 주체를 정수로 나타냅니다. 이 정수는 전력 상한을 설정할 수 있는 시스템 또는 펌웨어 구성 요소에 대응합니다.

`extn` 센서는 기존 분류에 맞지 않는 OCC 데이터를 내보내는 통로입니다. 의미는 데이터에 전적으로 의존하므로 정적으로 정의할 수 없습니다. `extn[1-n]_label`은 ASCII ID 또는 OCC 센서 ID입니다.

`extn[1-n]_flags`는 1바이트 16진수입니다. 비트 7이 1이면 label이 센서 ID, 0이면 ASCII ID이고 나머지 비트는 예약되어 있습니다. `extn[1-n]_input`은 센서 ID가 의미를 정의하는 6바이트 16진 데이터입니다.

시스템 전력 상한과 extn
속성권한·단위의미
power label/inputRO, system / µW시스템 전체 출력 전력
cap / cap_not_redundantRO, µW현재 상한 / 비중복 상한
cap_max / cap_minRO, µW강제 가능한 최대 / 최소
cap_userRW, µW사용자 상한, 와트 미만 정밀도 무시
cap_user_sourceRO, 정수caps 버전 > 1의 설정 주체
extn label/flagsROASCII 또는 센서 ID와 종류 비트
extn inputRO, 6바이트 16진수센서별 정의 데이터

master OCC 전력 제어와 확장 데이터 형식을 정리합니다.

시스템 전력 상한 적용
master OCC의 system 센서 찾기cap_min과 cap_max 확인요청값을 와트 정밀도로 내림cap_user에 기록cap과 cap_user_source로 결과 확인

지원 범위와 정밀도를 확인해 사용자 상한을 요청합니다.

[present only on "master" OCC; represents the whole system power; only one of
this type of power sensor will be present]

    power[1-n]_label
                                "system"
    power[1-n]_input
                                Latest system output power in microwatts.
    power[1-n]_cap
                                Current system power cap in microwatts.
    power[1-n]_cap_not_redundant
                                System power cap in microwatts when
                                there is not redundant power.
    power[1-n]_cap_max
                                Maximum power cap that the OCC can enforce in
                                microwatts.
    power[1-n]_cap_min                Minimum power cap that the OCC can enforce in
                                microwatts.
    power[1-n]_cap_user                The power cap set by the user, in microwatts.
                                This attribute will return 0 if no user power
                                cap has been set. This attribute is read-write,
                                but writing any precision below watts will be
                                ignored, i.e. requesting a power cap of
                                500900000 microwatts will result in a power cap
                                request of 500 watts.

    [with caps sensor version > 1]

        power[1-n]_cap_user_source
                                        Indicates how the user power cap was
                                        set. This is an integer that maps to
                                        system or firmware components that can
                                        set the user power cap.

The following "extn" sensors are exported as a way for the OCC to provide data
that doesn't fit anywhere else. The meaning of these sensors is entirely
dependent on their data, and cannot be statically defined.

extn[1-n]_label
                        ASCII ID or OCC sensor ID.
extn[1-n]_flags
                        This is one byte hexadecimal value. Bit 7 indicates the
                        type of the label attribute; 1 for sensor ID, 0 for
                        ASCII ID. Other bits are reserved.
extn[1-n]_input
                        6 bytes of hexadecimal data, with a meaning defined by
                        the sensor ID.