public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Re: [edk2-devel] [PATCH] MdePkg/Include: Add DMTF PLDM Base definitions
       [not found] <1751FB35BEA4DD5D.3578@groups.io>
@ 2023-04-18  3:11 ` Chang, Abner
  0 siblings, 0 replies; 6+ messages in thread
From: Chang, Abner @ 2023-04-18  3:11 UTC (permalink / raw)
  To: devel@edk2.groups.io, Chang, Abner
  Cc: Michael D Kinney, Liming Gao, Zhiguang Liu, Nickle Wang,
	Igor Kulchytskyy, Isaac Oram, Attar, AbdulLateef (Abdul Lateef)

[AMD Official Use Only - General]

Hi Maintainers,
Please review this.
Thanks
Abner

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Chang,
> Abner via groups.io
> Sent: Sunday, April 2, 2023 9:52 AM
> To: devel@edk2.groups.io
> Cc: Michael D Kinney <michael.d.kinney@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Zhiguang Liu <zhiguang.liu@intel.com>; Nickle
> Wang <nicklew@nvidia.com>; Igor Kulchytskyy <igork@ami.com>; Isaac
> Oram <isaac.w.oram@intel.com>; Attar, AbdulLateef (Abdul Lateef)
> <AbdulLateef.Attar@amd.com>
> Subject: [edk2-devel] [PATCH] MdePkg/Include: Add DMTF PLDM Base
> definitions
> 
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
> 
> 
> From: Abner Chang <abner.chang@amd.com>
> 
> BZ #4396
> This change adds definitions for DMTF PLDM base specification.
> 
> Spec ref:
> https://www.dmtf.org/sites/default/files/standards/documents/DSP0240_1
> .1.0.pdf
> 
> Signed-off-by: Abner Chang <abner.chang@amd.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Cc: Nickle Wang <nicklew@nvidia.com>
> Cc: Igor Kulchytskyy <igork@ami.com>
> Cc: Isaac Oram <isaac.w.oram@intel.com>
> Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
> ---
>  MdePkg/Include/IndustryStandard/Pldm.h | 81
> ++++++++++++++++++++++++++
>  1 file changed, 81 insertions(+)
>  create mode 100644 MdePkg/Include/IndustryStandard/Pldm.h
> 
> diff --git a/MdePkg/Include/IndustryStandard/Pldm.h
> b/MdePkg/Include/IndustryStandard/Pldm.h
> new file mode 100644
> index 00000000000..82d65b71874
> --- /dev/null
> +++ b/MdePkg/Include/IndustryStandard/Pldm.h
> @@ -0,0 +1,81 @@
> +/**
> +  The definitions of DMTF Platform Level Data Model (PLDM)
> +  Base Specification.
> +
> +  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +  @par Revision Reference:
> +  DMTF Platform Level Data Model (PLDM) Base Specification  Version
> + 1.1.0
> +
> https://www.dmtf.org/sites/default/files/standards/documents/DSP0240_1
> + .1.0.pdf
> +
> +**/
> +
> +#ifndef PLDM_H_
> +#define PLDM_H_
> +
> +#pragma pack(1)
> +
> +#define PLDM_MESSAGE_HEADER_VERSION  0
> +
> +///
> +/// General definitions from Platform Level Data Model (PLDM) Base ///
> +Specification (DMTF DSP0240) /// typedef struct  {
> +  UINT8    InstanceId    : 5;          ///< Request instance ID.
> +  UINT8    Reserved      : 1;          ///< Reserved bit.
> +  UINT8    DatagramBit   : 1;          ///< used to indicate whether the Instance
> ID field is
> +                                       ///< being used for tracking and matching requests and
> +                                       ///< responses, or just being used for asynchronous
> +                                       ///< notifications.
> +  UINT8    RequestBit    : 1;          ///< Request bit.
> +  UINT8    PldmType      : 6;          ///< PLDM message type.
> +  UINT8    HeaderVersion : 2;          ///< Header version.
> +  UINT8    PldmTypeCommandCode;        ///< The command code of PLDM
> message type.
> +} PLDM_MESSAGE_HEADER;
> +
> +typedef PLDM_MESSAGE_HEADER PLDM_REQUEST_HEADER;
> +
> +#define PLDM_MESSAGE_HEADER_IS_REQUEST        1
> +#define PLDM_MESSAGE_HEADER_IS_DATAGRAM       1
> +#define PLDM_MESSAGE_HEADER_INSTANCE_ID_MASK  0x1f
> +
> +typedef struct {
> +  PLDM_MESSAGE_HEADER    PldmHeader;
> +  UINT8                  PldmCompletionCode;   ///< PLDM completion  of response
> message.
> +} PLDM_RESPONSE_HEADER;
> +
> +#pragma pack()
> +
> +#define PLDM_HEADER_VERSION  0x00
> +
> +#define PLDM_COMPLETION_CODE_SUCCESS                     0x00
> +#define PLDM_COMPLETION_CODE_ERROR                       0x01
> +#define PLDM_COMPLETION_CODE_ERROR_INVALID_DATA          0x02
> +#define PLDM_COMPLETION_CODE_ERROR_INVALID_LENGTH        0x03
> +#define PLDM_COMPLETION_CODE_ERROR_NOT_READY             0x04
> +#define PLDM_COMPLETION_CODE_ERROR_UNSUPPORTED_PLDM_CMD
> 0x05
> +#define PLDM_COMPLETION_CODE_ERROR_INVALID_PLDM_TYPE     0x20
> +#define PLDM_COMPLETION_CODE_SPECIFIC_START              0x80
> +#define PLDM_COMPLETION_CODE_SPECIFIC_END                0xff
> +
> +///
> +/// Type Code definitions from Platform Level Data Model (PLDM) IDs ///
> +and Codes Specification (DMTF DSP0245) ///
> +https://www.dmtf.org/sites/default/files/standards/documents/DSP0245_
> 1.
> +3.0.pdf
> +///
> +#define PLDM_TYPE_MESSAGE_CONTROL_AND_DISCOVERY    0x00
> +#define PLDM_TYPE_SMBIOS                           0x01
> +#define PLDM_TYPE_PLATFORM_MONITORING_AND_CONTROL  0x02
> +#define PLDM_TYPE_BIOS_CONTROL_AND_CONFIGURATION   0x03
> +
> +#define PLDM_TRANSFER_FLAG_START          0x01
> +#define PLDM_TRANSFER_FLAG_MIDDLE         0x02
> +#define PLDM_TRANSFER_FLAG_END            0x04
> +#define PLDM_TRANSFER_FLAG_START_AND_END  0x05
> +
> +#define PLDM_TRANSFER_OPERATION_FLAG_GET_NEXT_PART   0x00
> +#define PLDM_TRANSFER_OPERATION_FLAG_GET_FIRST_PART  0x01
> #endif //
> +PLDM_H_
> --
> 2.37.1.windows.1
> 
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [edk2-devel] [PATCH] MdePkg/Include: Add DMTF PLDM Base definitions
  2023-04-02  1:51 Chang, Abner
@ 2023-04-18 17:49 ` Michael D Kinney
  2023-04-19  2:13   ` Chang, Abner
  0 siblings, 1 reply; 6+ messages in thread
From: Michael D Kinney @ 2023-04-18 17:49 UTC (permalink / raw)
  To: devel@edk2.groups.io, abner.chang@amd.com
  Cc: Gao, Liming, Liu, Zhiguang, Nickle Wang, Igor Kulchytskyy,
	Oram, Isaac W, Abdul Lateef Attar, Kinney, Michael D

I see PldmSmbiosTransfer.h includes this file.  Are there any other files that will include this file?

Could this content be folded into PldmSmbiosTransfer.h to reduce total number of include files?

Mike

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Chang, Abner via groups.io
> Sent: Saturday, April 1, 2023 6:52 PM
> To: devel@edk2.groups.io
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Liu, Zhiguang
> <zhiguang.liu@intel.com>; Nickle Wang <nicklew@nvidia.com>; Igor Kulchytskyy <igork@ami.com>; Oram, Isaac W
> <isaac.w.oram@intel.com>; Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
> Subject: [edk2-devel] [PATCH] MdePkg/Include: Add DMTF PLDM Base definitions
> 
> From: Abner Chang <abner.chang@amd.com>
> 
> BZ #4396
> This change adds definitions for DMTF PLDM
> base specification.
> 
> Spec ref:
> https://www.dmtf.org/sites/default/files/standards/documents/DSP0240_1.1.0.pdf
> 
> Signed-off-by: Abner Chang <abner.chang@amd.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Cc: Nickle Wang <nicklew@nvidia.com>
> Cc: Igor Kulchytskyy <igork@ami.com>
> Cc: Isaac Oram <isaac.w.oram@intel.com>
> Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
> ---
>  MdePkg/Include/IndustryStandard/Pldm.h | 81 ++++++++++++++++++++++++++
>  1 file changed, 81 insertions(+)
>  create mode 100644 MdePkg/Include/IndustryStandard/Pldm.h
> 
> diff --git a/MdePkg/Include/IndustryStandard/Pldm.h b/MdePkg/Include/IndustryStandard/Pldm.h
> new file mode 100644
> index 00000000000..82d65b71874
> --- /dev/null
> +++ b/MdePkg/Include/IndustryStandard/Pldm.h
> @@ -0,0 +1,81 @@
> +/**
> +  The definitions of DMTF Platform Level Data Model (PLDM)
> +  Base Specification.
> +
> +  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +  @par Revision Reference:
> +  DMTF Platform Level Data Model (PLDM) Base Specification
> +  Version 1.1.0
> +  https://www.dmtf.org/sites/default/files/standards/documents/DSP0240_1.1.0.pdf
> +
> +**/
> +
> +#ifndef PLDM_H_
> +#define PLDM_H_
> +
> +#pragma pack(1)
> +
> +#define PLDM_MESSAGE_HEADER_VERSION  0
> +
> +///
> +/// General definitions from Platform Level Data Model (PLDM) Base
> +/// Specification (DMTF DSP0240)
> +///
> +typedef struct  {
> +  UINT8    InstanceId    : 5;          ///< Request instance ID.
> +  UINT8    Reserved      : 1;          ///< Reserved bit.
> +  UINT8    DatagramBit   : 1;          ///< used to indicate whether the Instance ID field is
> +                                       ///< being used for tracking and matching requests and
> +                                       ///< responses, or just being used for asynchronous
> +                                       ///< notifications.
> +  UINT8    RequestBit    : 1;          ///< Request bit.
> +  UINT8    PldmType      : 6;          ///< PLDM message type.
> +  UINT8    HeaderVersion : 2;          ///< Header version.
> +  UINT8    PldmTypeCommandCode;        ///< The command code of PLDM message type.
> +} PLDM_MESSAGE_HEADER;
> +
> +typedef PLDM_MESSAGE_HEADER PLDM_REQUEST_HEADER;
> +
> +#define PLDM_MESSAGE_HEADER_IS_REQUEST        1
> +#define PLDM_MESSAGE_HEADER_IS_DATAGRAM       1
> +#define PLDM_MESSAGE_HEADER_INSTANCE_ID_MASK  0x1f
> +
> +typedef struct {
> +  PLDM_MESSAGE_HEADER    PldmHeader;
> +  UINT8                  PldmCompletionCode;   ///< PLDM completion  of response message.
> +} PLDM_RESPONSE_HEADER;
> +
> +#pragma pack()
> +
> +#define PLDM_HEADER_VERSION  0x00
> +
> +#define PLDM_COMPLETION_CODE_SUCCESS                     0x00
> +#define PLDM_COMPLETION_CODE_ERROR                       0x01
> +#define PLDM_COMPLETION_CODE_ERROR_INVALID_DATA          0x02
> +#define PLDM_COMPLETION_CODE_ERROR_INVALID_LENGTH        0x03
> +#define PLDM_COMPLETION_CODE_ERROR_NOT_READY             0x04
> +#define PLDM_COMPLETION_CODE_ERROR_UNSUPPORTED_PLDM_CMD  0x05
> +#define PLDM_COMPLETION_CODE_ERROR_INVALID_PLDM_TYPE     0x20
> +#define PLDM_COMPLETION_CODE_SPECIFIC_START              0x80
> +#define PLDM_COMPLETION_CODE_SPECIFIC_END                0xff
> +
> +///
> +/// Type Code definitions from Platform Level Data Model (PLDM) IDs
> +/// and Codes Specification (DMTF DSP0245)
> +/// https://www.dmtf.org/sites/default/files/standards/documents/DSP0245_1.3.0.pdf
> +///
> +#define PLDM_TYPE_MESSAGE_CONTROL_AND_DISCOVERY    0x00
> +#define PLDM_TYPE_SMBIOS                           0x01
> +#define PLDM_TYPE_PLATFORM_MONITORING_AND_CONTROL  0x02
> +#define PLDM_TYPE_BIOS_CONTROL_AND_CONFIGURATION   0x03
> +
> +#define PLDM_TRANSFER_FLAG_START          0x01
> +#define PLDM_TRANSFER_FLAG_MIDDLE         0x02
> +#define PLDM_TRANSFER_FLAG_END            0x04
> +#define PLDM_TRANSFER_FLAG_START_AND_END  0x05
> +
> +#define PLDM_TRANSFER_OPERATION_FLAG_GET_NEXT_PART   0x00
> +#define PLDM_TRANSFER_OPERATION_FLAG_GET_FIRST_PART  0x01
> +#endif // PLDM_H_
> --
> 2.37.1.windows.1
> 
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [edk2-devel] [PATCH] MdePkg/Include: Add DMTF PLDM Base definitions
  2023-04-18 17:49 ` [edk2-devel] " Michael D Kinney
