Documentation/driver-api/ipmb.rst GitHub 원문 ↗

Linux 6.18.37 · Driver API

IPMB Driver for a Satellite MC

BMC와 Satellite MC 사이 IPMB/IPMI request path, ipmb-dev-int load와 bus별 device instantiation을 설명합니다.

Source pathDocumentation/driver-api/ipmb.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

ipmb.rst:1-109

IPMB는 chassis 내부 BMC와 management controller를 잇는 I2C 기반 management bus입니다. Satellite MC의 ipmb-dev-int는 I2C slave backend와 userspace read/write interface를 제공하며 각 BMC bus별로 /dev/ipmb-N device를 instantiate합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 ==============================
2 IPMB Driver for a Satellite MC
3 ==============================
4
5 The Intelligent Platform Management Bus or IPMB, is an
6 I2C bus that provides a standardized interconnection between
7 different boards within a chassis. This interconnection is
8 between the baseboard management (BMC) and chassis electronics.
9 IPMB is also associated with the messaging protocol through the
10 IPMB bus.
11
12 The devices using the IPMB are usually management
13 controllers that perform management functions such as servicing
14 the front panel interface, monitoring the baseboard,
15 hot-swapping disk drivers in the system chassis, etc...
16
17 When an IPMB is implemented in the system, the BMC serves as
18 a controller to give system software access to the IPMB. The BMC
19 sends IPMI requests to a device (usually a Satellite Management
20 Controller or Satellite MC) via IPMB and the device
21 sends a response back to the BMC.
22
23 For more information on IPMB and the format of an IPMB message,
24 refer to the IPMB and IPMI specifications.
25
26 IPMB driver for Satellite MC
27 ----------------------------
28
29 ipmb-dev-int - This is the driver needed on a Satellite MC to
30 receive IPMB messages from a BMC and send a response back.
31 This driver works with the I2C driver and a userspace
32 program such as OpenIPMI:
33
34 1) It is an I2C slave backend driver. So, it defines a callback
35 function to set the Satellite MC as an I2C slave.
36 This callback function handles the received IPMI requests.
37
38 2) It defines the read and write functions to enable a user
39 space program (such as OpenIPMI) to communicate with the kernel.
40
41
42 Load the IPMB driver
43 --------------------
44
45 The driver needs to be loaded at boot time or manually first.
46 First, make sure you have the following in your config file:
47 CONFIG_IPMB_DEVICE_INTERFACE=y
48
49 1) If you want the driver to be loaded at boot time:
50
51 a) Add this entry to your ACPI table, under the appropriate SMBus::
52
53 Device (SMB0) // Example SMBus host controller
54 {
55 Name (_HID, "<Vendor-Specific HID>") // Vendor-Specific HID
56 Name (_UID, 0) // Unique ID of particular host controller
57 :
58 :
59 Device (IPMB)
60 {
61 Name (_HID, "IPMB0001") // IPMB device interface
62 Name (_UID, 0) // Unique device identifier
63 }
64 }
65
66 b) Example for device tree::
67
68 &i2c2 {
69 status = "okay";
70
71 ipmb@10 {
72 compatible = "ipmb-dev";
73 reg = <0x10>;
74 i2c-protocol;
75 };
76 };
77
78 If xmit of data to be done using raw i2c block vs smbus
79 then "i2c-protocol" needs to be defined as above.
80
81 2) Manually from Linux::
82
83 modprobe ipmb-dev-int
84
85
86 Instantiate the device
87 ----------------------
88
89 After loading the driver, you can instantiate the device as
90 described in 'Documentation/i2c/instantiating-devices.rst'.
91 If you have multiple BMCs, each connected to your Satellite MC via
92 a different I2C bus, you can instantiate a device for each of
93 those BMCs.
94
95 The name of the instantiated device contains the I2C bus number
96 associated with it as follows::
97
98 BMC1 ------ IPMB/I2C bus 1 ---------| /dev/ipmb-1
99 Satellite MC
100 BMC1 ------ IPMB/I2C bus 2 ---------| /dev/ipmb-2
101
102 For instance, you can instantiate the ipmb-dev-int device from
103 user space at the 7 bit address 0x10 on bus 2::
104
105 # echo ipmb-dev 0x1010 > /sys/bus/i2c/devices/i2c-2/new_device
106
107 This will create the device file /dev/ipmb-2, which can be accessed
108 by the user space program. The device needs to be instantiated
109 before running the user space program.
110

3. 한국어 전문 번역

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

IPMB와 Satellite MC

1-25

문서 제목은 `IPMB Driver for a Satellite MC`입니다. IPMB(Intelligent Platform Management Bus)는 chassis 안의 서로 다른 board를 standardized 방식으로 연결하는 I2C bus입니다. Baseboard Management Controller(BMC)와 chassis electronics를 연결하며 IPMB bus 위 messaging protocol도 함께 정의됩니다.

IPMB device는 보통 front panel interface 처리, baseboard monitoring, system chassis의 disk drive hot-swap 같은 management function을 수행하는 management controller입니다.

