* [PATCH] MdePkg/Include: Add DMTF PLDM SMBIOS definitions
@ 2023-04-02 1:56 Chang, Abner
2023-04-18 17:48 ` [edk2-devel] " Michael D Kinney
0 siblings, 1 reply; 3+ messages in thread
From: Chang, Abner @ 2023-04-02 1:56 UTC (permalink / raw)
To: devel
Cc: Michael D Kinney, Liming Gao, Zhiguang Liu, Nickle Wang,
Igor Kulchytskyy, Isaac Oram, Abdul Lateef Attar
From: Abner Chang <abner.chang@amd.com>
BZ #4396
This change adds definitions for DMTF PLDM
SMBIOS Transfer specification.
Spec ref:
https://www.dmtf.org/sites/default/files/standards/documents/DSP0246_1.0.1.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>
---
.../IndustryStandard/PldmSmbiosTransfer.h | 182 ++++++++++++++++++
1 file changed, 182 insertions(+)
create mode 100644 MdePkg/Include/IndustryStandard/PldmSmbiosTransfer.h
diff --git a/MdePkg/Include/IndustryStandard/PldmSmbiosTransfer.h b/MdePkg/Include/IndustryStandard/PldmSmbiosTransfer.h
new file mode 100644
index 00000000000..2fcbe116abe
--- /dev/null
+++ b/MdePkg/Include/IndustryStandard/PldmSmbiosTransfer.h
@@ -0,0 +1,182 @@
+/**
+ The definitions of DMTF Platform Level Data Model (PLDM)
+ SMBIOS Transfer 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) SMBIOS Transfer Specification
+ Version 1.0.1
+ https://www.dmtf.org/sites/default/files/standards/documents/DSP0246_1.0.1.pdf
+
+**/
+
+#ifndef PLDM_SMBIOS_H_
+#define PLDM_SMBIOS_H_
+
+#include <IndustryStandard/Pldm.h>
+
+#pragma pack(1)
+
+///
+/// Smbios-related definitions from PLDM for SMBIOS Transfer
+/// Specification (DMTF DSP0246)
+///
+#define PLDM_GET_SMBIOS_STRUCTURE_TABLE_METADATA_COMMAND_CODE 0x01
+#define PLDM_SET_SMBIOS_STRUCTURE_TABLE_METADATA_COMMAND_CODE 0x02
+#define PLDM_GET_SMBIOS_STRUCTURE_TABLE_COMMAND_CODE 0x03
+#define PLDM_SET_SMBIOS_STRUCTURE_TABLE_COMMAND_CODE 0x04
+#define PLDM_GET_SMBIOS_STRUCTURE_BY_TYPE_COMMAND_CODE 0x05
+#define PLDM_GET_SMBIOS_STRUCTURE_BY_HANDLE_COMMAND_CODE 0x06
+
+///
+/// PLDM SMBIOS transfer command specific completion code.
+///
+#define PLDM_COMPLETION_CODE_INVALID_DATA_TRANSFER_HANDLE 0x80
+#define PLDM_COMPLETION_CODE_INVALID_TRANSFER_OPERATION_FLAG 0x81
+#define PLDM_COMPLETION_CODE_INVALID_TRANSFER_FLAG 0x82
+#define PLDM_COMPLETION_CODE_NO_SMBIOS_STRUCTURE_TABLE_METADATA 0x83
+#define PLDM_COMPLETION_CODE_INVALID_DATA_INTEGRITY_CHECK 0x84
+#define PLDM_COMPLETION_CODE_SMBIOS_STRUCTURE_TABLE_UNAVAILABLE 0x85
+
+///
+/// Get SMBIOS Structure Table Metadata Response.
+///
+typedef struct {
+ UINT8 SmbiosMajorVersion;
+ UINT8 SmbiosMinorVersion;
+ UINT16 MaximumStructureSize;
+ UINT16 SmbiosStructureTableLength;
+ UINT16 NumberOfSmbiosStructures;
+ UINT32 SmbiosStructureTableIntegrityChecksum;
+} PLDM_SMBIOS_STRUCTURE_TABLE_METADATA;
+
+typedef struct {
+ PLDM_RESPONSE_HEADER ResponseHeader;
+ PLDM_SMBIOS_STRUCTURE_TABLE_METADATA SmbiosStructureTableMetadata;
+} PLDM_GET_SMBIOS_STRUCTURE_TABLE_METADATA_RESPONSE_FORMAT;
+
+///
+/// Set SMBIOS Structure Table Metadata Request.
+///
+typedef struct {
+ PLDM_REQUEST_HEADER RequestHeader;
+ PLDM_SMBIOS_STRUCTURE_TABLE_METADATA SmbiosStructureTableMetadata;
+} PLDM_SET_SMBIOS_STRUCTURE_TABLE_METADATA_REQUEST_FORMAT;
+
+///
+/// Set SMBIOS Structure Table Metadata Response.
+///
+typedef struct {
+ PLDM_RESPONSE_HEADER ResponseHeader;
+} PLDM_SET_SMBIOS_STRUCTURE_TABLE_METADATA_RESPONSE_FORMAT;
+
+///
+/// Get SMBIOS Structure Table Request.
+///
+typedef struct {
+ UINT32 DataTransferHandle;
+ UINT8 TransferOperationFlag;
+} PLDM_GET_SMBIOS_STRUCTURE_TABLE_REQUEST;
+
+typedef struct {
+ PLDM_REQUEST_HEADER RequestHeader;
+ PLDM_GET_SMBIOS_STRUCTURE_TABLE_REQUEST GetSmbiosStructureTableRequest;
+} PLDM_GET_SMBIOS_STRUCTURE_TABLE_REQUEST_FORMAT;
+
+///
+/// Get SMBIOS Structure Table Response.
+///
+typedef struct {
+ UINT32 NextDataTransferHandle;
+ UINT8 TransferFlag;
+ UINT8 Table[0];
+} PLDM_GET_SMBIOS_STRUCTURE_TABLE_RESPONSE;
+
+typedef struct {
+ PLDM_RESPONSE_HEADER ResponseHeader;
+ PLDM_GET_SMBIOS_STRUCTURE_TABLE_RESPONSE GetSmbiosStructureTableResponse;
+} PLDM_GET_SMBIOS_STRUCTURE_TABLE_RESPONSE_FORMAT;
+
+///
+/// Set SMBIOS Structure Table Request.
+///
+typedef struct {
+ UINT32 DataTransferHandle;
+ UINT8 TransferFlag;
+ UINT8 Table[0];
+} PLDM_SET_SMBIOS_STRUCTURE_TABLE_REQUEST;
+
+typedef struct {
+ PLDM_REQUEST_HEADER RequestHeader;
+ PLDM_SET_SMBIOS_STRUCTURE_TABLE_REQUEST SetSmbiosStructureTableRequest;
+} PLDM_SET_SMBIOS_STRUCTURE_TABLE_REQUEST_FORMAT;
+
+///
+/// Set SMBIOS Structure Table Response.
+///
+typedef struct {
+ PLDM_RESPONSE_HEADER ResponseHeader;
+ UINT32 NextDataTransferHandle;
+} PLDM_SET_SMBIOS_STRUCTURE_TABLE_RESPONSE_FORMAT;
+
+///
+/// Get SMBIOS Structure by Type Request.
+///
+typedef struct {
+ UINT32 DataTransferHandle;
+ UINT8 TransferOperationFlag;
+ UINT8 Type;
+ UINT16 StructureInstanceId;
+} PLDM_GET_SMBIOS_STRUCTURE_BY_TYPE_REQUEST;
+
+typedef struct {
+ PLDM_REQUEST_HEADER RequestHeader;
+ PLDM_GET_SMBIOS_STRUCTURE_BY_TYPE_REQUEST GetSmbiosStructureByTypeRequest;
+} PLDM_GET_SMBIOS_STRUCTURE_BY_TYPE_REQUEST_FORMAT;
+
+///
+/// Get SMBIOS Structure by Type Response.
+///
+typedef struct {
+ UINT32 NextDataTransferHandle;
+ UINT8 TransferFlag;
+ UINT8 Table[0];
+} PLDM_GET_SMBIOS_STRUCTURE_BY_TYPE_RESPONSE;
+
+typedef struct {
+ PLDM_RESPONSE_HEADER ResponseHeader;
+ PLDM_GET_SMBIOS_STRUCTURE_BY_TYPE_RESPONSE GetSmbiosStructureByTypeResponse;
+} PLDM_GET_SMBIOS_STRUCTURE_BY_TYPE_RESPONSE_FORMAT;
+
+///
+/// Get SMBIOS Structure by Handle Request.
+///
+typedef struct {
+ UINT32 DataTransferHandle;
+ UINT8 TransferOperationFlag;
+ UINT16 Handle;
+} PLDM_GET_SMBIOS_STRUCTURE_BY_HANDLE_REQUEST;
+
+typedef struct {
+ PLDM_REQUEST_HEADER RequestHeader;
+ PLDM_GET_SMBIOS_STRUCTURE_BY_HANDLE_REQUEST GetSmbiosStructureByHandleRequest;
+} PLDM_GET_SMBIOS_STRUCTURE_BY_HANDLE_REQUEST_FORMAT;
+
+///
+/// Get SMBIOS Structure by Handle Response.
+///
+typedef struct {
+ UINT32 NextDataTransferHandle;
+ UINT8 TransferFlag;
+ UINT8 Table[0];
+} PLDM_GET_SMBIOS_STRUCTURE_BY_HANDLE_RESPONSE;
+
+typedef struct {
+ PLDM_RESPONSE_HEADER ResponseHeader;
+ PLDM_GET_SMBIOS_STRUCTURE_BY_HANDLE_RESPONSE GetSmbiosStructureByTypeResponse;
+} PLDM_GET_SMBIOS_STRUCTURE_BY_HANDLE_RESPONSE_FORMAT;
+#pragma pack()
+
+#endif // PLDM_SMBIOS_H_
--
2.37.1.windows.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [edk2-devel] [PATCH] MdePkg/Include: Add DMTF PLDM SMBIOS definitions
2023-04-02 1:56 [PATCH] MdePkg/Include: Add DMTF PLDM SMBIOS definitions Chang, Abner
@ 2023-04-18 17:48 ` Michael D Kinney
2023-04-19 2:15 ` Chang, Abner
0 siblings, 1 reply; 3+ messages in thread
From: Michael D Kinney @ 2023-04-18 17:48 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
> -----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:57 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 SMBIOS definitions
>
> From: Abner Chang <abner.chang@amd.com>
>
> BZ #4396
> This change adds definitions for DMTF PLDM
> SMBIOS Transfer specification.
>
> Spec ref:
> https://www.dmtf.org/sites/default/files/standards/documents/DSP0246_1.0.1.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>
> ---
> .../IndustryStandard/PldmSmbiosTransfer.h | 182 ++++++++++++++++++
> 1 file changed, 182 insertions(+)
> create mode 100644 MdePkg/Include/IndustryStandard/PldmSmbiosTransfer.h
>
> diff --git a/MdePkg/Include/IndustryStandard/PldmSmbiosTransfer.h
> b/MdePkg/Include/IndustryStandard/PldmSmbiosTransfer.h
> new file mode 100644
> index 00000000000..2fcbe116abe
> --- /dev/null
> +++ b/MdePkg/Include/IndustryStandard/PldmSmbiosTransfer.h
> @@ -0,0 +1,182 @@
> +/**
> + The definitions of DMTF Platform Level Data Model (PLDM)
> + SMBIOS Transfer 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) SMBIOS Transfer Specification
> + Version 1.0.1
> + https://www.dmtf.org/sites/default/files/standards/documents/DSP0246_1.0.1.pdf
> +
> +**/
> +
> +#ifndef PLDM_SMBIOS_H_
> +#define PLDM_SMBIOS_H_
The name of the file is PldmSmbiosTransfer.h. Shouldn’t the include guard define name be PLDM_SMBIOS_TRANSFER_H_
> +
> +#include <IndustryStandard/Pldm.h>
> +
> +#pragma pack(1)
> +
> +///
> +/// Smbios-related definitions from PLDM for SMBIOS Transfer
> +/// Specification (DMTF DSP0246)
> +///
> +#define PLDM_GET_SMBIOS_STRUCTURE_TABLE_METADATA_COMMAND_CODE 0x01
> +#define PLDM_SET_SMBIOS_STRUCTURE_TABLE_METADATA_COMMAND_CODE 0x02
> +#define PLDM_GET_SMBIOS_STRUCTURE_TABLE_COMMAND_CODE 0x03
> +#define PLDM_SET_SMBIOS_STRUCTURE_TABLE_COMMAND_CODE 0x04
> +#define PLDM_GET_SMBIOS_STRUCTURE_BY_TYPE_COMMAND_CODE 0x05
> +#define PLDM_GET_SMBIOS_STRUCTURE_BY_HANDLE_COMMAND_CODE 0x06
> +
> +///
> +/// PLDM SMBIOS transfer command specific completion code.
> +///
> +#define PLDM_COMPLETION_CODE_INVALID_DATA_TRANSFER_HANDLE 0x80
> +#define PLDM_COMPLETION_CODE_INVALID_TRANSFER_OPERATION_FLAG 0x81
> +#define PLDM_COMPLETION_CODE_INVALID_TRANSFER_FLAG 0x82
> +#define PLDM_COMPLETION_CODE_NO_SMBIOS_STRUCTURE_TABLE_METADATA 0x83
> +#define PLDM_COMPLETION_CODE_INVALID_DATA_INTEGRITY_CHECK 0x84
> +#define PLDM_COMPLETION_CODE_SMBIOS_STRUCTURE_TABLE_UNAVAILABLE 0x85
> +
> +///
> +/// Get SMBIOS Structure Table Metadata Response.
> +///
> +typedef struct {
> + UINT8 SmbiosMajorVersion;
> + UINT8 SmbiosMinorVersion;
> + UINT16 MaximumStructureSize;
> + UINT16 SmbiosStructureTableLength;
> + UINT16 NumberOfSmbiosStructures;
> + UINT32 SmbiosStructureTableIntegrityChecksum;
> +} PLDM_SMBIOS_STRUCTURE_TABLE_METADATA;
> +
> +typedef struct {
> + PLDM_RESPONSE_HEADER ResponseHeader;
> + PLDM_SMBIOS_STRUCTURE_TABLE_METADATA SmbiosStructureTableMetadata;
> +} PLDM_GET_SMBIOS_STRUCTURE_TABLE_METADATA_RESPONSE_FORMAT;
> +
> +///
> +/// Set SMBIOS Structure Table Metadata Request.
> +///
> +typedef struct {
> + PLDM_REQUEST_HEADER RequestHeader;
> + PLDM_SMBIOS_STRUCTURE_TABLE_METADATA SmbiosStructureTableMetadata;
> +} PLDM_SET_SMBIOS_STRUCTURE_TABLE_METADATA_REQUEST_FORMAT;
> +
> +///
> +/// Set SMBIOS Structure Table Metadata Response.
> +///
> +typedef struct {
> + PLDM_RESPONSE_HEADER ResponseHeader;
> +} PLDM_SET_SMBIOS_STRUCTURE_TABLE_METADATA_RESPONSE_FORMAT;
> +
> +///
> +/// Get SMBIOS Structure Table Request.
> +///
> +typedef struct {
> + UINT32 DataTransferHandle;
> + UINT8 TransferOperationFlag;
> +} PLDM_GET_SMBIOS_STRUCTURE_TABLE_REQUEST;
> +
> +typedef struct {
> + PLDM_REQUEST_HEADER RequestHeader;
> + PLDM_GET_SMBIOS_STRUCTURE_TABLE_REQUEST GetSmbiosStructureTableRequest;
> +} PLDM_GET_SMBIOS_STRUCTURE_TABLE_REQUEST_FORMAT;
> +
> +///
> +/// Get SMBIOS Structure Table Response.
> +///
> +typedef struct {
> + UINT32 NextDataTransferHandle;
> + UINT8 TransferFlag;
> + UINT8 Table[0];
> +} PLDM_GET_SMBIOS_STRUCTURE_TABLE_RESPONSE;
> +
> +typedef struct {
> + PLDM_RESPONSE_HEADER ResponseHeader;
> + PLDM_GET_SMBIOS_STRUCTURE_TABLE_RESPONSE GetSmbiosStructureTableResponse;
> +} PLDM_GET_SMBIOS_STRUCTURE_TABLE_RESPONSE_FORMAT;
> +
> +///
> +/// Set SMBIOS Structure Table Request.
> +///
> +typedef struct {
> + UINT32 DataTransferHandle;
> + UINT8 TransferFlag;
> + UINT8 Table[0];
> +} PLDM_SET_SMBIOS_STRUCTURE_TABLE_REQUEST;
> +
> +typedef struct {
> + PLDM_REQUEST_HEADER RequestHeader;
> + PLDM_SET_SMBIOS_STRUCTURE_TABLE_REQUEST SetSmbiosStructureTableRequest;
> +} PLDM_SET_SMBIOS_STRUCTURE_TABLE_REQUEST_FORMAT;
> +
> +///
> +/// Set SMBIOS Structure Table Response.
> +///
> +typedef struct {
> + PLDM_RESPONSE_HEADER ResponseHeader;
> + UINT32 NextDataTransferHandle;
> +} PLDM_SET_SMBIOS_STRUCTURE_TABLE_RESPONSE_FORMAT;
> +
> +///
> +/// Get SMBIOS Structure by Type Request.
> +///
> +typedef struct {
> + UINT32 DataTransferHandle;
> + UINT8 TransferOperationFlag;
> + UINT8 Type;
> + UINT16 StructureInstanceId;
> +} PLDM_GET_SMBIOS_STRUCTURE_BY_TYPE_REQUEST;
> +
> +typedef struct {
> + PLDM_REQUEST_HEADER RequestHeader;
> + PLDM_GET_SMBIOS_STRUCTURE_BY_TYPE_REQUEST GetSmbiosStructureByTypeRequest;
> +} PLDM_GET_SMBIOS_STRUCTURE_BY_TYPE_REQUEST_FORMAT;
> +
> +///
> +/// Get SMBIOS Structure by Type Response.
> +///
> +typedef struct {
> + UINT32 NextDataTransferHandle;
> + UINT8 TransferFlag;
> + UINT8 Table[0];
> +} PLDM_GET_SMBIOS_STRUCTURE_BY_TYPE_RESPONSE;
> +
> +typedef struct {
> + PLDM_RESPONSE_HEADER ResponseHeader;
> + PLDM_GET_SMBIOS_STRUCTURE_BY_TYPE_RESPONSE GetSmbiosStructureByTypeResponse;
> +} PLDM_GET_SMBIOS_STRUCTURE_BY_TYPE_RESPONSE_FORMAT;
> +
> +///
> +/// Get SMBIOS Structure by Handle Request.
> +///
> +typedef struct {
> + UINT32 DataTransferHandle;
> + UINT8 TransferOperationFlag;
> + UINT16 Handle;
> +} PLDM_GET_SMBIOS_STRUCTURE_BY_HANDLE_REQUEST;
> +
> +typedef struct {
> + PLDM_REQUEST_HEADER RequestHeader;
> + PLDM_GET_SMBIOS_STRUCTURE_BY_HANDLE_REQUEST GetSmbiosStructureByHandleRequest;
> +} PLDM_GET_SMBIOS_STRUCTURE_BY_HANDLE_REQUEST_FORMAT;
> +
> +///
> +/// Get SMBIOS Structure by Handle Response.
> +///
> +typedef struct {
> + UINT32 NextDataTransferHandle;
> + UINT8 TransferFlag;
> + UINT8 Table[0];
> +} PLDM_GET_SMBIOS_STRUCTURE_BY_HANDLE_RESPONSE;
> +
> +typedef struct {
> + PLDM_RESPONSE_HEADER ResponseHeader;
> + PLDM_GET_SMBIOS_STRUCTURE_BY_HANDLE_RESPONSE GetSmbiosStructureByTypeResponse;
> +} PLDM_GET_SMBIOS_STRUCTURE_BY_HANDLE_RESPONSE_FORMAT;
> +#pragma pack()
> +
> +#endif // PLDM_SMBIOS_H_
See above
> --
> 2.37.1.windows.1
>
>
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [edk2-devel] [PATCH] MdePkg/Include: Add DMTF PLDM SMBIOS definitions
2023-04-18 17:48 ` [edk2-devel] " Michael D Kinney
@ 2023-04-19 2:15 ` Chang, Abner
0 siblings, 0 replies; 3+ messages in thread
From: Chang, Abner @ 2023-04-19 2:15 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]
> -----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:48 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
> SMBIOS definitions
>
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
>
>
> > -----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:57 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 SMBIOS
> > definitions
> >
> > From: Abner Chang <abner.chang@amd.com>
> >
> > BZ #4396
> > This change adds definitions for DMTF PLDM SMBIOS Transfer
> > specification.
> >
> > Spec ref:
> >
> https://www.dmtf.org/sites/default/files/standards/documents/DSP0246_1
> > .0.1.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>
> > ---
> > .../IndustryStandard/PldmSmbiosTransfer.h | 182
> ++++++++++++++++++
> > 1 file changed, 182 insertions(+)
> > create mode 100644
> > MdePkg/Include/IndustryStandard/PldmSmbiosTransfer.h
> >
> > diff --git a/MdePkg/Include/IndustryStandard/PldmSmbiosTransfer.h
> > b/MdePkg/Include/IndustryStandard/PldmSmbiosTransfer.h
> > new file mode 100644
> > index 00000000000..2fcbe116abe
> > --- /dev/null
> > +++ b/MdePkg/Include/IndustryStandard/PldmSmbiosTransfer.h
> > @@ -0,0 +1,182 @@
> > +/**
> > + The definitions of DMTF Platform Level Data Model (PLDM)
> > + SMBIOS Transfer 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) SMBIOS Transfer Specification
> > + Version 1.0.1
> > +
> https://www.dmtf.org/sites/default/files/standards/documents/DSP0246
> > + _1.0.1.pdf
> > +
> > +**/
> > +
> > +#ifndef PLDM_SMBIOS_H_
> > +#define PLDM_SMBIOS_H_
>
> The name of the file is PldmSmbiosTransfer.h. Shouldn’t the include guard
> define name be PLDM_SMBIOS_TRANSFER_H_
Sure, this should be PLDM_SMBIOS_TRANSFER_H_
Thanks
Abner
>
> > +
> > +#include <IndustryStandard/Pldm.h>
> > +
> > +#pragma pack(1)
> > +
> > +///
> > +/// Smbios-related definitions from PLDM for SMBIOS Transfer ///
> > +Specification (DMTF DSP0246) /// #define
> > +PLDM_GET_SMBIOS_STRUCTURE_TABLE_METADATA_COMMAND_CODE
> 0x01 #define
> > +PLDM_SET_SMBIOS_STRUCTURE_TABLE_METADATA_COMMAND_CODE
> 0x02
> > +#define PLDM_GET_SMBIOS_STRUCTURE_TABLE_COMMAND_CODE
> 0x03
> > +#define PLDM_SET_SMBIOS_STRUCTURE_TABLE_COMMAND_CODE
> 0x04
> > +#define PLDM_GET_SMBIOS_STRUCTURE_BY_TYPE_COMMAND_CODE
> 0x05
> > +#define
> PLDM_GET_SMBIOS_STRUCTURE_BY_HANDLE_COMMAND_CODE 0x06
> > +
> > +///
> > +/// PLDM SMBIOS transfer command specific completion code.
> > +///
> > +#define PLDM_COMPLETION_CODE_INVALID_DATA_TRANSFER_HANDLE
> 0x80
> > +#define
> PLDM_COMPLETION_CODE_INVALID_TRANSFER_OPERATION_FLAG 0x81
> > +#define PLDM_COMPLETION_CODE_INVALID_TRANSFER_FLAG
> 0x82
> > +#define
> PLDM_COMPLETION_CODE_NO_SMBIOS_STRUCTURE_TABLE_METADATA
> 0x83
> > +#define PLDM_COMPLETION_CODE_INVALID_DATA_INTEGRITY_CHECK
> 0x84
> > +#define
> PLDM_COMPLETION_CODE_SMBIOS_STRUCTURE_TABLE_UNAVAILABLE
> 0x85
> > +
> > +///
> > +/// Get SMBIOS Structure Table Metadata Response.
> > +///
> > +typedef struct {
> > + UINT8 SmbiosMajorVersion;
> > + UINT8 SmbiosMinorVersion;
> > + UINT16 MaximumStructureSize;
> > + UINT16 SmbiosStructureTableLength;
> > + UINT16 NumberOfSmbiosStructures;
> > + UINT32 SmbiosStructureTableIntegrityChecksum;
> > +} PLDM_SMBIOS_STRUCTURE_TABLE_METADATA;
> > +
> > +typedef struct {
> > + PLDM_RESPONSE_HEADER ResponseHeader;
> > + PLDM_SMBIOS_STRUCTURE_TABLE_METADATA
> SmbiosStructureTableMetadata;
> > +}
> PLDM_GET_SMBIOS_STRUCTURE_TABLE_METADATA_RESPONSE_FORMAT;
> > +
> > +///
> > +/// Set SMBIOS Structure Table Metadata Request.
> > +///
> > +typedef struct {
> > + PLDM_REQUEST_HEADER RequestHeader;
> > + PLDM_SMBIOS_STRUCTURE_TABLE_METADATA
> SmbiosStructureTableMetadata;
> > +}
> PLDM_SET_SMBIOS_STRUCTURE_TABLE_METADATA_REQUEST_FORMAT;
> > +
> > +///
> > +/// Set SMBIOS Structure Table Metadata Response.
> > +///
> > +typedef struct {
> > + PLDM_RESPONSE_HEADER ResponseHeader;
> > +}
> PLDM_SET_SMBIOS_STRUCTURE_TABLE_METADATA_RESPONSE_FORMAT;
> > +
> > +///
> > +/// Get SMBIOS Structure Table Request.
> > +///
> > +typedef struct {
> > + UINT32 DataTransferHandle;
> > + UINT8 TransferOperationFlag;
> > +} PLDM_GET_SMBIOS_STRUCTURE_TABLE_REQUEST;
> > +
> > +typedef struct {
> > + PLDM_REQUEST_HEADER RequestHeader;
> > + PLDM_GET_SMBIOS_STRUCTURE_TABLE_REQUEST
> GetSmbiosStructureTableRequest;
> > +} PLDM_GET_SMBIOS_STRUCTURE_TABLE_REQUEST_FORMAT;
> > +
> > +///
> > +/// Get SMBIOS Structure Table Response.
> > +///
> > +typedef struct {
> > + UINT32 NextDataTransferHandle;
> > + UINT8 TransferFlag;
> > + UINT8 Table[0];
> > +} PLDM_GET_SMBIOS_STRUCTURE_TABLE_RESPONSE;
> > +
> > +typedef struct {
> > + PLDM_RESPONSE_HEADER ResponseHeader;
> > + PLDM_GET_SMBIOS_STRUCTURE_TABLE_RESPONSE
> GetSmbiosStructureTableResponse;
> > +} PLDM_GET_SMBIOS_STRUCTURE_TABLE_RESPONSE_FORMAT;
> > +
> > +///
> > +/// Set SMBIOS Structure Table Request.
> > +///
> > +typedef struct {
> > + UINT32 DataTransferHandle;
> > + UINT8 TransferFlag;
> > + UINT8 Table[0];
> > +} PLDM_SET_SMBIOS_STRUCTURE_TABLE_REQUEST;
> > +
> > +typedef struct {
> > + PLDM_REQUEST_HEADER RequestHeader;
> > + PLDM_SET_SMBIOS_STRUCTURE_TABLE_REQUEST
> SetSmbiosStructureTableRequest;
> > +} PLDM_SET_SMBIOS_STRUCTURE_TABLE_REQUEST_FORMAT;
> > +
> > +///
> > +/// Set SMBIOS Structure Table Response.
> > +///
> > +typedef struct {
> > + PLDM_RESPONSE_HEADER ResponseHeader;
> > + UINT32 NextDataTransferHandle;
> > +} PLDM_SET_SMBIOS_STRUCTURE_TABLE_RESPONSE_FORMAT;
> > +
> > +///
> > +/// Get SMBIOS Structure by Type Request.
> > +///
> > +typedef struct {
> > + UINT32 DataTransferHandle;
> > + UINT8 TransferOperationFlag;
> > + UINT8 Type;
> > + UINT16 StructureInstanceId;
> > +} PLDM_GET_SMBIOS_STRUCTURE_BY_TYPE_REQUEST;
> > +
> > +typedef struct {
> > + PLDM_REQUEST_HEADER RequestHeader;
> > + PLDM_GET_SMBIOS_STRUCTURE_BY_TYPE_REQUEST
> GetSmbiosStructureByTypeRequest;
> > +} PLDM_GET_SMBIOS_STRUCTURE_BY_TYPE_REQUEST_FORMAT;
> > +
> > +///
> > +/// Get SMBIOS Structure by Type Response.
> > +///
> > +typedef struct {
> > + UINT32 NextDataTransferHandle;
> > + UINT8 TransferFlag;
> > + UINT8 Table[0];
> > +} PLDM_GET_SMBIOS_STRUCTURE_BY_TYPE_RESPONSE;
> > +
> > +typedef struct {
> > + PLDM_RESPONSE_HEADER ResponseHeader;
> > + PLDM_GET_SMBIOS_STRUCTURE_BY_TYPE_RESPONSE
> GetSmbiosStructureByTypeResponse;
> > +} PLDM_GET_SMBIOS_STRUCTURE_BY_TYPE_RESPONSE_FORMAT;
> > +
> > +///
> > +/// Get SMBIOS Structure by Handle Request.
> > +///
> > +typedef struct {
> > + UINT32 DataTransferHandle;
> > + UINT8 TransferOperationFlag;
> > + UINT16 Handle;
> > +} PLDM_GET_SMBIOS_STRUCTURE_BY_HANDLE_REQUEST;
> > +
> > +typedef struct {
> > + PLDM_REQUEST_HEADER RequestHeader;
> > + PLDM_GET_SMBIOS_STRUCTURE_BY_HANDLE_REQUEST
> GetSmbiosStructureByHandleRequest;
> > +} PLDM_GET_SMBIOS_STRUCTURE_BY_HANDLE_REQUEST_FORMAT;
> > +
> > +///
> > +/// Get SMBIOS Structure by Handle Response.
> > +///
> > +typedef struct {
> > + UINT32 NextDataTransferHandle;
> > + UINT8 TransferFlag;
> > + UINT8 Table[0];
> > +} PLDM_GET_SMBIOS_STRUCTURE_BY_HANDLE_RESPONSE;
> > +
> > +typedef struct {
> > + PLDM_RESPONSE_HEADER ResponseHeader;
> > + PLDM_GET_SMBIOS_STRUCTURE_BY_HANDLE_RESPONSE
> GetSmbiosStructureByTypeResponse;
> > +} PLDM_GET_SMBIOS_STRUCTURE_BY_HANDLE_RESPONSE_FORMAT;
> > +#pragma pack()
> > +
> > +#endif // PLDM_SMBIOS_H_
>
> See above
>
> > --
> > 2.37.1.windows.1
> >
> >
> >
> >
> >
>
>
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-04-19 2:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-02 1:56 [PATCH] MdePkg/Include: Add DMTF PLDM SMBIOS definitions Chang, Abner
2023-04-18 17:48 ` [edk2-devel] " Michael D Kinney
2023-04-19 2:15 ` Chang, Abner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox