요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0-or-later
Kernel driver sbrmi
===================
Supported hardware:
* Sideband Remote Management Interface (SB-RMI) compliant AMD SoC
device connected to the BMC via the APML.
Prefix: 'sbrmi'
Addresses scanned: This driver doesn't support address scanning.
To instantiate this driver on an AMD CPU with SB-RMI
support, the i2c bus number would be the bus connected from the board
management controller (BMC) to the CPU.
The SMBus address is really 7 bits. Some vendors and the SMBus
specification show the address as 8 bits, left justified with the R/W
bit as a write (0) making bit 0. Some vendors use only the 7 bits
to describe the address.
As mentioned in AMD's APML specification, The SB-RMI address is
normally 78h(0111 100W) or 3Ch(011 1100) for socket 0 and 70h(0111 000W)
or 38h(011 1000) for socket 1, but it could vary based on hardware
address select pins.
Datasheet: The SB-RMI interface and protocol along with the Advanced
Platform Management Link (APML) Specification is available
as part of the open source SoC register reference at:
https://www.amd.com/en/support/tech-docs?keyword=55898
Author: Akshay Gupta <[email protected]>
Description
-----------
The APML provides a way to communicate with the SB Remote Management interface
(SB-RMI) module from the external SMBus master that can be used to report socket
power on AMD platforms using mailbox command and resembles a typical 8-pin remote
power sensor's I2C interface to BMC.
This driver implements current power with power cap and power cap max.
sysfs-Interface
---------------
Power sensors can be queried and set via the standard ``hwmon`` interface
on ``sysfs``, under the directory ``/sys/class/hwmon/hwmonX`` for some value
of ``X`` (search for the ``X`` such that ``/sys/class/hwmon/hwmonX/name`` has
content ``sbrmi``)
================ ===== ========================================================
Name Perm Description
================ ===== ========================================================
power1_input RO Current Power consumed
power1_cap RW Power limit can be set between 0 and power1_cap_max
power1_cap_max RO Maximum powerlimit calculated and reported by the SMU FW
================ ===== ========================================================
The following example show how the 'Power' attribute from the i2c-addresses
can be monitored using the userspace utilities like ``sensors`` binary::
# sensors
sbrmi-i2c-1-38
Adapter: bcm2835 I2C adapter
power1: 61.00 W (cap = 225.00 W)
sbrmi-i2c-1-3c
Adapter: bcm2835 I2C adapter
power1: 28.39 W (cap = 224.77 W)
#
Also, Below shows how get and set the values from sysfs entries individually::
# cat /sys/class/hwmon/hwmon1/power1_cap_max
225000000
# echo 180000000 > /sys/class/hwmon/hwmon1/power1_cap
# cat /sys/class/hwmon/hwmon1/power1_cap
180000000
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
AMD SB-RMI와 APML 주소 표기
1-34GPL-2.0-or-later `sbrmi` 드라이버는 AMD SB-RMI 규격을 구현한 SoC를 지원합니다. BMC는 APML 인터페이스의 BMC-to-CPU I2C 버스를 통해 CPU 소켓의 SB-RMI 기능에 접근합니다. 드라이버 접두사는 `sbrmi`이며 주소 검색은 수행하지 않습니다.
SMBus에서 실제로 사용하는 주소는 7비트이지만 일부 AMD 문서는 주소를 왼쪽 정렬하고 최하위 읽기·쓰기 비트를 0으로 둔 8비트 값으로 표기합니다. 따라서 같은 물리 주소가 두 형태로 나타날 수 있습니다.
일반적인 APML 구성에서 소켓 0은 8비트 표기 `78h` 또는 7비트 표기 `3Ch`, 소켓 1은 `70h` 또는 `38h`입니다. 주소 선택 핀의 배선에 따라 실제 주소는 달라질 수 있으므로 플랫폼 회로도를 확인해야 합니다.
문서는 AMD Open-Source Register Reference와 APML 자료를 참고하도록 안내하며 작성자는 Akshay Gupta입니다.
AMD 문서의 8비트 표기와 Linux I2C의 7비트 주소를 구분합니다.
문서의 표기 방식을 확인한 뒤 Linux가 요구하는 7비트 주소를 사용합니다.
.. SPDX-License-Identifier: GPL-2.0-or-later
Kernel driver sbrmi
===================
Supported hardware:
* Sideband Remote Management Interface (SB-RMI) compliant AMD SoC
device connected to the BMC via the APML.
Prefix: 'sbrmi'
Addresses scanned: This driver doesn't support address scanning.
To instantiate this driver on an AMD CPU with SB-RMI
support, the i2c bus number would be the bus connected from the board
management controller (BMC) to the CPU.
The SMBus address is really 7 bits. Some vendors and the SMBus
specification show the address as 8 bits, left justified with the R/W
bit as a write (0) making bit 0. Some vendors use only the 7 bits
to describe the address.
As mentioned in AMD's APML specification, The SB-RMI address is
normally 78h(0111 100W) or 3Ch(011 1100) for socket 0 and 70h(0111 000W)
or 38h(011 1000) for socket 1, but it could vary based on hardware
address select pins.
Datasheet: The SB-RMI interface and protocol along with the Advanced
Platform Management Link (APML) Specification is available
as part of the open source SoC register reference at:
https://www.amd.com/en/support/tech-docs?keyword=55898
Author: Akshay Gupta <[email protected]>
SB-RMI 메일박스 기반 소켓 전력 감시
35-59APML은 외부 SMBus 마스터인 BMC가 CPU의 SB-RMI 메일박스와 통신하게 하는 인터페이스입니다. 기능적으로는 BMC I2C 버스에 연결된 8핀 원격 전력 센서와 비슷하지만, 실제 측정 및 제어 정보는 AMD CPU 소켓의 관리 펌웨어에서 제공됩니다.
드라이버는 현재 소켓 전력, 설정 가능한 전력 상한, SMU 펌웨어가 허용하는 최대 전력 상한을 지원합니다.
hwmon 장치는 `/sys/class/hwmon/hwmonX` 아래에 만들어집니다. 여러 hwmon 장치 중 `name` 파일의 값이 `sbrmi`인 디렉터리를 찾아야 합니다.
CPU 소켓 전력 관리에서 읽거나 설정할 수 있는 값입니다.
BMC 요청이 SB-RMI 메일박스를 거쳐 SMU 전력 정보로 변환됩니다.
Description
-----------
The APML provides a way to communicate with the SB Remote Management interface
(SB-RMI) module from the external SMBus master that can be used to report socket
power on AMD platforms using mailbox command and resembles a typical 8-pin remote
power sensor's I2C interface to BMC.
This driver implements current power with power cap and power cap max.
sysfs-Interface
---------------
Power sensors can be queried and set via the standard ``hwmon`` interface
on ``sysfs``, under the directory ``/sys/class/hwmon/hwmonX`` for some value
of ``X`` (search for the ``X`` such that ``/sys/class/hwmon/hwmonX/name`` has
content ``sbrmi``)
================ ===== ========================================================
Name Perm Description
================ ===== ========================================================
power1_input RO Current Power consumed
power1_cap RW Power limit can be set between 0 and power1_cap_max
power1_cap_max RO Maximum powerlimit calculated and reported by the SMU FW
================ ===== ========================================================
전력 입력과 상한 설정 예
60-79`power1_input`은 읽기 전용이며 CPU 소켓의 현재 소비 전력을 표시합니다. `power1_cap`은 읽기·쓰기가 가능하고 0부터 `power1_cap_max`까지 설정할 수 있습니다. `power1_cap_max`는 SMU 펌웨어가 보고한 최대 전력 상한이며 읽기 전용입니다.
`sensors` 출력 예에서는 현재 전력이 약 61 W이고 상한은 225 W로 표시됩니다. 다른 예에서는 현재 전력이 28.39 W이고 상한은 224.77 W입니다.
sysfs 전력 속성은 마이크로와트 단위를 사용합니다. 예를 들어 최대 상한 `225000000`은 225 W이며, `power1_cap`에 `180000000`을 쓰면 상한을 180 W로 설정합니다.
소켓 전력의 측정값과 설정 가능한 제한값입니다.
최대 허용값을 확인한 뒤 마이크로와트 단위로 새 상한을 기록합니다.
The following example show how the 'Power' attribute from the i2c-addresses
can be monitored using the userspace utilities like ``sensors`` binary::
# sensors
sbrmi-i2c-1-38
Adapter: bcm2835 I2C adapter
power1: 61.00 W (cap = 225.00 W)
sbrmi-i2c-1-3c
Adapter: bcm2835 I2C adapter
power1: 28.39 W (cap = 224.77 W)
#
Also, Below shows how get and set the values from sysfs entries individually::
# cat /sys/class/hwmon/hwmon1/power1_cap_max
225000000
# echo 180000000 > /sys/class/hwmon/hwmon1/power1_cap
# cat /sys/class/hwmon/hwmon1/power1_cap
180000000
요약·해설
sbrmi.rst:1-79AMD 주소의 8비트·7비트 표기를 구분해 SB-RMI를 등록하고 현재 전력, 설정 상한, SMU 최대 상한을 마이크로와트로 다룹니다.
원문 분량과 핵심 장치 구성을 정리합니다.
장치 식별부터 센서 확인까지의 핵심 순서입니다.