@ 2023-04-19  2:13   ` Chang, Abner
  2023-04-19 15:05     ` Michael D Kinney
  0 siblings, 1 reply; 6+ messages in thread
From: Chang, Abner @ 2023-04-19  2:13 UTC (permalink / raw)
  To: devel@edk2.groups.io, michael.d.kinney@intel.com
  Cc: Gao, Liming, Liu, Zhiguang, Nickle Wang, Igor Kulchytskyy,
	Oram, Isaac W, Attar, AbdulLateef (Abdul Lateef)

[AMD Official Use Only - General]

There are couple subordinate specifications base on PLDM base spec. There is possible someone introduces another PLDM C header file that includes PLDM base definitions. So PLDM base definitions should be separated.

Abner

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Michael
> D Kinney via groups.io
> Sent: Wednesday, April 19, 2023 1:50 AM
> To: devel@edk2.groups.io; Chang, Abner <Abner.Chang@amd.com>
> Cc: Gao, Liming <gaoliming@byosoft.com.cn>; Liu, Zhiguang
> <zhiguang.liu@intel.com>; Nickle Wang <nicklew@nvidia.com>; Igor
> Kulchytskyy <igork@ami.com>; Oram, Isaac W <isaac.w.oram@intel.com>;
> Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>; Kinney,
> Michael D <michael.d.kinney@intel.com>
> Subject: Re: [edk2-devel] [PATCH] MdePkg/Include: Add DMTF PLDM Base
> definitions
> 
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
> 
> 
> I see PldmSmbiosTransfer.h includes this file.  Are there any other files that
> will include this file?
> 
> Could this content be folded into PldmSmbiosTransfer.h to reduce total
> number of include files?
> 
> Mike
> 
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Chang,
> > Abner via groups.io
> > Sent: Saturday, April 1, 2023 6:52 PM
> > To: devel@edk2.groups.io
> > Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming
> > <gaoliming@byosoft.com.cn>; Liu, Zhiguang <zhiguang.liu@intel.com>;
> > Nickle Wang <nicklew@nvidia.com>; Igor Kulchytskyy <igork@ami.com>;
> > Oram, Isaac W <isaac.w.oram@intel.com>; Abdul Lateef Attar
> > <AbdulLateef.Attar@amd.com>
> > Subject: [edk2-devel] [PATCH] MdePkg/Include: Add DMTF PLDM Base
> > definitions
> >
> > From: Abner Chang <abner.chang@amd.com>
> >
> > BZ #4396
> > This change adds definitions for DMTF PLDM base specification.
> >
> > Spec ref:
> >
> https://www.dmtf.org/sites/default/files/standards/documents/DSP0240_1
> > .1.0.pdf
> >
> > Signed-off-by: Abner Chang <abner.chang@amd.com>
> > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> > Cc: Nickle Wang <nicklew@nvidia.com>
> > Cc: Igor Kulchytskyy <igork@ami.com>
> > Cc: Isaac Oram <isaac.w.oram@intel.com>
> > Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
> > ---
> >  MdePkg/Include/IndustryStandard/Pldm.h | 81
> > ++++++++++++++++++++++++++
> >  1 file changed, 81 insertions(+)
> >  create mode 100644 MdePkg/Include/IndustryStandard/Pldm.h
> >
> > diff --git a/MdePkg/Include/IndustryStandard/Pldm.h
> > b/MdePkg/Include/IndustryStandard/Pldm.h
> > new file mode 100644
> > index 00000000000..82d65b71874
> > --- /dev/null
> > +++ b/MdePkg/Include/IndustryStandard/Pldm.h
> > @@ -0,0 +1,81 @@
> > +/**
> > +  The definitions of DMTF Platform Level Data Model (PLDM)
> > +  Base Specification.
> > +
> > +  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
> > +  SPDX-License-Identifier: BSD-2-Clause-Patent
> > +
> > +  @par Revision Reference:
> > +  DMTF Platform Level Data Model (PLDM) Base Specification  Version
> > + 1.1.0
> > +
> https://www.dmtf.org/sites/default/files/standards/documents/DSP0240
> > + _1.1.0.pdf
> > +
> > +**/
> > +
> > +#ifndef PLDM_H_
> > +#define PLDM_H_
> > +
> > +#pragma pack(1)
> > +
> > +#define PLDM_MESSAGE_HEADER_VERSION  0
> > +
> > +///
> > +/// General definitions from Platform Level Data Model (PLDM) Base
> > +/// Specification (DMTF DSP0240) /// typedef struct  {
> > +  UINT8    InstanceId    : 5;          ///< Request instance ID.
> > +  UINT8    Reserved      : 1;          ///< Reserved bit.
> > +  UINT8    DatagramBit   : 1;          ///< used to indicate whether the Instance
> ID field is
> > +                                       ///< being used for tracking and matching requests
> and
> > +                                       ///< responses, or just being used for asynchronous
> > +                                       ///< notifications.
> > +  UINT8    RequestBit    : 1;          ///< Request bit.
> > +  UINT8    PldmType      : 6;          ///< PLDM message type.
> > +  UINT8    HeaderVersion : 2;          ///< Header version.
> > +  UINT8    PldmTypeCommandCode;        ///< The command code of PLDM
> message type.
> > +} PLDM_MESSAGE_HEADER;
> > +
> > +typedef PLDM_MESSAGE_HEADER PLDM_REQUEST_HEADER;
> > +
> > +#define PLDM_MESSAGE_HEADER_IS_REQUEST        1
> > +#define PLDM_MESSAGE_HEADER_IS_DATAGRAM       1
> > +#define PLDM_MESSAGE_HEADER_INSTANCE_ID_MASK  0x1f
> > +
> > +typedef struct {
> > +  PLDM_MESSAGE_HEADER    PldmHeader;
> > +  UINT8                  PldmCompletionCode;   ///< PLDM completion  of
> response message.
> > +} PLDM_RESPONSE_HEADER;
> > +
> > +#pragma pack()
> > +
> > +#define PLDM_HEADER_VERSION  0x00
> > +
> > +#define PLDM_COMPLETION_CODE_SUCCESS                     0x00
> > +#define PLDM_COMPLETION_CODE_ERROR                       0x01
> > +#define PLDM_COMPLETION_CODE_ERROR_INVALID_DATA          0x02
> > +#define PLDM_COMPLETION_CODE_ERROR_INVALID_LENGTH        0x03
> > +#define PLDM_COMPLETION_CODE_ERROR_NOT_READY             0x04
> > +#define
> PLDM_COMPLETION_CODE_ERROR_UNSUPPORTED_PLDM_CMD  0x05
> > +#define PLDM_COMPLETION_CODE_ERROR_INVALID_PLDM_TYPE
> 0x20
> > +#define PLDM_COMPLETION_CODE_SPECIFIC_START              0x80
> > +#define PLDM_COMPLETION_CODE_SPECIFIC_END                0xff
> > +
> > +///
> > +/// Type Code definitions from Platform Level Data Model (PLDM) IDs
> > +/// and Codes Specification (DMTF DSP0245) ///
> >
> +https://www.dmtf.org/sites/default/files/standards/documents/DSP0245_
> > +1.3.0.pdf
> > +///
> > +#define PLDM_TYPE_MESSAGE_CONTROL_AND_DISCOVERY    0x00
> > +#define PLDM_TYPE_SMBIOS                           0x01
> > +#define PLDM_TYPE_PLATFORM_MONITORING_AND_CONTROL  0x02
> > +#define PLDM_TYPE_BIOS_CONTROL_AND_CONFIGURATION   0x03
> > +
> > +#define PLDM_TRANSFER_FLAG_START          0x01
> > +#define PLDM_TRANSFER_FLAG_MIDDLE         0x02
> > +#define PLDM_TRANSFER_FLAG_END            0x04
> > +#define PLDM_TRANSFER_FLAG_START_AND_END  0x05
> > +
> > +#define PLDM_TRANSFER_OPERATION_FLAG_GET_NEXT_PART   0x00
> > +#define PLDM_TRANSFER_OPERATION_FLAG_GET_FIRST_PART  0x01
> #endif //
> > +PLDM_H_
> > --
> > 2.37.1.windows.1
> >
> >
> >
> >
> >
> 
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [edk2-devel] [PATCH] MdePkg/Include: Add DMTF PLDM Base definitions
  2023-04-19  2:13   ` Chang, Abner
@ 2023-04-19 15:05     ` Michael D Kinney
  2023-04-20  3:24       ` Chang, Abner
  0 siblings, 1 reply; 6+ messages in thread
From: Michael D Kinney @ 2023-04-19 15:05 UTC (permalink / raw)
  To: devel@edk2.groups.io, abner.chang@amd.com
  Cc: Gao, Liming, Liu, Zhiguang, Nickle Wang, Igor Kulchytskyy,
	Oram, Isaac W, Attar, AbdulLateef (Abdul Lateef),
	Kinney, Michael D

Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Chang, Abner via groups.io
> Sent: Tuesday, April 18, 2023 7:14 PM
> To: devel@edk2.groups.io; Kinney, Michael D <michael.d.kinney@intel.com>
> Cc: Gao, Liming <gaoliming@byosoft.com.cn>; Liu, Zhiguang <zhiguang.liu@intel.com>; Nickle Wang <nicklew@nvidia.com>; Igor
> Kulchytskyy <igork@ami.com>; Oram, Isaac W <isaac.w.oram@intel.com>; Attar, AbdulLateef (Abdul Lateef)
> <AbdulLateef.Attar@amd.com>
> Subject: Re: [edk2-devel] [PATCH] MdePkg/Include: Add DMTF PLDM Base definitions
> 
> [AMD Official Use Only - General]
> 
> There are couple subordinate specifications base on PLDM base spec. There is possible someone introduces another PLDM C
> header file that includes PLDM base definitions. So PLDM base definitions should be separated.
> 
> Abner
> 
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Michael
> > D Kinney via groups.io
> > Sent: Wednesday, April 19, 2023 1:50 AM
> > To: devel@edk2.groups.io; Chang, Abner <Abner.Chang@amd.com>
> > Cc: Gao, Liming <gaoliming@byosoft.com.cn>; Liu, Zhiguang
> > <zhiguang.liu@intel.com>; Nickle Wang <nicklew@nvidia.com>; Igor
> > Kulchytskyy <igork@ami.com>; Oram, Isaac W <isaac.w.oram@intel.com>;
> > Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>; Kinney,
> > Michael D <michael.d.kinney@intel.com>
> > Subject: Re: [edk2-devel] [PATCH] MdePkg/Include: Add DMTF PLDM Base
> > definitions
> >
> > Caution: This message originated from an External Source. Use proper
> > caution when opening attachments, clicking links, or responding.
> >
> >
> > I see PldmSmbiosTransfer.h includes this file.  Are there any other files that
> > will include this file?
> >
> > Could this content be folded into PldmSmbiosTransfer.h to reduce total
> > number of include files?
> >
> > Mike
> >
> > > -----Original Message-----
> > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Chang,
> > > Abner via groups.io
> > > Sent: Saturday, April 1, 2023 6:52 PM
> > > To: devel@edk2.groups.io
> > > Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming
> > > <gaoliming@byosoft.com.cn>; Liu, Zhiguang <zhiguang.liu@intel.com>;
> > > Nickle Wang <nicklew@nvidia.com>; Igor Kulchytskyy <igork@ami.com>;
> > > Oram, Isaac W <isaac.w.oram@intel.com>; Abdul Lateef Attar
> > > <AbdulLateef.Attar@amd.com>
> > > Subject: [edk2-devel] [PATCH] MdePkg/Include: Add DMTF PLDM Base
> > > definitions
> > >
> > > From: Abner Chang <abner.chang@amd.com>
> > >
> > > BZ #4396
> > > This change adds definitions for DMTF PLDM base specification.
> > >
> > > Spec ref:
> > >
> > https://www.dmtf.org/sites/default/files/standards/documents/DSP0240_1
> > > .1.0.pdf
> > >
> > > Signed-off-by: Abner Chang <abner.chang@amd.com>
> > > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > > Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> > > Cc: Nickle Wang <nicklew@nvidia.com>
> > > Cc: Igor Kulchytskyy <igork@ami.com>
> > > Cc: Isaac Oram <isaac.w.oram@intel.com>
> > > Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
> > > ---
> > >  MdePkg/Include/IndustryStandard/Pldm.h | 81
> > > ++++++++++++++++++++++++++
> > >  1 file changed, 81 insertions(+)
> > >  create mode 100644 MdePkg/Include/IndustryStandard/Pldm.h
> > >
> > > diff --git a/MdePkg/Include/IndustryStandard/Pldm.h
> > > b/MdePkg/Include/IndustryStandard/Pldm.h
> > > new file mode 100644
> > > index 00000000000..82d65b71874
> > > --- /dev/null
> > > +++ b/MdePkg/Include/IndustryStandard/Pldm.h
> > > @@ -0,0 +1,81 @@
> > > +/**
> > > +  The definitions of DMTF Platform Level Data Model (PLDM)
> > > +  Base Specification.
> > > +
> > > +  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
> > > +  SPDX-License-Identifier: BSD-2-Clause-Patent
> > > +
> > > +  @par Revision Reference:
> > > +  DMTF Platform Level Data Model (PLDM) Base Specification  Version
> > > + 1.1.0
> > > +
> > https://www.dmtf.org/sites/default/files/standards/documents/DSP0240
> > > + _1.1.0.pdf
> > > +
> > > +**/
> > > +
> > > +#ifndef PLDM_H_
> > > +#define PLDM_H_
> > > +
> > > +#pragma pack(1)
> > > +
> > > +#define PLDM_MESSAGE_HEADER_VERSION  0
> > > +
> > > +///
> > > +/// General definitions from Platform Level Data Model (PLDM) Base
> > > +/// Specification (DMTF DSP0240) /// typedef struct  {
> > > +  UINT8    InstanceId    : 5;          ///< Request instance ID.
> > > +  UINT8    Reserved      : 1;          ///< Reserved bit.
> > > +  UINT8    DatagramBit   : 1;          ///< used to indicate whether the Instance
> > ID field is
> > > +                                       ///< being used for tracking and matching requests
> > and
> > > +                                       ///< responses, or just being used for asynchronous
> > > +                                       ///< notifications.
> > > +  UINT8    RequestBit    : 1;          ///< Request bit.
> > > +  UINT8    PldmType      : 6;          ///< PLDM message type.
> > > +  UINT8    HeaderVersion : 2;          ///< Header version.
> > > +  UINT8    PldmTypeCommandCode;        ///< The command code of PLDM
> > message type.
> > > +} PLDM_MESSAGE_HEADER;
> > > +
> > > +typedef PLDM_MESSAGE_HEADER PLDM_REQUEST_HEADER;
> > > +
> > > +#define PLDM_MESSAGE_HEADER_IS_REQUEST        1
> > > +#define PLDM_MESSAGE_HEADER_IS_DATAGRAM       1
> > > +#define PLDM_MESSAGE_HEADER_INSTANCE_ID_MASK  0x1f
> > > +
> > > +typedef struct {
> > > +  PLDM_MESSAGE_HEADER    PldmHeader;
> > > +  UINT8                  PldmCompletionCode;   ///< PLDM completion  of
> > response message.
> > > +} PLDM_RESPONSE_HEADER;
> > > +
> > > +#pragma pack()
> > > +
> > > +#define PLDM_HEADER_VERSION  0x00
> > > +
> > > +#define PLDM_COMPLETION_CODE_SUCCESS                     0x00
> > > +#define PLDM_COMPLETION_CODE_ERROR                       0x01
> > > +#define PLDM_COMPLETION_CODE_ERROR_INVALID_DATA          0x02
> > > +#define PLDM_COMPLETION_CODE_ERROR_INVALID_LENGTH        0x03
> > > +#define PLDM_COMPLETION_CODE_ERROR_NOT_READY             0x04
> > > +#define
> > PLDM_COMPLETION_CODE_ERROR_UNSUPPORTED_PLDM_CMD  0x05
> > > +#define PLDM_COMPLETION_CODE_ERROR_INVALID_PLDM_TYPE
> > 0x20
> > > +#define PLDM_COMPLETION_CODE_SPECIFIC_START              0x80
> > > +#define PLDM_COMPLETION_CODE_SPECIFIC_END                0xff
> > > +
> > > +///
> > > +/// Type Code definitions from Platform Level Data Model (PLDM) IDs
> > > +/// and Codes Specification (DMTF DSP0245) ///
> > >
> > +https://www.dmtf.org/sites/default/files/standards/documents/DSP0245_
> > > +1.3.0.pdf
> > > +///
> > > +#define PLDM_TYPE_MESSAGE_CONTROL_AND_DISCOVERY    0x00
> > > +#define PLDM_TYPE_SMBIOS                           0x01
> > > +#define PLDM_TYPE_PLATFORM_MONITORING_AND_CONTROL  0x02
> > > +#define PLDM_TYPE_BIOS_CONTROL_AND_CONFIGURATION   0x03
> > > +
> > > +#define PLDM_TRANSFER_FLAG_START          0x01
> > > +#define PLDM_TRANSFER_FLAG_MIDDLE         0x02
> > > +#define PLDM_TRANSFER_FLAG_END            0x04
> > > +#define PLDM_TRANSFER_FLAG_START_AND_END  0x05
> > > +
> > > +#define PLDM_TRANSFER_OPERATION_FLAG_GET_NEXT_PART   0x00
> > > +#define PLDM_TRANSFER_OPERATION_FLAG_GET_FIRST_PART  0x01
> > #endif //
> > > +PLDM_H_
> > > --
> > > 2.37.1.windows.1
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> >
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [edk2-devel] [PATCH] MdePkg/Include: Add DMTF PLDM Base definitions
  2023-04-19 15:05     ` Michael D Kinney
