<div dir="ltr">Thanks for the explanation. I could test what I needed to test on an Intel C620 based platform.<div><br></div><div>Specifically I'm trying to run a board in eSPI + SAFS mode. SAFS is "Slave Attached Flash Sharing" where the PCH loads all of its firmware (ME, GbE, BIOS etc) via eSPI, e.g. from a BMC. See Intel document 329957 ("Enhanced Serial Peripheral Interface (eSPI) - Addendum for Server Platforms") from <a href="https://downloadcenter.intel.com/download/27055/eSPI" target="_blank">https://downloadcenter.intel.com/download/27055/eSPI</a> for reference. However, even though the PCH (C620 series) reads quite a lot of data via SAFS, the ME doesn't release the CPU and the host wouldn't turn on. I had hoped that this is just the result of not having FDRV (aka. FD0V) enabled in the PCH. In that case the ME should have responded to IPMB and reported such. But the ME doesn't respond at all on i2c in SAFS mode (checked via logic analyzer), so I'm at a loss of what's wrong with it. In MAFS mode (i.e. when using SPI flash for  the PCH), the IPMB works as expected, so I know my setup is correct and it's actually the ME being unhappy in SAFS mode. I tried with ME in both "operational" and "recovery" mode. I do see different behavior in that the ME in "recovery" mode completely rewrites the MFS section, so "something" must actually be running in the ME. I guess the only other thing I haven't tried is to compare SAFS operations with SPI operations (MAFS) to see what else it would be doing on SPI.</div><div><br></div><div></div><div>Oskar.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 23, 2020 at 2:59 PM Vijay Khemka <<a href="mailto:vijaykhemka@fb.com">vijaykhemka@fb.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-US">
<div class="gmail-m_-5042845028599178880WordSection1">
<p class="MsoNormal">As i2c slave mqueue driver is not upstreamed and with already having same functionality in ipmb-dev driver which is already in uostream kernel, I don’t see any reason to use i2c slave mqueue driver. I highly incourage people to use ipmb-dev
 driver with latest ipmbbridge. If there are any issues, please let us know.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Regards<u></u><u></u></p>
<p class="MsoNormal">-Vijay<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(181,196,223);padding:3pt 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12pt;color:black">From: </span></b><span style="font-size:12pt;color:black">Oskar Senft <<a href="mailto:osk@google.com" target="_blank">osk@google.com</a>><br>
<b>Date: </b>Thursday, April 23, 2020 at 8:34 AM<br>
<b>To: </b>Vijay Khemka <<a href="mailto:vijaykhemka@fb.com" target="_blank">vijaykhemka@fb.com</a>><br>
<b>Cc: </b>OpenBMC Maillist <<a href="mailto:openbmc@lists.ozlabs.org" target="_blank">openbmc@lists.ozlabs.org</a>><br>
<b>Subject: </b>Re: Access Intel ME IPMB from BMC<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal">On a side note regarding the ipmb-dev driver: It seems that the Documentation/IPMB.txt has gotten "lost". The only version I could find is this: <a href="https://github.com/openbmc/linux/blob/51bd6f291583684f495ea498984dfc22049d7fd2/Documentation/IPMB.txt" target="_blank">https://github.com/openbmc/linux/blob/51bd6f291583684f495ea498984dfc22049d7fd2/Documentation/IPMB.txt</a>.
 But it's not in any of the recent branches (dev-5.3 or dev-5.4).<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Should this file be resurrected?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Oskar.<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Thu, Apr 23, 2020 at 11:31 AM Oskar Senft <<a href="mailto:osk@google.com" target="_blank">osk@google.com</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal">Thanks again! <u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">ipmbbridge solved my problem. I found that my version of OpenBMC (incl. kernel) used a slightly older version of ipmbbridge which still used the i2c slave mqueue, which worked fine. Reading a bit of source code made it clear how it worked.
 The key is to configure ipbm-channels.json with the correct i2c device and the rest "just works".<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">For the benefit of others: My understanding is that the current version of ipmbbridge no longer uses the i2c slave mqueue but requires the ipmb-dev driver in the kernel. It's not necessary to actually attach the driver to an i2c device
 as that can happen at runtime.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Oskar.<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Mon, Apr 20, 2020 at 4:34 PM Vijay Khemka <<a href="mailto:vijaykhemka@fb.com" target="_blank">vijaykhemka@fb.com</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal">Hi Oskar,<u></u><u></u></p>
