1.
IPMI와 KVM-over-LAN에 이어지는 글입니다.
Centos에서 IPMI카드를 인식하도록 하는 작업이 실패하였습니다. 이후 두가지 작업을 더 하였습니다.
우선 Asus로부터 IPMI를 인식하도록 하는 새로운 BIOS를 받아서 설치하였습니다.
다음으로 IPMI를 정상적으로 인식하는지 확인하는 작업이었습니다.
오늘은 이와 관련한 글입니다. IPMI와 관련하여 Linux에서 관련 드라이버를 인식하지 못하는 문제가 있었습니다. 원인을 추측했지만 구체적으로 확인하지 못했습니다. 그러다가 Debugging PCIe Issues using lspci and setpci을 읽었습니다. 아래 부분입니다. I/O Space 정보를 알 수 있지않을까 생각했습니다.
lspci -xxx
This command gives a hexadecimal dump of the whole PCI configuration space.
그래서 관련한 명령어를 실행하여 결과값을 확인하였습니다.
73:01.0 IPMI Interface: ASPEED Technology, Inc. Device 2402 (rev 01)
00: 03 1a 02 24 06 00 10 02 01 01 07 0c 00 00 00 00
10: 00 00 00 7a 00 00 18 7a 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 03 1a 02 24
30: 00 00 00 00 40 00 00 00 00 00 00 00 00 00 00 00
40: 01 50 c3 ff 00 00 00 00 00 00 00 00 00 00 00 00
50: 05 00 8a 00 00 00 00 00 00 00 00 00 00 00 00 00
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
이제 이를 해석하여야 합니다. ChatGPT에게 질문을 하였습니다.
“해석해 달라!!!!”
아래가 답변입니다. 결론은 설징한 IPMI는 IO Space를 사용하지 않고 Memory Space를 사용한다고 합니다. 그래서 ipmi_si가 IPMI카드를 인식할 수 없었습니다.
The “I/O space” refers to the input/output address space used by a device to communicate with the system. In the context of PCI devices, I/O space is one of the addressable regions allocated to a device. It allows the CPU to communicate with the hardware by reading and writing to specific I/O ports.
Analyzing Your
lspci
DumpIn your
lspci
output, the region of interest for I/O space is typically found in the Base Address Registers (BARs). These are located at offsets 0x10 to 0x24 in the PCI configuration space. Here’s your BAR data:
2.
문제 원인을 찾았습니다. 그렇지만 어떻게 할 방법을 찾지 못했습니다. 여전히 dmesg로 보면 같은 결과가 나왔기때문입니다.
우연히 IPMI를 설정하는 화면을 보다가 재미있는 부분을 발견하였습니다.
혹시나 해서 Windows를 Linux로 바꾸었습니다. 그리고 부팅한 후 결과를 보았습니다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
[smallake@smallake ~]$ dmesg | grep ipmi [ 5.896351] ipmi device interface [ 5.898272] ipmi_si: IPMI System Interface driver [ 5.898284] ipmi_si IPI0001:00: probing via ACPI [ 5.898290] ipmi_si IPI0001:00: [mem 0x74100e88] regsize 1 spacing 4 irq 0 [ 5.902580] ipmi_si: Adding ACPI-specified kcs state machine [ 5.902604] ipmi_si 0000:73:01.0: probing via PCI [ 5.902616] ipmi_si 0000:73:01.0: Could not setup I/O space [ 5.902625] ipmi_si 0000:73:01.0: [mem 0x74000000-0x740fffff] regsize 1 spacing 1 irq 0 [ 5.902775] ipmi_si: Adding PCI-specified kcs state machine [ 5.902781] ipmi_si: Trying ACPI-specified kcs state machine at mem address 0x74100e88, slave address 0x0, irq 0 [ 6.027209] ipmi_si IPI0001:00: Found new BMC (man_id: 0x000a3f, prod_id: 0x1093, dev_id: 0x20) [ 6.094467] ipmi_si IPI0001:00: IPMI kcs interface initialized [ 6.106125] ipmi_ssif: IPMI SSIF Interface driver |
ipmi_si는 같은 결과이지만 ipmi_ssif는 다른 결과를 보입니다. IPMI_SSIF 드라이버로 IPMI카드를 인식합니다. 궁금해집니다. ipmi_si와 ipmi_ssif의 차이입니다. 인터넷에서 찾은 내용입니다.
ACPI_IPMI driver currently depends on IPMI System Interface (IPMI_SI) driver to be enabled. IPMI_SI driver only handles KCS, SMIC and BT BMC interfaces.
IPMI_SSIF is an alternative BMC communication method. It allows BMC to be accessed over an I2C bus instead of a standard interface.Enabling ACPI_IPMI over IPMI_SSIF with this change.
좀더 자세한 정보를 알기 위해 chatGPT에게 질문하였습니다. 결과입니다. 머리에 쏙쏙 들어옵니다.
The IPMI (Intelligent Platform Management Interface) provides an interface for system administrators to manage systems independently of the operating system or system state. Within the Linux kernel, there are two commonly used drivers for interfacing with IPMI hardware: ipmi_si and ipmi_ssif. Here’s how they differ:
1. IPMI SI (System Interface) Driver
The ipmi_si driver is used for accessing IPMI devices through system interfaces like KCS (Keyboard Controller Style), SMIC (System Management Interface Chip), or BT (Block Transfer).
Key Features:
- Transport Mechanisms: Supports KCS, SMIC, and BT interfaces.
- Direct Access: Communicates directly with the Baseboard Management Controller (BMC) via memory-mapped or port-mapped I/O.
- Typical Use Case: Commonly used in server environments where the BMC is integrated with the motherboard and supports direct communication.
- Advantages:
- Widely supported by most hardware vendors.
- Requires no additional hardware other than the BMC.
- Configuration:
- Automatically detects interfaces or can be manually configured with kernel parameters like
kcs_ports
,smic_ports
, orbt_ports
.
2. IPMI SSIF (SMBus System Interface) Driver
The ipmi_ssif driver is used for accessing IPMI devices via the SMBus (System Management Bus) interface.
Key Features:
- Transport Mechanism: Communicates over SMBus (I2C-based protocol).
- External Access: Often used for add-on IPMI BMCs or external modules connected via SMBus.
- Typical Use Case: Suited for environments where the BMC is accessed through an SMBus interface instead of a direct system interface.
- Advantages:
- Allows communication with IPMI devices on systems where the BMC is not directly connected to the CPU.
- Useful for connecting to remote or auxiliary IPMI controllers.
- Configuration:
- Requires the SMBus address of the device to be specified (e.g., with the
ssif_addr
parameter).
Comparison Table
Feature ipmi_si ipmi_ssif Interface Type System interfaces (KCS, SMIC, BT) SMBus (I2C) interface Connection Direct connection to BMC SMBus/I2C connection to BMC Typical Use Case Integrated BMC on motherboards External or auxiliary IPMI devices Performance Generally faster and lower latency Can be slower due to SMBus overhead Complexity Simple, as it requires no extra buses Requires SMBus setup and address
How to Choose
- For most servers with onboard BMCs, the ipmi_si driver is the appropriate choice.
- For external IPMI devices connected via SMBus, use the ipmi_ssif driver.
You can load these drivers using
modprobe
:
Determine Which Driver to Use
You can identify which driver is suitable for your system by inspecting the hardware setup:
- Check for a built-in BMC interface (
dmesg | grep IPMI
).- Identify SMBus devices (
i2cdetect -l
andi2cdetect -y <bus>
).
ChatGPT답변을 보니까 제가 앞에서 정리한 내용과 일맥상통하는 부분을 찾았습니다.
How to Choose
For most servers with onboard BMCs, the ipmi_si driver is the appropriate choice.
For external IPMI devices connected via SMBus, use the ipmi_ssif driver.
PCI Interface를 이용한 IPMI카드이기때문에 ipmi_ssif만 동작가능했습니다. 원래.
어찌되었든 문제를 이해했고 잘 해결하였습니다. 너무 다행입니다. (^^)