Polling OpenBMC using IPMB
Hello all! I've got a Purley motherboard with one of the I2C buses going out from AST2500 to external controller.It gets BMC data (sensors, MAC address, etc) by polling it with IPMB. I'm trying to find out how to implement it in OpenBMC.Is it ipmbbridge service used for this? Thank you!-- Best regards,Konstantin Klubnichkin,lead firmware engineer,server hardware R&D group,Yandex Moscow office.tel: +7-903-510-33-33
Hi Konstantin,
Ipmbbridge is the right service. Please override the https://github.com/openbmc/ipmbbridge/blob/master/ipmb-channels.json with the IPMB channel relevant on your board.
Thanks,
Sumanth
From: openbmc <[email protected]> On Behalf Of Konstantin Klubnichkin
Sent: Wednesday, April 29, 2020 3:29 PM
To: [email protected]
Subject: Polling OpenBMC using IPMB
Hello all!
I've got a Purley motherboard with one of the I2C buses going out from AST2500 to external controller. It gets BMC data (sensors, MAC address, etc) by polling it with IPMB.
I'm trying to find out how to implement it in OpenBMC. Is it ipmbbridge service used for this?
Thank you!
--
Best regards,
Konstantin Klubnichkin,
lead firmware engineer,
server hardware R&D group,
Yandex Moscow office.
tel: +7-903-510-33-33
Hello, Sumanth! Thank you for the reply, I've found that also it's necessary to 1. Compile ipmi_dev driver into kernel;2. Rename channel in /usr/share/ipmi-providers/channel_config.json - it must be named "Ipmb", not "IPMB"I'm confused with the addresses.On the controller side I open slave device at 0x36 and expect BMC to appear at 0x10 (all in i2cdetect notation).So I assume that in ipmb-channels.json must be the following: "type": "ipmb","slave-path": "/dev/ipmb-6","bmc-addr": 34,"remote-addr": 108 But ipmbbridged ignores this 34 (0x11 shifted left by 1 bit), instead it instantiates device at 0x10 and the re-instantiate it at what is commanded by some service. What service should it be? updateSlaveAddrHandler is never called. To override this I've manually changed 0x1010 to 0x1011 in sources and voila - I can now receive the requests from the controller, but it interprets ipmbbridged responses in a wrong manner. I've added some debug (actually a lot of :)) to ipmbbridged, so it dumps what is sent via I2C. Here is the response:=================================================================bmcSlaveAddress=0x36 netfn=0x07 lun=0x00 cmd=0x01 cc=0x00>>>> 17 6c 1e 76 36 0c 01 00 23 00 02 08 02 bf 3d 2b 00 00 00 ab 00 00 0d af=================================================================But the controller can't interpret it right:=================================================================ipmi-i2c 2-0011: IPMI message handler: BMC returned incorrect response, expected netfn 7 cmd 1, got netfn 7 cmd c================================================================= I'm not sure if it's a problem in controller's IPMB implementation, or it's the wrong addresses, but this controller works fine with other BMC over IPMB.Could you please clarify what should be in bmc-addr and remote-addr in ipmb-channels.json? Thank you! 29.04.2020, 13:05, "Bhat, Sumanth" <[email protected]>:Hi Konstantin, Ipmbbridge is the right service. Please override the https://github.com/openbmc/ipmbbridge/blob/master/ipmb-channels.json with the IPMB channel relevant on your board.
Thanks,
Sumanth
From:openbmc <[email protected]> On Behalf Of Konstantin Klubnichkin
Sent:Wednesday, April 29, 2020 3:29 PM
To: [email protected]
Subject:Polling OpenBMC using IPMB
Hello all!
I've got a Purley motherboard with one of the I2C buses going out from AST2500 to external controller.
It gets BMC data (sensors, MAC address, etc) by polling it with IPMB.
I'm trying to find out how to implement it in OpenBMC.
Is it ipmbbridge service used for this?
Thank you!
--
Best regards,
Konstantin Klubnichkin,
lead firmware engineer,
server hardware R&D group,
Yandex Moscow office.
tel: +7-903-510-33-33
-- Best regards,Konstantin Klubnichkin,lead firmware engineer,server hardware R&D group,Yandex Moscow office.tel: +7-903-510-33-33
Hi Konstantin,
If you define device through dts with register 0x11 then device should already be there and you don’t need to define this manually. Please check remote address entry in case you see issues. I don’t think any controller issues at this time.
Regards
-Vijay
From: openbmc <[email protected]> on behalf of Konstantin Klubnichkin <[email protected]>
Date: Wednesday, April 29, 2020 at 8:09 AM
To: "Bhat, Sumanth" <[email protected]>, "[email protected]" <[email protected]>
Subject: Re: Polling OpenBMC using IPMB
Hello, Sumanth!
Thank you for the reply, I've found that also it's necessary to
1. Compile ipmi_dev driver into kernel;
2. Rename channel in /usr/share/ipmi-providers/channel_config.json - it must be named "Ipmb", not "IPMB" I'm confused with the addresses.
On the controller side I open slave device at 0x36 and expect BMC to appear at 0x10 (all in i2cdetect notation). So I assume that in ipmb-channels.json must be the following:
"type": "ipmb",
"slave-path": "/dev/ipmb-6",
"bmc-addr": 34,
"remote-addr": 108
But ipmbbridged ignores this 34 (0x11 shifted left by 1 bit), instead it instantiates device at 0x10 and the re-instantiate it at what is commanded by some service. What service should it be? updateSlaveAddrHandler is never called.
To override this I've manually changed 0x1010 to 0x1011 in sources and voila - I can now receive the requests from the controller, but it interprets ipmbbridged responses in a wrong manner.
I've added some debug (actually a lot of :)) to ipmbbridged, so it dumps what is sent via I2C. Here is the response:
=================================================================
bmcSlaveAddress=0x36 netfn=0x07 lun=0x00 cmd=0x01 cc=0x00
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
17 6c 1e 76 36 0c 01 00 23 00 02 08 02 bf 3d 2b 00 00 00 ab 00 00 0d af
=================================================================
But the controller can't interpret it right:
=================================================================
ipmi-i2c 2-0011: IPMI message handler: BMC returned incorrect response, expected netfn 7 cmd 1, got netfn 7 cmd c
=================================================================
I'm not sure if it's a problem in controller's IPMB implementation, or it's the wrong addresses, but this controller works fine with other BMC over IPMB. Could you please clarify what should be in bmc-addr and remote-addr in ipmb-channels.json?
Thank you!
29.04.2020, 13:05, "Bhat, Sumanth" <[email protected]<mailto:[email protected]>>:
Hi Konstantin,
Ipmbbridge is the right service. Please override the https://github.com/openbmc/ipmbbridge/blob/master/ipmb-channels.json with the IPMB channel relevant on your board.
Thanks,
Sumanth
From: openbmc <[email protected]<mailto:[email protected]>> On Behalf Of Konstantin Klubnichkin
Sent: Wednesday, April 29, 2020 3:29 PM
To: [email protected]<mailto:[email protected]>
Subject: Polling OpenBMC using IPMB
Hello all!
I've got a Purley motherboard with one of the I2C buses going out from AST2500 to external controller.
It gets BMC data (sensors, MAC address, etc) by polling it with IPMB.
I'm trying to find out how to implement it in OpenBMC.
Is it ipmbbridge service used for this?
Thank you!
--
Best regards,
Konstantin Klubnichkin,
lead firmware engineer,
server hardware R&D group,
Yandex Moscow office.
tel: +7-903-510-33-33
--
Best regards,
Konstantin Klubnichkin,
lead firmware engineer,
server hardware R&D group,
Yandex Moscow office.
tel: +7-903-510-33-33
Hello, Vijay! It works! It was "i2c-protocol" in DTS. So step by step for further users:1. Enable CONFIG_IPMB_DEVICE_INTERFACE=y in kernel config file;2. Add device to DTS:&i2c6 { bus-frequency = <100000>; aspeed,dma-buf-size = <4095>; aspeed,hw-timeout-ms = <300>; status = "okay"; ina219@45 { compatible = "ti,ina219"; reg = <0x45>; shunt-resistor = <250> }; ipmb@11 { compatible = "ipmb-dev"; reg = <0x11>; i2c-protocol; };}; Side note: in my case "i2c-protocol" was the root cause of incompatibility with controller3. Change channel name in channel_config.json (part of phosphor-ipmi-config) to "Ipmb" from "IPMB".Question: Should the number of channel in channel_config.json be the same as I2C bus number?4. Change I2C bus number and addresses of BMC (OpenBMC, as in DTS but shifted left by one bit) and controller (again, shifted left by 1 bit) in ipmb-channels.json (part of phosphor-ipmi-ipmb) like this:{ "type": "ipmb", "slave-path": "/dev/ipmb-6", "bmc-addr": 34, "remote-addr": 108}Looks like that's all Thank you! 30.04.2020, 00:30, "Vijay Khemka" <[email protected]>:Hi Konstantin, If you define device through dts with register 0x11 then device should already be there and you don’t need to define this manually. Please check remote address entry in case you see issues. I don’t think any controller issues at this time.
Regards
-Vijay
From: openbmc <[email protected]> on behalf of Konstantin Klubnichkin <[email protected]>
Date: Wednesday, April 29, 2020 at 8:09 AM
To: "Bhat, Sumanth" <[email protected]>, "[email protected]" <[email protected]>
Subject: Re: Polling OpenBMC using IPMB
Hello, Sumanth!
Thank you for the reply, I've found that also it's necessary to
1. Compile ipmi_dev driver into kernel;
2. Rename channel in /usr/share/ipmi-providers/channel_config.json - it must be named "Ipmb", not "IPMB"
I'm confused with the addresses.
On the controller side I open slave device at 0x36 and expect BMC to appear at 0x10 (all in i2cdetect notation).
So I assume that in ipmb-channels.json must be the following:
"type": "ipmb",
"slave-path": "/dev/ipmb-6",
"bmc-addr": 34,
"remote-addr": 108
But ipmbbridged ignores this 34 (0x11 shifted left by 1 bit), instead it instantiates device at 0x10 and the re-instantiate it at what is commanded by some service. What service should it be? updateSlaveAddrHandler is never called.
To override this I've manually changed 0x1010 to 0x1011 in sources and voila - I can now receive the requests from the controller, but it interprets ipmbbridged responses in a wrong manner.
I've added some debug (actually a lot of :)) to ipmbbridged, so it dumps what is sent via I2C. Here is the response:
=================================================================
bmcSlaveAddress=0x36 netfn=0x07 lun=0x00 cmd=0x01 cc=0x00
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
17 6c 1e 76 36 0c 01 00 23 00 02 08 02 bf 3d 2b 00 00 00 ab 00 00 0d af
=================================================================
But the controller can't interpret it right:
=================================================================
ipmi-i2c 2-0011: IPMI message handler: BMC returned incorrect response, expected netfn 7 cmd 1, got netfn 7 cmd c
=================================================================
I'm not sure if it's a problem in controller's IPMB implementation, or it's the wrong addresses, but this controller works fine with other BMC over IPMB. Could you please clarify what should be in bmc-addr and remote-addr in ipmb-channels.json?
Thank you!
29.04.2020, 13:05, "Bhat, Sumanth" <[email protected]>:
Hi Konstantin,
Ipmbbridge is the right service. Please override the https://github.com/openbmc/ipmbbridge/blob/master/ipmb-channels.json with the IPMB channel relevant on your board.
Thanks,
Sumanth
From:openbmc <[email protected]> On Behalf Of Konstantin Klubnichkin
Sent:Wednesday, April 29, 2020 3:29 PM
To: [email protected]
Subject:Polling OpenBMC using IPMB
Hello all!
I've got a Purley motherboard with one of the I2C buses going out from AST2500 to external controller.
It gets BMC data (sensors, MAC address, etc) by polling it with IPMB.
I'm trying to find out how to implement it in OpenBMC.
Is it ipmbbridge service used for this?
Thank you!
--
Best regards,
Konstantin Klubnichkin,
lead firmware engineer,
server hardware R&D group,
Yandex Moscow office.
tel: +7-903-510-33-33
--
Best regards,
Konstantin Klubnichkin,
lead firmware engineer,
server hardware R&D group,
Yandex Moscow office.
tel: +7-903-510-33-33
-- Best regards,Konstantin Klubnichkin,lead firmware engineer,server hardware R&D group,Yandex Moscow office.tel: +7-903-510-33-33
Hi Konstantin,
Yes i2c-protocol was required if your ipmb device doesn’t support smbus command rather it supports raw i2c transaction. This patch was added in kernel to support.
Good that it is working for you.
Regards
-Vijay
From: Konstantin Klubnichkin <[email protected]>
Date: Thursday, April 30, 2020 at 1:47 AM
To: Vijay Khemka <[email protected]>, "Bhat, Sumanth" <[email protected]>, "[email protected]" <[email protected]>
Subject: Re: Polling OpenBMC using IPMB
Hello, Vijay!
It works! It was "i2c-protocol" in DTS.
So step by step for further users:
1. Enable CONFIG_IPMB_DEVICE_INTERFACE=y in kernel config file;
2. Add device to DTS:
&i2c6 {
bus-frequency = <100000>;
aspeed,dma-buf-size = <4095>;
aspeed,hw-timeout-ms = <300>;
status = "okay";
ina219@45 {
compatible = "ti,ina219";
reg = <0x45>;
shunt-resistor = <250>
}; ipmb@11 {
compatible = "ipmb-dev";
reg = <0x11>;
i2c-protocol;
};
};Side note: in my case "i2c-protocol" was the root cause of incompatibility with controller
3. Change channel name in channel_config.json (part of phosphor-ipmi-config) to "Ipmb" from "IPMB".
Question: Should the number of channel in channel_config.json be the same as I2C bus number?
4. Change I2C bus number and addresses of BMC (OpenBMC, as in DTS but shifted left by one bit) and controller (again, shifted left by 1 bit) in ipmb-channels.json (part of phosphor-ipmi-ipmb) like this:
{
"type": "ipmb",
"slave-path": "/dev/ipmb-6",
"bmc-addr": 34,
"remote-addr": 108
}
Looks like that's all
Thank you!
30.04.2020, 00:30, "Vijay Khemka" <[email protected]>:
Hi Konstantin,
If you define device through dts with register 0x11 then device should already be there and you don’t need to define this manually. Please check remote address entry in case you see issues. I don’t think any controller issues at this time.
Regards
-Vijay
From: openbmc <[email protected]<mailto:[email protected]>> on behalf of Konstantin Klubnichkin <[email protected]<mailto:[email protected]>>
Date: Wednesday, April 29, 2020 at 8:09 AM
To: "Bhat, Sumanth" <[email protected]<mailto:[email protected]>>, "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
Subject: Re: Polling OpenBMC using IPMB
Hello, Sumanth!
Thank you for the reply, I've found that also it's necessary to
1. Compile ipmi_dev driver into kernel;
2. Rename channel in /usr/share/ipmi-providers/channel_config.json - it must be named "Ipmb", not "IPMB"
I'm confused with the addresses.
On the controller side I open slave device at 0x36 and expect BMC to appear at 0x10 (all in i2cdetect notation).
So I assume that in ipmb-channels.json must be the following:
"type": "ipmb",
"slave-path": "/dev/ipmb-6",
"bmc-addr": 34,
"remote-addr": 108
But ipmbbridged ignores this 34 (0x11 shifted left by 1 bit), instead it instantiates device at 0x10 and the re-instantiate it at what is commanded by some service. What service should it be? updateSlaveAddrHandler is never called.
To override this I've manually changed 0x1010 to 0x1011 in sources and voila - I can now receive the requests from the controller, but it interprets ipmbbridged responses in a wrong manner.
I've added some debug (actually a lot of :)) to ipmbbridged, so it dumps what is sent via I2C. Here is the response:
=================================================================
bmcSlaveAddress=0x36 netfn=0x07 lun=0x00 cmd=0x01 cc=0x00
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
17 6c 1e 76 36 0c 01 00 23 00 02 08 02 bf 3d 2b 00 00 00 ab 00 00 0d af
=================================================================
But the controller can't interpret it right:
=================================================================
ipmi-i2c 2-0011: IPMI message handler: BMC returned incorrect response, expected netfn 7 cmd 1, got netfn 7 cmd c
=================================================================
I'm not sure if it's a problem in controller's IPMB implementation, or it's the wrong addresses, but this controller works fine with other BMC over IPMB.
Could you please clarify what should be in bmc-addr and remote-addr in ipmb-channels.json?
Thank you!
29.04.2020, 13:05, "Bhat, Sumanth" <[email protected]<mailto:[email protected]>>:
Hi Konstantin,
Ipmbbridge is the right service. Please override the https://github.com/openbmc/ipmbbridge/blob/master/ipmb-channels.json with the IPMB channel relevant on your board.
Thanks,
Sumanth
From: openbmc <[email protected]<mailto:[email protected]>> On Behalf Of Konstantin Klubnichkin
Sent: Wednesday, April 29, 2020 3:29 PM
To: [email protected]<mailto:[email protected]>
Subject: Polling OpenBMC using IPMB
Hello all!
I've got a Purley motherboard with one of the I2C buses going out from AST2500 to external controller.
It gets BMC data (sensors, MAC address, etc) by polling it with IPMB.
I'm trying to find out how to implement it in OpenBMC.
Is it ipmbbridge service used for this?
Thank you!
--
Best regards,
Konstantin Klubnichkin,
lead firmware engineer,
server hardware R&D group,
Yandex Moscow office.
tel: +7-903-510-33-33
--
Best regards,
Konstantin Klubnichkin,
lead firmware engineer,
server hardware R&D group,
Yandex Moscow office.
tel: +7-903-510-33-33
--
Best regards,
Konstantin Klubnichkin,
lead firmware engineer,
server hardware R&D group,
Yandex Moscow office.
tel: +7-903-510-33-33
Also define your device in DTS compatible with ipmb-dev driver.
From: openbmc <[email protected]> on behalf of "Bhat, Sumanth" <[email protected]>
Date: Wednesday, April 29, 2020 at 3:07 AM
To: Konstantin Klubnichkin <[email protected]>, "[email protected]" <[email protected]>
Subject: RE: Polling OpenBMC using IPMB
Hi Konstantin,
Ipmbbridge is the right service. Please override the https://github.com/openbmc/ipmbbridge/blob/master/ipmb-channels.json with the IPMB channel relevant on your board.
Thanks,
Sumanth
From: openbmc <[email protected]> On Behalf Of Konstantin Klubnichkin
Sent: Wednesday, April 29, 2020 3:29 PM
To: [email protected]
Subject: Polling OpenBMC using IPMB
Hello all!
I've got a Purley motherboard with one of the I2C buses going out from AST2500 to external controller. It gets BMC data (sensors, MAC address, etc) by polling it with IPMB.
I'm trying to find out how to implement it in OpenBMC. Is it ipmbbridge service used for this?
Thank you!
--
Best regards,
Konstantin Klubnichkin,
lead firmware engineer,
server hardware R&D group,
Yandex Moscow office.
tel: +7-903-510-33-33