Skip to contentSkip to conversation

ipmbSend handling

IPMBD [email protected] 2 participants 4 messages Aug 24, 2018 – Aug 28, 2018

lore
Share & tools
lore
#0 lore raw

Hi:

I check the ipmbd implementation from
https://urldefense.proofpoint.com/v2/url?u=https-3A__gerrit.openbmc-2Dproject.xyz_-23_c_openbmc_ipmbbridge_-2B_11130_&d=DwICAg&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=kGibSCEQz-PilnW-r9KNT7_zWJXJNtnSK5aYZCe7SVs&m=9vYrt5dE5uTcGZ0xJvXwlc2qHu9SzkgJbpR7h9W0jXE&s=xLAMWHrLSU8GJiEb4ObBmfmlBhRwK26Z3t4-piFCe1c&e= and find out that the IPMB request or response messages are passed down to the I2C slave device in the ipmbSend function.

The master device node is /dev/i2c-0 and the slave device node is /sys/bus/i2c/devices/0-1010/slave-mqueue in the ipmbbridge implementation.

The direction is always from the master device to the slave device.

In normal IPMB usage case, an IPMB request is sent to the master device (say /dev/i2c-3) and then the master device sends that IPMB request to the client device attached to the master device's bus.

While an IPMB response returns from the client device, the client device uses an I2C master-write transfer to send the response back to the request originator, which is /dev/i2c-3, according to IPMB spec. So the request originator becomes an I2C slave at this moment.

It seems to me that ipmbSend behavior doesn't get aligned with the description of request/response protocol in IPMB spec.

I might misunderstand the ipmbSend behavior and any comment is welcome.

Thank you.

Regards,
Tyrone

===========================================================================================
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

#1 lore raw
Quoted 3 lines

The direction is always from the master device to the slave device.

Not true in either the spec or the implementation. The IPMB bridge was designed to operate two ways. First, requests could be made from external entities, like an IPMB header on the board, or the Management Engine (On x86 platforms). These requests first require the BMC to be a slave for the request, and a master for the response. Second, the BMC could initiate a request (Probably to the management engine). In that case, it would be an master for the request, then a slave for the response. In theory, both scenarios are supported by the daemon, but only the first case might be enabled at this point.

Quoted 3 lines

It seems to me that ipmbSend behavior doesn't get aligned with the description of request/response protocol in IPMB spec.

What do you refer to as ipmbSend here?

It would help a lot if you could add your comments to the code in the gerrit review. It might help track down where you think the issues are.

-Ed

#2 lore raw
Quoted 4 lines

It would help a lot if you could add your comments to the code in the gerrit review. It might help track down where you think the issues are.

I should also mention, the code posted in the review does work for communication with Management Engine, as well as with an Aardvark debugger connected to a header on the board. We haven't yet tested with any other IPMB capable add in cards, although it's on our list.

#3 lore raw
In reply to Tanous, Ed

Hi Ed:

Quoted 1 line

Not true in either the spec or the implementation.

Thank you for your description of the ipmbbridge design.

Now I get a better picture of it.

Quoted 1 line

It would help a lot if you could add your comments to the code in the gerrit review. It might help track down where you think the issues are.

Sure, I'll do that.

Regards,
Tyrone
-----Original Message-----
From: Tanous, Ed [mailto:[email protected]]
Sent: Saturday, August 25, 2018 12:08 AM
To: CS00 KFTing; [email protected]
Subject: RE: [IPMBD] ipmbSend handling

Quoted 3 lines

The direction is always from the master device to the slave device.

Not true in either the spec or the implementation. The IPMB bridge was designed to operate two ways. First, requests could be made from external entities, like an IPMB header on the board, or the Management Engine (On x86 platforms). These requests first require the BMC to be a slave for the request, and a master for the response. Second, the BMC could initiate a request (Probably to the management engine). In that case, it would be an master for the request, then a slave for the response. In theory, both scenarios are supported by the daemon, but only the first case might be enabled at this point.

Quoted 3 lines

It seems to me that ipmbSend behavior doesn't get aligned with the description of request/response protocol in IPMB spec.

What do you refer to as ipmbSend here?

It would help a lot if you could add your comments to the code in the gerrit review. It might help track down where you think the issues are.

-Ed

===========================================================================================
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.