[Skiboot] [PATCH V6 06/21] core/pldm: Encode GetPLDMTypes response

Frederic Barrat fbarrat at linux.ibm.com
Thu Apr 13 00:47:49 AEST 2023



On 13/09/2022 12:26, Christophe Lombard wrote:
> The GetPLDMTypes command can be used to discover the PLDM type capabilities
> supported by a PLDM terminus and to get a list of the PLDM types that are
> supported.
> 
> Reviewed-by: Abhishek Singh Tomar <abhishek at linux.ibm.com>
> Signed-off-by: Christophe Lombard <clombard at linux.vnet.ibm.com>
> ---
>   core/pldm/pldm-responder.c | 52 ++++++++++++++++++++++++++++++++++++++
>   1 file changed, 52 insertions(+)
> 
> diff --git a/core/pldm/pldm-responder.c b/core/pldm/pldm-responder.c
> index 6f11030d..6058af51 100644
> --- a/core/pldm/pldm-responder.c
> +++ b/core/pldm/pldm-responder.c
> @@ -154,6 +154,57 @@ static struct pldm_cmd pldm_base_get_tid = {
>   	.handler = base_get_tid_handler,
>   };
>   
> +/*
> + * GetPLDMTypes (0x04)
> + * The GetPLDMTypes command can be used to discover the PLDM type
> + * capabilities supported by a PLDM terminus and to get a list of the
> + * PLDM types that are supported.
> + */
> +static int base_get_types_handler(const struct pldm_rx_data *req)
> +{
> +	char response_msg[PKT_SIZE(struct pldm_get_types_resp)];
> +	bitmap_elem_t type_map[BITMAP_ELEMS(32)];


The spec says 64 and that's what libpldm is using.
We can use:
#define PLDM_MAX_TYPES 64

   Fred


More information about the Skiboot mailing list