[Skiboot] [PATCH V4 8/9] pldm/libpldm: Import libpldm library handling PLDM protocol

Nicholas Piggin npiggin at gmail.com
Wed Jun 21 14:51:52 AEST 2023


On Wed Jun 21, 2023 at 12:52 AM AEST, Christophe Lombard wrote:
> Platform Level Data Model (PLDM) is a standard application layer
> communication protocol defined by the DMTF. PLDM is an effective data and
> control source. PLDM defines a method to provide efficient access to
> low-level platform inventory, monitoring, control, eventing, and
> data/parameters transfer functions such as temperature, fan, voltage,
> event logging, and boot control.
>
> PLDM has defined data representations and commands that abstract the
> platform management hardware.
> The library deals with the encoding and decoding of PLDM messages.
>
> The source is located here:
> https://github.com/openbmc/pldm/tree/master/libpldm and use as is, without
> any update.
>
> The libpldm code is integrated into the folder ./pldm/libpldm as a set of
> sources, compilated if the compiler flag CONFIG_PLDM is set.
>
> Signed-off-by: Christophe Lombard <clombard at linux.ibm.com>

[snip]

> +/** @brief Compute Crc32(same as the one used by IEEE802.3)
> + *
> + *  @param[in] data - Pointer to the target data
> + *  @param[in] size - Size of the data
> + *  @return The checksum
> + */
> +uint32_t crc32(const void *data, size_t size);

[snip]

> diff --git a/pldm/libpldm/README.skiboot b/pldm/libpldm/README.skiboot
> new file mode 100644
> index 00000000..0eecaa41
> --- /dev/null
> +++ b/pldm/libpldm/README.skiboot
> @@ -0,0 +1,17 @@
> +skiboot/pldm/libpldm/ is a minimally modified version of upstream
> +libpldm that is distributed with the openbmc project hosted at
> +https://github.com/openbmc/libpldm.git
> +
> +This version is taken from pldm.git commit 953bc8c1a4e9 ("libpldm: Enable
> +API/ABI compliance checks") by copying most of files from the pldm/libpldm/
> +directory.
> +
> +The only modifications from the upstream source are the additions of
> +this file, Makefile.inc which has been derived from the original
> +Makefile.inc, the rename of the api crc32() which is already
> +defined in libmctp/crc32.c

Yet it declares at is well. And this code doesn't use the pldm version.

Small nit I suppose. You could just remove it entirely? Or put a common
version somewhere and remove it from both (well we have xz_crc32 too)?

Otherwise same for this one

Acked-by: Nicholas Piggin <npiggin at gmail.com>


More information about the Skiboot mailing list