<p class="MsoNormal">You need to use ipmb-dev driver which is is being used by ipmbbridge. You don’t need ipmb-host as we are having ipmbbridge to replace that.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Regards<u></u><u></u></p>
<p class="MsoNormal">-Vijay<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(181,196,223);padding:3pt 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12pt;color:black">From:
</span></b><span style="font-size:12pt;color:black">Oskar Senft <<a href="mailto:osk@google.com" target="_blank">osk@google.com</a>><br>
<b>Date: </b>Monday, April 20, 2020 at 11:35 AM<br>
<b>To: </b>Vijay Khemka <<a href="mailto:vijaykhemka@fb.com" target="_blank">vijaykhemka@fb.com</a>><br>
<b>Cc: </b>OpenBMC Maillist <<a href="mailto:openbmc@lists.ozlabs.org" target="_blank">openbmc@lists.ozlabs.org</a>><br>
<b>Subject: </b>Re: Access Intel ME IPMB from BMC</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Hi Vijay
<u></u><u></u></p>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks for the pointer!<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">I also found both <a href="https://github.com/Mellanox/ipmb-host" target="_blank">https://github.com/Mellanox/ipmb-host</a> and <a href="https://github.com/openbmc/linux/blob/dev-5.4/drivers/char/ipmi/ipmb_dev_int.c" target="_blank">https://github.com/openbmc/linux/blob/dev-5.4/drivers/char/ipmi/ipmb_dev_int.c</a>. <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Is it right that with ipmbbridge I don't need either of them since ipmbbridge uses the raw i2c dev?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Oskar.<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">On Mon, Apr 20, 2020 at 2:12 PM Vijay Khemka <<a href="mailto:vijaykhemka@fb.com" target="_blank">vijaykhemka@fb.com</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin:5pt 0in 5pt 4.8pt">
<div>
<div>
<p class="MsoNormal">Hi Oskar,<u></u><u></u></p>
<p class="MsoNormal">You need to configure your ME channel in ipmb channel config file
<a href="https://github.com/openbmc/ipmbbridge/blob/master/ipmb-channels.json" target="_blank">
https://github.com/openbmc/ipmbbridge/blob/master/ipmb-channels.json</a><u></u><u></u></p>
<p class="MsoNormal">And make sure ipmbbridge is running. Then you can send get device id command to ME from command line itself to test if everything is working.<u></u><u></u></p>
<p> <u></u><u></u></p>
<p>busctl call xyz.openbmc_project.Ipmi.Channel.Ipmb /xyz/openbmc_project/Ipmi/Channel/Ipmb org.openbmc.Ipmb sendRequest yyyyay 1 6 0 0x1 0<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Regards<u></u><u></u></p>
<p class="MsoNormal">-Vijay<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(181,196,223);padding:3pt 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12pt;color:black">From:
</span></b><span style="font-size:12pt;color:black">openbmc <openbmc-bounces+vijaykhemka=<a href="mailto:fb.com@lists.ozlabs.org" target="_blank">fb.com@lists.ozlabs.org</a>> on behalf of Oskar Senft <<a href="mailto:osk@google.com" target="_blank">osk@google.com</a>><br>
<b>Date: </b>Saturday, April 18, 2020 at 6:47 PM<br>
<b>To: </b>OpenBMC Maillist <<a href="mailto:openbmc@lists.ozlabs.org" target="_blank">openbmc@lists.ozlabs.org</a>><br>
<b>Subject: </b>Access Intel ME IPMB from BMC</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Hi everyone
<u></u><u></u></p>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">I'm trying to find out how I can access the Intel ME via IPMB from the BMC (OpenBMC).<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">From what I gathered, Intel ME's IPMB is on the PCH's SMLink0. I know this is connected to one of the SMBus modules on my AST2500. But what I can't find out is how I actually send
 commands there? I'm sure I'm missing a document that makes this obvious.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Or is it as simple as dropping IPMI packets onto the bus?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Is this by any chance already implemented in OpenBMC?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks for any hints!<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Oskar<u></u><u></u></p>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</div>

</blockquote></div>