* [PATCH V2] MdePkg/Include: Add DMTF PLDM SMBIOS definitions
@ 2023-04-19 5:03 Chang, Abner
2023-04-19 5:57 ` 回复: [edk2-devel] " gaoliming
0 siblings, 1 reply; 3+ messages in thread
From: Chang, Abner @ 2023-04-19 5:03 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..e31bf30cfa8
--- /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_TRANSFER_H_
+#define 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_TRANSFER_H_
--
2.37.1.windows.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* 回复: [edk2-devel] [PATCH V2] MdePkg/Include: Add DMTF PLDM SMBIOS definitions
2023-04-19 5:03 [PATCH V2] MdePkg/Include: Add DMTF PLDM SMBIOS definitions Chang, Abner
@ 2023-04-19 5:57 ` gaoliming
2023-04-19 15:04 ` Michael D Kinney
0 siblings, 1 reply; 3+ messages in thread
From: gaoliming @ 2023-04-19 5:57 UTC (permalink / raw)
To: devel, abner.chang
Cc: 'Michael D Kinney', 'Zhiguang Liu',
'Nickle Wang', 'Igor Kulchytskyy',
'Isaac Oram', 'Abdul Lateef Attar'
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
> -----邮件原件-----
> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Chang, Abner
> via groups.io
> 发送时间: 2023年4月19日 13:03
> 收件人: devel@edk2.groups.io
> 抄送: 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>; Abdul Lateef Attar
> <AbdulLateef.Attar@amd.com>
> 主题: [edk2-devel] [PATCH V2] 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..e31bf30cfa8
> --- /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_TRANSFER_H_
> +#define 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_TRANSFER_H_
> --
> 2.37.1.windows.1
>
>
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [edk2-devel] [PATCH V2] MdePkg/Include: Add DMTF PLDM SMBIOS definitions
2023-04-19 5:57 ` 回复: [edk2-devel] " gaoliming
@ 2023-04-19 15:04 ` Michael D Kinney
0 siblings, 0 replies; 3+ messages in thread
From: Michael D Kinney @ 2023-04-19 15:04 UTC (permalink / raw)
To: devel@edk2.groups.io, Gao, Liming, abner.chang@amd.com
Cc: Liu, Zhiguang, 'Nickle Wang', 'Igor Kulchytskyy',
Oram, Isaac W, 'Abdul Lateef Attar', 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 gaoliming via groups.io
> Sent: Tuesday, April 18, 2023 10:58 PM
> To: devel@edk2.groups.io; abner.chang@amd.com
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; 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 V2] MdePkg/Include: Add DMTF PLDM SMBIOS definitions
>
> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
>
> > -----邮件原件-----
> > 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Chang, Abner
> > via groups.io
> > 发送时间: 2023年4月19日 13:03
> > 收件人: devel@edk2.groups.io
> > 抄送: 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>; Abdul Lateef Attar
> > <AbdulLateef.Attar@amd.com>
> > 主题: [edk2-devel] [PATCH V2] 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..e31bf30cfa8
> > --- /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_TRANSFER_H_
> > +#define 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_TRANSFER_H_
> > --
> > 2.37.1.windows.1
> >
> >
> >
> >
> >
>
>
>
>
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-04-19 15:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-19 5:03 [PATCH V2] MdePkg/Include: Add DMTF PLDM SMBIOS definitions Chang, Abner
2023-04-19 5:57 ` 回复: [edk2-devel] " gaoliming
2023-04-19 15:04 ` 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