mbox series

[V4,00/15] Complete PLDM responder and enable PLDM support

Message ID 20230620150101.88802-1-clombard@linux.ibm.com
Headers show
Series Complete PLDM responder and enable PLDM support | expand

Message

Christophe Lombard June 20, 2023, 3 p.m. UTC
This set of patches allows to complete platform responder to handle
platform events (set events, event messages, state sensors reading, state
effecters) and fru messages from the BMC.
Specific astbmc features (watchdog timer, Real Time Clock, Opal IPMI
calls) are also supported.

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 these previous sets:
- Implement virtual flash content using PLDM.
- Import external libraries for MCTP/PLDM protocols.
- Implement MCTP and PLDM features.

Changelog[v4]
 - Rebase to latest upstream.
 - patch1 : - Add a poller to regular send heartbeats.
 - patch2 : - Update debug message.
 - patch3 : - Do not poll when we respond to a BMC request.
 - patch4 : - Do not poll when we respond to a BMC request.
 - patch5 : - Handle all state effecters.
 - patch6 : - Find record only if available.
 - patch8 : - Remove global values.
 - patch9 : - Do not poll when we respond to a BMC request.
 - patch10: - Rename pldm_fru_add_record().
            - Do not poll when we respond to a BMC request.
 - patch11: - Do not poll when we respond to a BMC request.
 - patch13: - Change returned value.
 - patch15: - Do not call ipmi in case of pldm failure.

Changelog[v3]
 - Rebase to latest upstream.
 - patch1 : - Use new pldm requests queue handler.
 - patch13: - Use new pldm requests queue handler.
 - patch14: - Use new pldm requests queue handler.
            - Handle GET_DEVICE_ID_CMD and GET_DEVICE_GUID_CMD.
 - patch15: - Remove Rainier System part.

Changelog[v2]
 - Rebase to latest upstream.
 - patch1 : - Update some comments.
            - Decrement sequence_number in case of issue.
 - patch2 : - Invoke the appropriate callback handler.
 - patch5 : - occ reset for default chip.
 - patch7 : - Update some comments.
 - patch8 : - Rework adding hosted PDRs.
            - Add boot progress PDR.
 - patch9 : - Add free buffer.
 - patch11: - Add free buffer.
 - patch12: - Add sensor state changed event.
 - patch15: - Add boot progress change.

Christophe Lombard (15):
  core/pldm: Handle Watchdog timer.
  core/pldm: Decode the SetEventReceiver request
  core/pldm: Decode the PlatformEventMessage request
  core/pldm: Decode the GetStateSensorReadings request
  core/pldm: Decode the SetStateEffecterStates request
  core/pldm: Find PDR record by record handle
  core/pldm: Encode PLDM PDR Repository Change eventData
  core/pldm: Create boot progress and terminus locator in the given repo
  core/pldm: Decode the GetPDR request
  core/pldm: Decode the GetFRURecordTableMetadata request
  core/pldm: Decode the GetFruRecordTable request
  core/pldm: Update boot progress state
  core/pldm: Register OPAL_RTC_READ/WRITE calls back
  core/pldm: Register OPAL_IPMI_SEND/RECV calls back
  platforms/astbmc: Enable PLDM support

 core/init.c                        |  16 +-
 core/pldm/Makefile.inc             |   1 +
 core/pldm/pldm-fru-requests.c      |  70 +++
 core/pldm/pldm-opal.c              | 293 ++++++++++++
 core/pldm/pldm-platform-requests.c | 507 +++++++++++++++++++++
 core/pldm/pldm-responder.c         | 709 ++++++++++++++++++++++++++++-
 core/pldm/pldm-rtc.c               | 260 +++++++++++
 core/pldm/pldm-watchdog.c          | 142 ++++++
 core/pldm/pldm.h                   |  28 ++
 include/pldm.h                     |  22 +
 platforms/astbmc/astbmc.h          |   4 +
 platforms/astbmc/common.c          |  34 ++
 platforms/astbmc/pnor.c            |  25 +
 platforms/qemu/qemu.c              |   6 +
 14 files changed, 2115 insertions(+), 2 deletions(-)
 create mode 100644 core/pldm/pldm-opal.c
 create mode 100644 core/pldm/pldm-rtc.c
 create mode 100644 core/pldm/pldm-watchdog.c

Comments

Nicholas Piggin June 21, 2023, 5:05 a.m. UTC | #1
On Wed Jun 21, 2023 at 1:00 AM AEST, Christophe Lombard wrote:
> This set of patches allows to complete platform responder to handle
> platform events (set events, event messages, state sensors reading, state
> effecters) and fru messages from the BMC.
> Specific astbmc features (watchdog timer, Real Time Clock, Opal IPMI
> calls) are also supported.
>
> 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 these previous sets:
> - Implement virtual flash content using PLDM.
> - Import external libraries for MCTP/PLDM protocols.
> - Implement MCTP and PLDM features.

What's the conceptual split between this series and the previous,
for someone who doesn't know any PLDM and very little IPMI?

Thanks,
Nick
Christophe Lombard June 21, 2023, 3:19 p.m. UTC | #2
Le 21/06/2023 à 07:05, Nicholas Piggin a écrit :
> On Wed Jun 21, 2023 at 1:00 AM AEST, Christophe Lombard wrote:
>> This set of patches allows to complete platform responder to handle
>> platform events (set events, event messages, state sensors reading, state
>> effecters) and fru messages from the BMC.
>> Specific astbmc features (watchdog timer, Real Time Clock, Opal IPMI
>> calls) are also supported.
>>
>> 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 these previous sets:
>> - Implement virtual flash content using PLDM.
>> - Import external libraries for MCTP/PLDM protocols.
>> - Implement MCTP and PLDM features.
> What's the conceptual split between this series and the previous,
> for someone who doesn't know any PLDM and very little IPMI?

The order of patch series 4 is obviously important:

1. Import external libraries for MCTP/PLDM protocols.
Import the 3 main PLDM libraries: libmctp, libpldm and ibm oem pldm

2. Implement MCTP and PLDM features
Configure the mctp layer and implement the required functionalities for 
managing pldm requests

3. Implement virtual flash content using PLDM.
Add tools to access to the PNOR partitions (lid files)

4. Complete PLDM responder and enable PLDM support
Add management of pldm requests coming from the BMC
Add astbmc specific features


> Thanks,
> Nick