From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 8B50BD81092 for ; Mon, 23 Oct 2023 13:05:33 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=6kvrqqgsLB4jobcDx+pP6XeiLgjUDwPbCqkHc2i0sUs=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1698066332; v=1; b=ItVKtzBqN3K3+hcZ+XtZt1UuZ/U3FDsZjTWE0UXXnXbMplDpBaA3DOOJX7G3/y6rz2tmcimY sB2gFy5TAlFCI6sQLQGqlEzk0UDVhBLIZVIQcm9ZDJgw71ZXPlFFgiBopz05D/6Oo7KG18SH/dF nljgwbWZVNkGDkHJlLmJIDoY= X-Received: by 127.0.0.2 with SMTP id mOeaYY7687511xnISPZ3Kv0T; Mon, 23 Oct 2023 06:05:32 -0700 X-Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) by mx.groups.io with SMTP id smtpd.web10.119851.1698066329757117715 for ; Mon, 23 Oct 2023 06:05:30 -0700 X-Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-2c5028e5b88so46303811fa.3 for ; Mon, 23 Oct 2023 06:05:29 -0700 (PDT) X-Gm-Message-State: I7qeisCxBAob7s0qOimQknW3x7686176AA= X-Google-Smtp-Source: AGHT+IGwmOVGomnLEFQcKBwbMC839bbCzcBBv4h66jb9qWF0d37k8sQnxjgcoqM+BCoYFU8EJeTnoQ== X-Received: by 2002:a05:651c:4cc:b0:2c5:191a:47fd with SMTP id e12-20020a05651c04cc00b002c5191a47fdmr8165209lji.1.1698066327660; Mon, 23 Oct 2023 06:05:27 -0700 (PDT) X-Received: from PC10319.67 ([82.97.198.254]) by smtp.googlemail.com with ESMTPSA id r11-20020a2e994b000000b002b9e0d19644sm1550081ljj.106.2023.10.23.06.05.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 06:05:27 -0700 (PDT) From: "Konstantin Aladyshev" To: devel@edk2.groups.io Cc: abner.chang@amd.com, AbdulLateef.Attar@amd.com, nicklew@nvidia.com, Konstantin Aladyshev Subject: [edk2-devel] [PATCH edk2-platforms v3 15/16] PldmSmbiosTransferDxe: Implement Set PLDM terminus ID API Date: Mon, 23 Oct 2023 16:05:10 +0300 Message-Id: <20231023130511.4521-16-aladyshev22@gmail.com> In-Reply-To: <20231023130511.4521-1-aladyshev22@gmail.com> References: <20231023130511.4521-1-aladyshev22@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,aladyshev22@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=ItVKtzBq; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) From: Abner Chang Currently all PLDM functions inside the PLDM_SMBIOS_TRANSFER_PROTOCOL use PLDM terminus PCDs for the MCTP addressing. Add additional function to the protocol API to provide user a way to use custom TIDs. Signed-off-by: Abner Chang Signed-off-by: Konstantin Aladyshev --- .../Protocol/PldmSmbiosTransferProtocol.h | 26 +++++++++++++++++ .../PldmSmbiosTransferDxe.c | 28 +++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/Features/ManageabilityPkg/Include/Protocol/PldmSmbiosTransferP= rotocol.h b/Features/ManageabilityPkg/Include/Protocol/PldmSmbiosTransferPr= otocol.h index 7903e12726..8b23d39682 100644 --- a/Features/ManageabilityPkg/Include/Protocol/PldmSmbiosTransferProtocol= .h +++ b/Features/ManageabilityPkg/Include/Protocol/PldmSmbiosTransferProtocol= .h @@ -23,6 +23,31 @@ typedef struct _EDKII_PLDM_SMBIOS_TRANSFER_PROTOCOL EDK= II_PLDM_SMBIOS_TRANSFER_ #define EDKII_PLDM_SMBIOS_TRANSFER_PROTOCOL_VERSION ((EDKII_PLDM_SM= BIOS_TRANSFER_PROTOCOL_VERSION_MAJOR << 8) |\=0D EDKII_PLDM_SMBIOS_T= RANSFER_PROTOCOL_VERSION_MINOR)=0D =0D +/**=0D + This function sets PLDM SMBIOS transfer source and destination=0D + PLDM terminus ID.=0D +=0D + @param [in] This EDKII_PLDM_SMBIOS_TRANSFER_PROTOCOL instanc= e.=0D + @param [in] SourceId PLDM source teminus ID.=0D + Set to PLDM_TERMINUS_ID_UNASSIGNED means us= e=0D + platform default PLDM terminus ID.=0D + (gManageabilityPkgTokenSpaceGuid.PcdPldmSou= rceTerminusId)=0D + @param [in] DestinationId PLDM destination teminus ID.=0D + Set to PLDM_TERMINUS_ID_UNASSIGNED means us= e=0D + platform default PLDM terminus ID.=0D + (gManageabilityPkgTokenSpaceGuid.PcdPldmDes= tinationEndpointId)=0D +=0D + @retval EFI_SUCCESS Get SMBIOS table metadata Successfu= lly.=0D + @retval EFI_INVALID_PARAMETER Invalid value of source or destinat= ion=0D + PLDM terminus ID.=0D +**/=0D +typedef=0D +EFI_STATUS=0D +(EFIAPI *PLDM_GET_SMBIOS_TRANSFER_TERMINUS_ID)(=0D + IN UINT8 SourceId,=0D + IN UINT8 DestinationId=0D + );=0D +=0D /**=0D This function gets SMBIOS table metadata.=0D =0D @@ -151,6 +176,7 @@ EFI_STATUS // EDKII_PLDM_SMBIOS_TRANSFER_PROTOCOL=0D //=0D typedef struct {=0D + PLDM_GET_SMBIOS_TRANSFER_TERMINUS_ID SetPldmSmbiosTransferTerminu= sId;=0D PLDM_GET_SMBIOS_STRUCTURE_TABLE_METADATA GetSmbiosStructureTableMetaD= ata;=0D PLDM_SET_SMBIOS_STRUCTURE_TABLE_METADATA SetSmbiosStructureTableMetaD= ata;=0D PLDM_GET_SMBIOS_STRUCTURE_TABLE GetSmbiosStructureTable;=0D diff --git a/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/Pldm= SmbiosTransferDxe.c b/Features/ManageabilityPkg/Universal/PldmSmbiosTransfe= rDxe/PldmSmbiosTransferDxe.c index fdf033f0b1..357a7d49e4 100644 --- a/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbiosT= ransferDxe.c +++ b/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbiosT= ransferDxe.c @@ -25,6 +25,33 @@ =0D UINT32 SetSmbiosStructureTableHandle;=0D =0D +/**=0D + This function sets PLDM SMBIOS transfer source and destination=0D + PLDM terminus ID.=0D +=0D + @param [in] This EDKII_PLDM_SMBIOS_TRANSFER_PROTOCOL instanc= e.=0D + @param [in] SourceId PLDM source teminus ID.=0D + Set to PLDM_TERMINUS_ID_UNASSIGNED means us= e=0D + platform default PLDM terminus ID.=0D + (gManageabilityPkgTokenSpaceGuid.PcdPldmSou= rceTerminusId)=0D + @param [in] DestinationId PLDM destination teminus ID.=0D + Set to PLDM_TERMINUS_ID_UNASSIGNED means us= e=0D + platform default PLDM terminus ID.=0D + (gManageabilityPkgTokenSpaceGuid.PcdPldmDes= tinationEndpointId)=0D +=0D + @retval EFI_SUCCESS Get SMBIOS table metadata Successfu= lly.=0D + @retval EFI_INVALID_PARAMETER Invalid value of source or destinat= ion=0D + PLDM terminus ID.=0D +**/=0D +EFI_STATUS=0D +SetPldmSmbiosTransferTerminusId (=0D + IN UINT8 SourceId,=0D + IN UINT8 DestinationId=0D + )=0D +{=0D + return PldmSetTerminus(SourceId, DestinationId);=0D +}=0D +=0D /**=0D Get the full size of SMBIOS structure including optional strings that fo= llow the formatted structure.=0D =0D @@ -457,6 +484,7 @@ GetSmbiosStructureByHandle ( }=0D =0D EDKII_PLDM_SMBIOS_TRANSFER_PROTOCOL_V1_0 mPldmSmbiosTransferProtocolV10 = =3D {=0D + SetPldmSmbiosTransferTerminusId,=0D GetSmbiosStructureTableMetaData,=0D SetSmbiosStructureTableMetaData,=0D GetSmbiosStructureTable,=0D --=20 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109923): https://edk2.groups.io/g/devel/message/109923 Mute This Topic: https://groups.io/mt/102134665/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-