[Skiboot] [PATCH V8 00/21] Implement MCTP and PLDM features

Christophe Lombard clombard at linux.ibm.com
Wed Jun 21 00:59:56 AEST 2023


PLDM is designed to be an interface and data model that provides efficient
access to low-level platform inventory, monitoring, control, event, and
data/parameters transfer functions. For example, temperature, voltage, or
fan sensors can have a PLDM representation that can be used to monitor or
control the platform using a set of PLDM messages. PLDM over MCTP binding
defines the format of PLDM over MCTP messages.

This patch set covers these following steps:
- initialize MCTP binding over LPC Bus interface.
- define PLDM responder and PLDM control and discovery requests.
- define PLDM requester and define the functions and data structures used
for discovering, describing, initializing, and accessing sensors and
effecters within the management controllers and management devices of a
platform management subsystem using PLDM messaging. 
- encode and decode APIs for in-band readFile and writeFile commands.

To enable the new PLDM features, add CONFIG_PLDM as a parameter:
  make .... CONFIG_PLDM=1

This patch set should be applied on top of this previous set:
Import external libraries for MCTP/PLDM protocols.

Changelog[v8]
 - Rebase to latest upstream.
 - patch2 : - Do not poll when we respond to a BMC request.
            - Read the Rx_complete command out of the ODR.
 - patch3 : - Move message rx callback.
 - patch15: - Change returned value.
 - patch19: - Change function signature.
 - patch20: - Change function signature.
 - patch21: - Change returned value.

Changelog[v7]
 - Rebase to latest upstream.
 - patch2 : - Use opal poller.
 - patch3 : - Move message rx callback.
 - patch4 : - Rename PKT_SIZE.
 - patch9 : - Use opal poller.
 - patch10: - Change the method to retrieve the pdrs.
 - patch14: - Handle allocation.
 - patch15: - Add condition to avoid infinite loop.
 
Changelog[v6]
 - Rebase to latest upstream.
 - patch1 : - Add mctp backend support.
 - patch2 : - Rename pldm-common.c to pldm-mctp.c
 - patch3 : - Rename internal functions.
 - patch4 : - Rename internal functions.
 - patch6 : - Rename internal functions.
 - patch7 : - Rename internal functions.
 - patch8 : - Rename internal functions.
 - patch9 : - Add pldm requests queue/list handler.
 - patch10: - Update pdrs_init and Export BMC tid.
 - patch14: - Use zalloc instead of malloc api.
 - patch16: - Add pldm_fru_init.
 - patch17: - Export BMC firmware version.

Changelog[v5]
 - Rebase to latest upstream.
 - patch1 : - Remove lpc_fw_read/write in ipmi-hiomap.c and mbox-flash.c.
 - patch9 : - Increase number of retries.
 - patch10: - Move part of pldm_platform_init() to a new function.
 - patch11: - Do not wait PLDM response for some commands.
 - patch12: - Update a comment.
 - patch13: - Update a comment.

Changelog[v4]
 - Rebase to latest upstream.
 - patch2 : - Add ast_mctp_exit() api.
 - patch3 : - Add pldm_mctp_exit() api.
 - patch4 : - Add PR_ERR message on error.
 - patch5 : - Add PR_ERR message on error.
            - Add suffix for base handler apis.
 - patch6 : - Add PR_ERR message on error.
            - Add suffix for base handler apis.
 - patch7 : - Add PR_ERR message on error.
            - Add suffix for base handler apis.
 - patch8 : - Add PR_ERR message on error.
            - Add suffix for base handler apis.
 - patch10: - Get BMC tid.
 - patch11: - Free memory on error.
 - patch14: - Free memory on error.
 - patch16: - Add PR_ERR message on error.

Changelog[v3]
 - Rebase to latest upstream.
 - patch1 : - Current IPMI testcase broken.
 - patch9 : - Consider the dest_id in pldm_send().
 - patch10: - Add a comment.
 - patch15: - Update find_lid_by_attr_name().
 - patch16: - Copy fsdata.length in the returned structure.
 - patch20: - Cleanup write_file_req().