System에 IPMB를 구현하면 BMC가 controller가 되어 system software에 IPMB access를 제공합니다. BMC는 IPMB를 통해 device, 보통 Satellite Management Controller(Satellite MC)에 IPMI request를 보내고 device는 BMC에 response를 반환합니다. Message format 상세는 IPMB와 IPMI specification을 참조해야 합니다.

IPMB request·response
System softwareBMC controllerIPMI requestIPMB/I2C busSatellite MCIPMI responseBMC

System software에서 Satellite MC까지의 management message 경로입니다.

Satellite MC용 ipmb-dev-int

26-41

`ipmb-dev-int`는 Satellite MC에서 BMC의 IPMB message를 받고 response를 돌려보내는 데 필요한 driver입니다. I2C driver와 OpenIPMI 같은 userspace program과 함께 동작합니다.

첫째, I2C slave backend driver로서 Satellite MC를 I2C slave로 설정하는 callback을 정의하고 그 callback이 수신한 IPMI request를 처리합니다. 둘째, OpenIPMI 같은 userspace program이 kernel과 통신하도록 read·write function을 정의합니다.

ipmb-dev-int 역할
측면역할
I2C busSatellite MC를 slave로 설정하고 IPMI request 처리
UserspaceRead·write function으로 OpenIPMI와 kernel 통신

Bus-facing backend와 userspace-facing file operation을 구분합니다.

Boot-time driver load

42-80

Driver는 boot 때 또는 수동으로 먼저 load해야 합니다. Kernel config에는 `CONFIG_IPMB_DEVICE_INTERFACE=y`가 필요합니다.

Boot-time load를 원하면 적절한 SMBus 아래 ACPI table에 vendor-specific host controller와 HID `IPMB0001`인 IPMB device를 추가할 수 있습니다.

Device (SMB0) // Example SMBus host controller
{
Name (_HID, "<Vendor-Specific HID>") // Vendor-Specific HID
Name (_UID, 0) // Unique ID of particular host controller
:
:
  Device (IPMB)
  {
    Name (_HID, "IPMB0001") // IPMB device interface
    Name (_UID, 0) // Unique device identifier
  }
}

Device Tree에서는 I2C controller 아래 `ipmb@10` node에 `compatible = "ipmb-dev"`, `reg = <0x10>`, optional `i2c-protocol` property를 정의합니다.

&i2c2 {
       status = "okay";

       ipmb@10 {
               compatible = "ipmb-dev";
               reg = <0x10>;
               i2c-protocol;
       };
};

Data transmit에 SMBus 대신 raw I2C block을 사용하려면 위와 같이 `i2c-protocol`을 정의해야 합니다.

IPMB boot description
Firmware설정
Kernel configCONFIG_IPMB_DEVICE_INTERFACE=y
ACPISMBus 아래 HID IPMB0001 device
Device Treecompatible=ipmb-dev, reg=0x10
Raw I2C blocki2c-protocol property 추가

ACPI와 Device Tree 방식의 핵심 identifier입니다.

Linux에서 수동 load

81-85

Linux에서 수동으로 load하려면 `modprobe ipmb-dev-int`를 실행합니다.

modprobe ipmb-dev-int
Manual load
CONFIG 확인modprobe ipmb-dev-intI2C slave backend 등록IPMB device instantiate

Module load 뒤 device instantiation으로 이어집니다.

IPMB device instantiation

86-101

Driver를 load한 뒤 `Documentation/i2c/instantiating-devices.rst`에 설명된 방식으로 device를 instantiate합니다. 여러 BMC가 각각 다른 I2C bus로 Satellite MC에 연결되면 BMC마다 device를 하나씩 instantiate할 수 있습니다.

Instantiated device 이름에는 연결된 I2C bus number가 들어갑니다. 원문의 ASCII topology를 그대로 보존하고 같은 구조를 표로 다시 나타냈습니다.

BMC1 ------ IPMB/I2C bus 1 ---------|   /dev/ipmb-1
                              Satellite MC
BMC1 ------ IPMB/I2C bus 2 ---------|   /dev/ipmb-2
여러 IPMB bus와 device node
BMC 연결BusDevice node
BMC connection 1IPMB/I2C bus 1/dev/ipmb-1
BMC connection 2IPMB/I2C bus 2/dev/ipmb-2

Satellite MC가 bus별 character device를 노출합니다.

Multi-BMC topology
BMC 1 → bus 1Satellite MC/dev/ipmb-1BMC 2 → bus 2Satellite MC/dev/ipmb-2

서로 다른 bus가 같은 Satellite MC의 별도 device node로 연결됩니다.

Userspace instantiation example

102-109

예를 들어 bus 2의 7-bit address `0x10`에 `ipmb-dev-int` device를 userspace에서 instantiate하려면 `new_device`에 `ipmb-dev 0x1010`을 씁니다.

# echo ipmb-dev 0x1010 > /sys/bus/i2c/devices/i2c-2/new_device

그러면 userspace program이 접근할 `/dev/ipmb-2`가 생성됩니다. Userspace program을 실행하기 전에 device를 instantiate해야 합니다.

IPMB userspace 준비
ipmb-dev-int loadnew_device에 bus·address 정보 write/dev/ipmb-2 생성Userspace program openIPMI request·response 처리

Driver load에서 OpenIPMI access 전까지의 순서입니다.