[phosphor-host-ipmid] Questions about IPMI (OEM) command development

Troy Lee troy_lee at aspeedtech.com
Mon Sep 6 20:03:28 AEST 2021


Hi,

Using ```journalctl -o json-pretty```, you will see other entries in each log.

Thanks,
Troy Lee

From: openbmc <openbmc-bounces+troy_lee=aspeedtech.com at lists.ozlabs.org> On Behalf Of Chris Chen (TPI)
Sent: Monday, September 6, 2021 5:41 PM
To: openbmc at lists.ozlabs.org
Subject: 回覆: [phosphor-host-ipmid] Questions about IPMI (OEM) command development

Hi all,

I guess this mail was got overwhelmed by bunches of emails, so please let me resend it and hope someone could help me. Another, I add one more question marked #5 below.

Thank you.

Regards,
Chris Chen

________________________________________
寄件者: openbmc <mailto:openbmc-bounces+chris.chen3=flex.com at lists.ozlabs.org> 代表 Chris Chen (TPI) <mailto:Chris.Chen3 at flex.com>
寄件日期: 2021年9月2日 下午 06:34
收件者: mailto:openbmc at lists.ozlabs.org <mailto:openbmc at lists.ozlabs.org>
主旨: [phosphor-host-ipmid] Questions about IPMI (OEM) command development 
 
Hi all,

I have studied "phosphor-host-ipmid" package for a couple of weeks and got understanding that it has implemented some mandatory and optional commands already. And I also knew that I'm able to leverage "intel-ipmi-oem" package to get more command handlers. But there're some questions raised in my mind, I hope someone could give me some suggestions.
1. What's the normal development procedure in case I want to make our own OEM commands? I mean do you guys encourage me to create a new "xxx-ipmi-oem" package or to leverage "intel-ipmi-oem" and then add our own commands in it?
2. I for now added "intel-ipmi-oem" package only for using its "<Chassis>:<Set Front Panel Enables>" command because I figured out the same command in the "phosphor-host-ipmid" is not able to match the d-bus interface in the "x86-power-control". I'm not sure if I will need other commands in the "intel-ipmi-oem", but what if I don't need other commands, how to remove them? to use the whitelist mechanism?
3. Is it okay to add more than 1 xxx-ipmi-ome packages? If yes, how to manage the whitelist between these 2 OEM packages?
4. Am I able to use "intel-ipmi-oem" on a platform that is using AMD CPU?
5. How to print the "entry("SENDER=%s", sender.c_str())" parts? I mean I for now can print out "Set up ipmi context" string after following the instruction listed in "https://github.com/openbmc/openbmc/wiki/Debugging-OpenBMC#enabling-application-debug", but I don't see "SENDER=" when I executed "journalctl -t ipmid" command.
6. 
6. log<level::DEBUG>("Set up ipmi context", entry("SENDER=%s", sender.c_str()), 
                      entry("NETFN=0x%X", netFn), entry("LUN=0x%X", lun),
                      entry("CMD=0x%X", cmd), entry("CHANNEL=%u", channel),
                      entry("USERID=%u", userId),
                      entry("SESSIONID=0x%X", sessionId),
                      entry("PRIVILEGE=%u", static_cast<uint8_t>(privilege)),
                      entry("RQSA=%x", rqSA));


Thank you.


Regards,
Chris Chen
Legal Disclaimer :
The information contained in this message may be privileged and confidential. 
It is intended to be read only by the individual or entity to whom it is addressed 
or by their designee. If the reader of this message is not the intended recipient, 
you are on notice that any distribution of this message, in any form, 
is strictly prohibited. If you have received this message in error, 
please immediately notify the sender and delete or destroy any copy of this message!


More information about the openbmc mailing list