Update on PLDM stack
Deepak Kodihalli
dkodihal at linux.vnet.ibm.com
Mon Aug 19 19:34:48 AEST 2019
Since the PLDM design document[1] was discussed on this mailing list and
Gerrit earlier this year, several features have been contributed to the
PLDM stack on OpenBMC[2]. I wanted to share a brief report of what's
supported currently and what still needs work. Comments are welcome!
The code is organized into the following components:
1) libpldm
This is a C library that provides APIs to encode and decode PLDM
messages. It is implemented in a way such that it can be used by
different firmware stacks, and not just OpenBMC firmware. For eg IBM
systems have host firmware stacks making use of this.
DMTF groups PLDM commands into different PLDM specs[3]. Following are
the commands for which the encode/decode APIs are implemented :
a) PLDM message control and discovery spec (most commands implemented) :
GetTID, GetPLDMVersion, GetPLDMTypes, GetPLDMCommands
b) PLDM BIOS spec (subset of commands implemented) : GetDateTime,
GetBIOSTable, GetBIOSAttributeCurrentValueByHandle
c) PLDM Platform Monitoring and Control spec (subset of commands
implemented) : GetPDR, SetStateEffecterStates
d) PLDM FRU spec : There are patches to implement a couple of commands
under review in the OpenBMC Gerrit[4].
e) PLDM firmware update spec : nothing implemented yet. I believe Ben
Wei from Facebook was interested in this spec.
f) PLDM for SMBIOS spec : nothing implemented yet.
2) libpldmresponder
A PLDM device can either be a PLDM requester (PLDM client) or a PLDM
responder (PLDM server). This library implements the BMC as a PLDM
responder function. It contains handlers for incoming PLDM requests
(from PLDM requesters).
The responder implementation is mostly platform specific, so this
component relies on OpenBMC APIs, and is implemented in modern C++.
To handle platform specific behavior, config files (written in JSON) are
used to feed in information specific to a platform. For eg this is how
PLDM PDRs (system specific PLDM metadata) are implemented. Some of the
responder handlers make D-Bus calls to other OpenBMC apps and then
transform the D-Bus response to a PLDM response.
Handlers for the following commands are implemented :
a) PLDM message control and discovery spec : GetTID, GetPLDMVersion,
GetPLDMTypes, GetPLDMCommands
b) PLDM BIOS spec : GetDateTime, GetBIOSTable,
GetBIOSAttributeCurrentValueByHandle
c) PLDM Platform Monitoring and Control spec : GetPDR
3) pldmd
The pldm daemon is a responder daemon for the BMC. It links with libpldm
and libpldmresponder, and it also handles the transport aspect - sending
and receiving PLDM messages over MCTP[5][6].
4) BMC as a PLDM requester
The design for the BMC as a PLDM requester was recently submitted to
Gerrit[7]. In general, an OpenBMC app can link with libpldm to be able
to send out PLDM request messages.
5) PLDM tools
There's an initial version of a pldmtool, which can run on the BMC as a
PLDM requester. It writes a PLDM message on the MCTP socket exposed by
the MCTP demux daemon; pldmd listens on this socket for incoming
messages. The pldmtool then outputs the response received from the
pldmd. Other features, such as validation and the ability to target
connected PLDM devices need to be added to the tool.
6) OEM extensions
The PLDM specs allow for OEM additions wherever possible, both in terms
of OEM commands and OEM extensions to standard commands. The current
infrastructure expects OEM code to be built with the pldm stack, and to
be enabled by compile time flags. An example[8] that's out there today
is an IBM OEM extension to treat files as PLDM objects, which enables
the transfer of things like firmware images. We plan to discuss this
particular extension with the DMTD to see if it's worth standardizing.
[1] https://github.com/openbmc/docs/blob/master/designs/pldm-stack.md
[2] https://github.com/openbmc/pldm
[3] https://www.dmtf.org/standards/pmci
[4] https://gerrit.openbmc-project.xyz/#/q/status:open+project:openbmc/pldm
[5] https://github.com/openbmc/docs/blob/master/designs/mctp.md
[6] https://github.com/openbmc/libmctp
[7] https://gerrit.openbmc-project.xyz/#/c/openbmc/docs/+/24409/
[8] https://github.com/openbmc/pldm/tree/master/oem/ibm
Regards,
Deepak
More information about the openbmc
mailing list