@ 2023-04-20  3:24       ` Chang, Abner
  2023-04-21  1:43         ` Michael D Kinney
  0 siblings, 1 reply; 6+ messages in thread
From: Chang, Abner @ 2023-04-20  3:24 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io
  Cc: Gao, Liming, Liu, Zhiguang, Nickle Wang, Igor Kulchytskyy,
	Oram, Isaac W, Attar, AbdulLateef (Abdul Lateef)

[AMD Official Use Only - General]

Hi Mike and liming,
Here are two PRs for PLDM related C header files, which are all passed CI. Please help to push it to master branch.

https://github.com/tianocore/edk2/pull/4287
https://github.com/tianocore/edk2/pull/4288

Thanks
Abner

> -----Original Message-----
> From: Kinney, Michael D <michael.d.kinney@intel.com>
> Sent: Wednesday, April 19, 2023 11:05 PM
> To: devel@edk2.groups.io; Chang, Abner <Abner.Chang@amd.com>
> Cc: Gao, Liming <gaoliming@byosoft.com.cn>; Liu, Zhiguang
> <zhiguang.liu@intel.com>; Nickle Wang <nicklew@nvidia.com>; Igor
> Kulchytskyy <igork@ami.com>; Oram, Isaac W <isaac.w.oram@intel.com>;
> Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>; Kinney,
> Michael D <michael.d.kinney@intel.com>
> Subject: RE: [edk2-devel] [PATCH] MdePkg/Include: Add DMTF PLDM Base
> definitions
> 
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
> 
> 
> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
> 
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Chang,
> > Abner via groups.io
> > Sent: Tuesday, April 18, 2023 7:14 PM
> > To: devel@edk2.groups.io; Kinney, Michael D
> > <michael.d.kinney@intel.com>
> > Cc: Gao, Liming <gaoliming@byosoft.com.cn>; Liu, Zhiguang
> > <zhiguang.liu@intel.com>; Nickle Wang <nicklew@nvidia.com>; Igor
> > Kulchytskyy <igork@ami.com>; Oram, Isaac W <isaac.w.oram@intel.com>;
> > Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>
> > Subject: Re: [edk2-devel] [PATCH] MdePkg/Include: Add DMTF PLDM Base
> > definitions
> >
> > [AMD Official Use Only - General]
> >
> > There are couple subordinate specifications base on PLDM base spec.
> > There is possible someone introduces another PLDM C header file that
> includes PLDM base definitions. So PLDM base definitions should be
> separated.
> >
> > Abner
> >
> > > -----Original Message-----
> > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
> > > Michael D Kinney via groups.io
> > > Sent: Wednesday, April 19, 2023 1:50 AM
> > > To: devel@edk2.groups.io; Chang, Abner <Abner.Chang@amd.com>
> > > Cc: Gao, Liming <gaoliming@byosoft.com.cn>; Liu, Zhiguang
> > > <zhiguang.liu@intel.com>; Nickle Wang <nicklew@nvidia.com>; Igor
> > > Kulchytskyy <igork@ami.com>; Oram, Isaac W
> <isaac.w.oram@intel.com>;
> > > Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>;
> > > Kinney, Michael D <michael.d.kinney@intel.com>
> > > Subject: Re: [edk2-devel] [PATCH] MdePkg/Include: Add DMTF PLDM
> Base
> > > definitions
> > >
> > > Caution: This message originated from an External Source. Use proper
> > > caution when opening attachments, clicking links, or responding.
> > >
> > >
> > > I see PldmSmbiosTransfer.h includes this file.  Are there any other
> > > files that will include this file?
> > >
> > > Could this content be folded into PldmSmbiosTransfer.h to reduce
> > > total number of include files?
> > >
> > > Mike
> > >
> > > > -----Original Message-----
> > > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
> > > > Chang, Abner via groups.io
> > > > Sent: Saturday, April 1, 2023 6:52 PM
> > > > To: devel@edk2.groups.io
> > > > Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming
> > > > <gaoliming@byosoft.com.cn>; Liu, Zhiguang
> > > > <zhiguang.liu@intel.com>; Nickle Wang <nicklew@nvidia.com>; Igor
> > > > Kulchytskyy <igork@ami.com>; Oram, Isaac W
> > > > <isaac.w.oram@intel.com>; Abdul Lateef Attar
> > > > <AbdulLateef.Attar@amd.com>
> > > > Subject: [edk2-devel] [PATCH] MdePkg/Include: Add DMTF PLDM Base
> > > > definitions
> > > >
> > > > From: Abner Chang <abner.chang@amd.com>
> > > >
> > > > BZ #4396
> > > > This change adds definitions for DMTF PLDM base specification.
> > > >
> > > > Spec ref:
> > > >
> > >
> https://www.dmtf.org/sites/default/files/standards/documents/DSP0240
> > > _1
> > > > .1.0.pdf
> > > >
> > > > Signed-off-by: Abner Chang <abner.chang@amd.com>
> > > > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > > > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > > > Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> > > > Cc: Nickle Wang <nicklew@nvidia.com>
> > > > Cc: Igor Kulchytskyy <igork@ami.com>
> > > > Cc: Isaac Oram <isaac.w.oram@intel.com>
> > > > Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
> > > > ---
> > > >  MdePkg/Include/IndustryStandard/Pldm.h | 81
> > > > ++++++++++++++++++++++++++
> > > >  1 file changed, 81 insertions(+)
> > > >  create mode 100644 MdePkg/Include/IndustryStandard/Pldm.h
> > > >
> > > > diff --git a/MdePkg/Include/IndustryStandard/Pldm.h
> > > > b/MdePkg/Include/IndustryStandard/Pldm.h
> > > > new file mode 100644
> > > > index 00000000000..82d65b71874
> > > > --- /dev/null
> > > > +++ b/MdePkg/Include/IndustryStandard/Pldm.h
> > > > @@ -0,0 +1,81 @@
> > > > +/**
> > > > +  The definitions of DMTF Platform Level Data Model (PLDM)
> > > > +  Base Specification.
> > > > +
> > > > +  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
> > > > +  SPDX-License-Identifier: BSD-2-Clause-Patent
> > > > +
> > > > +  @par Revision Reference:
> > > > +  DMTF Platform Level Data Model (PLDM) Base Specification
> > > > + Version
> > > > + 1.1.0
> > > > +
> > >
> https://www.dmtf.org/sites/default/files/standards/documents/DSP0240
> > > > + _1.1.0.pdf
> > > > +
> > > > +**/
> > > > +
> > > > +#ifndef PLDM_H_
> > > > +#define PLDM_H_
> > > > +
> > > > +#pragma pack(1)
> > > > +
> > > > +#define PLDM_MESSAGE_HEADER_VERSION  0
> > > > +
> > > > +///
> > > > +/// General definitions from Platform Level Data Model (PLDM)
> > > > +Base /// Specification (DMTF DSP0240) /// typedef struct  {
> > > > +  UINT8    InstanceId    : 5;          ///< Request instance ID.
> > > > +  UINT8    Reserved      : 1;          ///< Reserved bit.
> > > > +  UINT8    DatagramBit   : 1;          ///< used to indicate whether the
> Instance
> > > ID field is
> > > > +                                       ///< being used for
> > > > + tracking and matching requests
> > > and
> > > > +                                       ///< responses, or just being used for
> asynchronous
> > > > +                                       ///< notifications.
> > > > +  UINT8    RequestBit    : 1;          ///< Request bit.
> > > > +  UINT8    PldmType      : 6;          ///< PLDM message type.
> > > > +  UINT8    HeaderVersion : 2;          ///< Header version.
> > > > +  UINT8    PldmTypeCommandCode;        ///< The command code of
> PLDM
> > > message type.
> > > > +} PLDM_MESSAGE_HEADER;
> > > > +
> > > > +typedef PLDM_MESSAGE_HEADER PLDM_REQUEST_HEADER;
> > > > +
> > > > +#define PLDM_MESSAGE_HEADER_IS_REQUEST        1
> > > > +#define PLDM_MESSAGE_HEADER_IS_DATAGRAM       1
> > > > +#define PLDM_MESSAGE_HEADER_INSTANCE_ID_MASK  0x1f
> > > > +
> > > > +typedef struct {
> > > > +  PLDM_MESSAGE_HEADER    PldmHeader;
> > > > +  UINT8                  PldmCompletionCode;   ///< PLDM completion  of
> > > response message.
> > > > +} PLDM_RESPONSE_HEADER;
> > > > +
> > > > +#pragma pack()
> > > > +
> > > > +#define PLDM_HEADER_VERSION  0x00
> > > > +
> > > > +#define PLDM_COMPLETION_CODE_SUCCESS                     0x00
> > > > +#define PLDM_COMPLETION_CODE_ERROR                       0x01
> > > > +#define PLDM_COMPLETION_CODE_ERROR_INVALID_DATA          0x02
> > > > +#define PLDM_COMPLETION_CODE_ERROR_INVALID_LENGTH
> 0x03
> > > > +#define PLDM_COMPLETION_CODE_ERROR_NOT_READY             0x04
> > > > +#define
> > > PLDM_COMPLETION_CODE_ERROR_UNSUPPORTED_PLDM_CMD  0x05
> > > > +#define PLDM_COMPLETION_CODE_ERROR_INVALID_PLDM_TYPE
> > > 0x20
> > > > +#define PLDM_COMPLETION_CODE_SPECIFIC_START              0x80
> > > > +#define PLDM_COMPLETION_CODE_SPECIFIC_END                0xff
> > > > +
> > > > +///
> > > > +/// Type Code definitions from Platform Level Data Model (PLDM)
> > > > +IDs /// and Codes Specification (DMTF DSP0245) ///
> > > >
> > >
> +https://www.dmtf.org/sites/default/files/standards/documents/DSP024
> > > +5_
> > > > +1.3.0.pdf
> > > > +///
> > > > +#define PLDM_TYPE_MESSAGE_CONTROL_AND_DISCOVERY    0x00
> > > > +#define PLDM_TYPE_SMBIOS                           0x01
> > > > +#define PLDM_TYPE_PLATFORM_MONITORING_AND_CONTROL
> 0x02
> > > > +#define PLDM_TYPE_BIOS_CONTROL_AND_CONFIGURATION   0x03
> > > > +
> > > > +#define PLDM_TRANSFER_FLAG_START          0x01
> > > > +#define PLDM_TRANSFER_FLAG_MIDDLE         0x02
> > > > +#define PLDM_TRANSFER_FLAG_END            0x04
> > > > +#define PLDM_TRANSFER_FLAG_START_AND_END  0x05
> > > > +
> > > > +#define PLDM_TRANSFER_OPERATION_FLAG_GET_NEXT_PART   0x00
> > > > +#define PLDM_TRANSFER_OPERATION_FLAG_GET_FIRST_PART  0x01
> > > #endif //
> > > > +PLDM_H_
> > > > --
> > > > 2.37.1.windows.1
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> > 
> >

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [edk2-devel] [PATCH] MdePkg/Include: Add DMTF PLDM Base definitions
  2023-04-20  3:24       ` Chang, Abner
@ 2023-04-21  1:43         ` Michael D Kinney
  0 siblings, 0 replies; 6+ messages in thread