Changelog[v2]
 - Rebase to latest upstream.
 - patch3 : - Patch is now correctly built.
 - patch9 : - Update number of retries.
 - patch10: - Update traces.
 - patch11: - Add new parameter (no_timeout) for the api:
              set_state_effecter_states_req().
 - patch12: - Call set_state_effecter_states_req() with the new parameter.
 - patch13: - Call set_state_effecter_states_req() with the new parameter.
 - patch14: - Update traces.
 - patch15: - Change the signature of pldm_bios_get_lids_id().
 - patch16: - Add new PLDM FRU requests.

Christophe Lombard (21):
  hw: Move lpc firmware space helpers
  hw/ast-bmc: Initialize ast lpc mctp binding
  core/pldm: PLDM over MCTP Binding
  core/pldm: Add PLDM responder support
  core/pldm: Encode GetTID response
  core/pldm: Encode GetPLDMTypes response
  core/pldm: Encode GetPLDMCommands response
  core/pldm: Encode GetPLDMVersion response
  core/pldm: Implement PLDM requester
  core/pldm: PLDM for Platform Monitoring and Control Specification
  core/pldm: Encode state effecter request
  core/pldm: Send a system firmware Graceful Restart request
  core/pldm: Send a system chassis Off-Soft Graceful request
  core/pldm: PLDM for BIOS Control and Configuration Specification
  core/pldm: Find lid attribute from bios tables
  core/pldm: PLDM for FRU data Specification
  core/pldm: Update "bmc-firmware-version" device-tree field
  core/pldm: PLDM for File-IO operations
  core/pldm: Add file io read request
  core/pldm: Add file io write request
  core/pldm: Get file handle and file length

 core/Makefile.inc                  |   6 +-
 core/pldm/Makefile.inc             |  16 +
 core/pldm/pldm-base-requests.c     |  76 +++++
 core/pldm/pldm-bios-requests.c     | 370 +++++++++++++++++++++
 core/pldm/pldm-file-io-requests.c  | 492 ++++++++++++++++++++++++++++
 core/pldm/pldm-fru-requests.c      | 232 ++++++++++++++
 core/pldm/pldm-mctp.c              | 121 +++++++
 core/pldm/pldm-platform-requests.c | 498 +++++++++++++++++++++++++++++
 core/pldm/pldm-requester.c         | 335 +++++++++++++++++++
 core/pldm/pldm-responder.c         | 469 +++++++++++++++++++++++++++
 core/pldm/pldm.h                   |  85 +++++
 hw/ast-bmc/Makefile.inc            |   7 +
 hw/ast-bmc/ast-mctp.c              | 382 ++++++++++++++++++++++
 hw/lpc.c                           |  74 +++++
 include/ast.h                      |  26 ++
 include/lpc.h                      |   6 +
 include/pldm.h                     |  39 +++
 libflash/ipmi-hiomap.c             |  66 +---
 libflash/mbox-flash.c              |  64 +---
 libflash/test/mbox-server.c        |  68 ++++
 libflash/test/test-ipmi-hiomap.c   |  66 ++++
 platforms/astbmc/common.c          |  41 +++
 22 files changed, 3412 insertions(+), 127 deletions(-)
 create mode 100644 core/pldm/Makefile.inc
 create mode 100644 core/pldm/pldm-base-requests.c
 create mode 100644 core/pldm/pldm-bios-requests.c
 create mode 100644 core/pldm/pldm-file-io-requests.c
 create mode 100644 core/pldm/pldm-fru-requests.c
 create mode 100644 core/pldm/pldm-mctp.c
 create mode 100644 core/pldm/pldm-platform-requests.c
 create mode 100644 core/pldm/pldm-requester.c
 create mode 100644 core/pldm/pldm-responder.c
 create mode 100644 core/pldm/pldm.h
 create mode 100644 hw/ast-bmc/ast-mctp.c
 create mode 100644 include/pldm.h

-- 
2.40.1



More information about the Skiboot mailing list