From: Michael D Kinney @ 2023-04-21  1:43 UTC (permalink / raw)
  To: Chang, Abner, devel@edk2.groups.io
  Cc: Gao, Liming, Liu, Zhiguang, Nickle Wang, Igor Kulchytskyy,
	Oram, Isaac W, Attar, AbdulLateef (Abdul Lateef),
	Kinney, Michael D

Merged

Mike


> -----Original Message-----
> From: Chang, Abner <Abner.Chang@amd.com>
> Sent: Wednesday, April 19, 2023 8:25 PM
> To: Kinney, Michael D <michael.d.kinney@intel.com>; devel@edk2.groups.io
> Cc: Gao, Liming <gaoliming@byosoft.com.cn>; Liu, Zhiguang <zhiguang.liu@intel.com>; Nickle Wang <nicklew@nvidia.com>; Igor
> Kulchytskyy <igork@ami.com>; Oram, Isaac W <isaac.w.oram@intel.com>; Attar, AbdulLateef (Abdul Lateef)
> <AbdulLateef.Attar@amd.com>
> Subject: RE: [edk2-devel] [PATCH] MdePkg/Include: Add DMTF PLDM Base definitions
> 
> [AMD Official Use Only - General]
> 
> Hi Mike and liming,
> Here are two PRs for PLDM related C header files, which are all passed CI. Please help to push it to master branch.
> 
> https://github.com/tianocore/edk2/pull/4287
> https://github.com/tianocore/edk2/pull/4288
> 
> Thanks
> Abner
> 
> > -----Original Message-----
> > From: Kinney, Michael D <michael.d.kinney@intel.com>
> > Sent: Wednesday, April 19, 2023 11:05 PM
> > To: devel@edk2.groups.io; Chang, Abner <Abner.Chang@amd.com>
> > Cc: Gao, Liming <gaoliming@byosoft.com.cn>; Liu, Zhiguang
> > <zhiguang.liu@intel.com>; Nickle Wang <nicklew@nvidia.com>; Igor
> > Kulchytskyy <igork@ami.com>; Oram, Isaac W <isaac.w.oram@intel.com>;
> > Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>; Kinney,
> > Michael D <michael.d.kinney@intel.com>
> > Subject: RE: [edk2-devel] [PATCH] MdePkg/Include: Add DMTF PLDM Base
> > definitions
> >
> > Caution: This message originated from an External Source. Use proper
> > caution when opening attachments, clicking links, or responding.
> >
> >
> > Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
> >
> > > -----Original Message-----
> > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Chang,
> > > Abner via groups.io
> > > Sent: Tuesday, April 18, 2023 7:14 PM
> > > To: devel@edk2.groups.io; Kinney, Michael D
> > > <michael.d.kinney@intel.com>
> > > Cc: Gao, Liming <gaoliming@byosoft.com.cn>; Liu, Zhiguang
> > > <zhiguang.liu@intel.com>; Nickle Wang <nicklew@nvidia.com>; Igor
> > > Kulchytskyy <igork@ami.com>; Oram, Isaac W <isaac.w.oram@intel.com>;
> > > Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>
> > > Subject: Re: [edk2-devel] [PATCH] MdePkg/Include: Add DMTF PLDM Base
> > > definitions
> > >
> > > [AMD Official Use Only - General]
> > >
> > > There are couple subordinate specifications base on PLDM base spec.
> > > There is possible someone introduces another PLDM C header file that
> > includes PLDM base definitions. So PLDM base definitions should be
> > separated.
> > >
> > > Abner
> > >
> > > > -----Original Message-----
> > > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
> > > > Michael D Kinney via groups.io
> > > > Sent: Wednesday, April 19, 2023 1:50 AM
> > > > To: devel@edk2.groups.io; Chang, Abner <Abner.Chang@amd.com>
> > > > Cc: Gao, Liming <gaoliming@byosoft.com.cn>; Liu, Zhiguang
> > > > <zhiguang.liu@intel.com>; Nickle Wang <nicklew@nvidia.com>; Igor
> > > > Kulchytskyy <igork@ami.com>; Oram, Isaac W
> > <isaac.w.oram@intel.com>;
> > > > Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.com>;
> > > > Kinney, Michael D <michael.d.kinney@intel.com>
> > > > Subject: Re: [edk2-devel] [PATCH] MdePkg/Include: Add DMTF PLDM
> > Base
> > > > definitions
> > > >
> > > > Caution: This message originated from an External Source. Use proper
> > > > caution when opening attachments, clicking links, or responding.
> > > >
> > > >
> > > > I see PldmSmbiosTransfer.h includes this file.  Are there any other
> > > > files that will include this file?
> > > >
> > > > Could this content be folded into PldmSmbiosTransfer.h to reduce
> > > > total number of include files?
> > > >
> > > > Mike
> > > >
> > > > > -----Original Message-----
> > > > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
> > > > > Chang, Abner via groups.io
> > > > > Sent: Saturday, April 1, 2023 6:52 PM
> > > > > To: devel@edk2.groups.io
> > > > > Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming
> > > > > <gaoliming@byosoft.com.cn>; Liu, Zhiguang
> > > > > <zhiguang.liu@intel.com>; Nickle Wang <nicklew@nvidia.com>; Igor
> > > > > Kulchytskyy <igork@ami.com>; Oram, Isaac W
> > > > > <isaac.w.oram@intel.com>; Abdul Lateef Attar
> > > > > <AbdulLateef.Attar@amd.com>
> > > > > Subject: [edk2-devel] [PATCH] MdePkg/Include: Add DMTF PLDM Base
> > > > > definitions
> > > > >
> > > > > From: Abner Chang <abner.chang@amd.com>
> > > > >
> > > > > BZ #4396
> > > > > This change adds definitions for DMTF PLDM base specification.
> > > > >
> > > > > Spec ref:
> > > > >
> > > >
> > https://www.dmtf.org/sites/default/files/standards/documents/DSP0240
> > > > _1
> > > > > .1.0.pdf
> > > > >
> > > > > Signed-off-by: Abner Chang <abner.chang@amd.com>
> > > > > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > > > > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > > > > Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> > > > > Cc: Nickle Wang <nicklew@nvidia.com>
> > > > > Cc: Igor Kulchytskyy <igork@ami.com>
> > > > > Cc: Isaac Oram <isaac.w.oram@intel.com>
> > > > > Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
> > > > > ---
> > > > >  MdePkg/Include/IndustryStandard/Pldm.h | 81
> > > > > ++++++++++++++++++++++++++
> > > > >  1 file changed, 81 insertions(+)
> > > > >  create mode 100644 MdePkg/Include/IndustryStandard/Pldm.h
> > > > >
> > > > > diff --git a/MdePkg/Include/IndustryStandard/Pldm.h
> > > > > b/MdePkg/Include/IndustryStandard/Pldm.h
> > > > > new file mode 100644
> > > > > index 00000000000..82d65b71874
> > > > > --- /dev/null
> > > > > +++ b/MdePkg/Include/IndustryStandard/Pldm.h
> > > > > @@ -0,0 +1,81 @@
> > > > > +/**
> > > > > +  The definitions of DMTF Platform Level Data Model (PLDM)
> > > > > +  Base Specification.
> > > > > +
> > > > > +  Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
> > > > > +  SPDX-License-Identifier: BSD-2-Clause-Patent
> > > > > +
> > > > > +  @par Revision Reference:
> > > > > +  DMTF Platform Level Data Model (PLDM) Base Specification
> > > > > + Version
> > > > > + 1.1.0
> > > > > +
> > > >
> > https://www.dmtf.org/sites/default/files/standards/documents/DSP0240
> > > > > + _1.1.0.pdf
> > > > > +
> > > > > +**/
> > > > > +
> > > > > +#ifndef PLDM_H_
> > > > > +#define PLDM_H_
> > > > > +
> > > > > +#pragma pack(1)
> > > > > +
> > > > > +#define PLDM_MESSAGE_HEADER_VERSION  0
> > > > > +
> > > > > +///
> > > > > +/// General definitions from Platform Level Data Model (PLDM)
> > > > > +Base /// Specification (DMTF DSP0240) /// typedef struct  {
> > > > > +  UINT8    InstanceId    : 5;          ///< Request instance ID.
> > > > > +  UINT8    Reserved      : 1;          ///< Reserved bit.
> > > > > +  UINT8    DatagramBit   : 1;          ///< used to indicate whether the
> > Instance
> > > > ID field is
> > > > > +                                       ///< being used for
> > > > > + tracking and matching requests
> > > > and
> > > > > +                                       ///< responses, or just being used for
> > asynchronous
> > > > > +                                       ///< notifications.
> > > > > +  UINT8    RequestBit    : 1;          ///< Request bit.
> > > > > +  UINT8    PldmType      : 6;          ///< PLDM message type.
> > > > > +  UINT8    HeaderVersion : 2;          ///< Header version.
> > > > > +  UINT8    PldmTypeCommandCode;        ///< The command code of
> > PLDM
> > > > message type.
> > > > > +} PLDM_MESSAGE_HEADER;
> > > > > +
> > > > > +typedef PLDM_MESSAGE_HEADER PLDM_REQUEST_HEADER;
> > > > > +
> > > > > +#define PLDM_MESSAGE_HEADER_IS_REQUEST        1
> > > > > +#define PLDM_MESSAGE_HEADER_IS_DATAGRAM       1
> > > > > +#define PLDM_MESSAGE_HEADER_INSTANCE_ID_MASK  0x1f
> > > > > +
> > > > > +typedef struct {
> > > > > +  PLDM_MESSAGE_HEADER    PldmHeader;
> > > > > +  UINT8                  PldmCompletionCode;   ///< PLDM completion  of
> > > > response message.
> > > > > +} PLDM_RESPONSE_HEADER;
> > > > > +
> > > > > +#pragma pack()
> > > > > +
> > > > > +#define PLDM_HEADER_VERSION  0x00
> > > > > +
> > > > > +#define PLDM_COMPLETION_CODE_SUCCESS                     0x00
> > > > > +#define PLDM_COMPLETION_CODE_ERROR                       0x01
> > > > > +#define PLDM_COMPLETION_CODE_ERROR_INVALID_DATA          0x02
> > > > > +#define PLDM_COMPLETION_CODE_ERROR_INVALID_LENGTH
> > 0x03
> > > > > +#define PLDM_COMPLETION_CODE_ERROR_NOT_READY             0x04
> > > > > +#define
> > > > PLDM_COMPLETION_CODE_ERROR_UNSUPPORTED_PLDM_CMD  0x05
> > > > > +#define PLDM_COMPLETION_CODE_ERROR_INVALID_PLDM_TYPE
> > > > 0x20
> > > > > +#define PLDM_COMPLETION_CODE_SPECIFIC_START              0x80
> > > > > +#define PLDM_COMPLETION_CODE_SPECIFIC_END                0xff
> > > > > +
> > > > > +///
> > > > > +/// Type Code definitions from Platform Level Data Model (PLDM)
> > > > > +IDs /// and Codes Specification (DMTF DSP0245) ///
> > > > >
> > > >
> > +https://www.dmtf.org/sites/default/files/standards/documents/DSP024
> > > > +5_
> > > > > +1.3.0.pdf
> > > > > +///
> > > > > +#define PLDM_TYPE_MESSAGE_CONTROL_AND_DISCOVERY    0x00
> > > > > +#define PLDM_TYPE_SMBIOS                           0x01
> > > > > +#define PLDM_TYPE_PLATFORM_MONITORING_AND_CONTROL
> > 0x02
> > > > > +#define PLDM_TYPE_BIOS_CONTROL_AND_CONFIGURATION   0x03
> > > > > +
> > > > > +#define PLDM_TRANSFER_FLAG_START          0x01
> > > > > +#define PLDM_TRANSFER_FLAG_MIDDLE         0x02
> > > > > +#define PLDM_TRANSFER_FLAG_END            0x04
> > > > > +#define PLDM_TRANSFER_FLAG_START_AND_END  0x05
> > > > > +
> > > > > +#define PLDM_TRANSFER_OPERATION_FLAG_GET_NEXT_PART   0x00
> > > > > +#define PLDM_TRANSFER_OPERATION_FLAG_GET_FIRST_PART  0x01
> > > > #endif //
> > > > > +PLDM_H_
> > > > > --
> > > > > 2.37.1.windows.1
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > > 
> > >

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-04-21  1:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1751FB35BEA4DD5D.3578@groups.io>
2023-04-18  3:11 ` [edk2-devel] [PATCH] MdePkg/Include: Add DMTF PLDM Base definitions Chang, Abner
2023-04-02  1:51 Chang, Abner
2023-04-18 17:49 ` [edk2-devel] " Michael D Kinney
2023-04-19  2:13   ` Chang, Abner
2023-04-19 15:05     ` Michael D Kinney
2023-04-20  3:24       ` Chang, Abner
2023-04-21  1:43         ` Michael D Kinney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox