From nobody Mon Feb 9 13:39:17 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+109920+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+109920+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1698066329; cv=none; d=zohomail.com; s=zohoarc; b=CqafiUNa4a6w7Y6OP7znBQRnNhq7YfpKSJ8EPYIAXvkBqS5kvglrT4AkEkc881vp2HRXowJgltTmshZ+P3Dx3YBtpV8MfWfgzQzf5VEDd62r1WnWd2ddmvp2lDjDFdppMIRQ6eO37uixRDuGKnjsqb8CdRpL/v9qkWJ/aUs3XM8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1698066329; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=rm0BbwcA/8gbXcHbZ6OW0MFJNll3/moVZXgNAPlgBHg=; b=SnOTNt7fJTLrEDkYcUKh7bxS6dRDL7On03oTwRgrHsfBTiJJfVqv9IMpMACL4SoqapsGLfB9uo77uSDpipFnqjEKrjMvUw6F2s26Oexqw8+IPUSnseUshuXA3B7HgY2y1Z4cV4kGF1gdBqxTiJEnUHCeacynZFGoMX8sjFiIcG4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+109920+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1698066329097874.123931735027; Mon, 23 Oct 2023 06:05:29 -0700 (PDT) Return-Path: DKIM-Signature: a=rsa-sha256; bh=4UgB4NlJmjJT6RNZZw6sGA39tMie2KIVohszToCy8ic=; 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=1698066328; v=1; b=V3UD7UqhSoeXrO0kMIb6UN9jaCXPFNHKsjZdVAAku8xNDkX9gDTE+JIL3i/4KOmn9XvFLiB4 KxpjjiqSuDevkB9My6cfY+L9kGIwPa8OAIawQ5iv0m1W3IbHf8xOyUkhRQV6DgiXu+MS+bEYfxV o/gaI7MsQNT6b0Imdm9CBhSA= X-Received: by 127.0.0.2 with SMTP id 3gQuYY1788612xwiz52SA9fA; Mon, 23 Oct 2023 06:05:28 -0700 X-Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) by mx.groups.io with SMTP id smtpd.web11.120294.1698066327719147732 for ; Mon, 23 Oct 2023 06:05:28 -0700 X-Received: by mail-lj1-f180.google.com with SMTP id 38308e7fff4ca-2c501bd6ff1so44832191fa.3 for ; Mon, 23 Oct 2023 06:05:27 -0700 (PDT) X-Gm-Message-State: JPV0SLij7M5BYTn5Y04uILZrx1787277AA= X-Google-Smtp-Source: AGHT+IFyzZsBcqJf/WDhRv6TktiPYuCLfWxDWur67aJNIJL6Xeiz2XzwjnKmXt8JKS4rf0BU01NOBQ== X-Received: by 2002:a2e:9797:0:b0:2bc:db99:1775 with SMTP id y23-20020a2e9797000000b002bcdb991775mr6198533lji.26.1698066325420; Mon, 23 Oct 2023 06:05:25 -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.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 06:05:24 -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 12/16] PldmProtocolDxe: Correct TID argument usage Date: Mon, 23 Oct 2023 16:05:07 +0300 Message-Id: <20231023130511.4521-13-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-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1698066330966100054 Content-Type: text/plain; charset="utf-8" From: Abner Chang Currently the PLDM source/destination TID arguments for the PldmSubmit function are not actually used in any way in the underlying MCTP communication. The code just uses MCTP source/destination EID PCDs. So we have to restructure code to actually use provided PLDM TIDs. On the other case the PldmSubmitCommand function from the PldmProtocolLib doesn't even accept the source/destination TID arguments. To address both these facts correct TID argument usage in the following way: - by default the TID values are taken from the built-time PCDs, - user have an ability to provide custom TIDs either via PldmSubmit function arguments or by calling PldmSetTerminus API. Signed-off-by: Abner Chang Signed-off-by: Konstantin Aladyshev --- .../Include/Library/BasePldmProtocolLib.h | 16 ++++++ .../Include/Protocol/PldmProtocol.h | 18 +++--- .../PldmProtocolLibrary/Dxe/PldmProtocolLib.c | 49 +++++++++++++++- .../Dxe/PldmProtocolLib.inf | 6 +- .../PldmProtocol/Common/PldmProtocolCommon.c | 28 +++++++--- .../PldmProtocol/Common/PldmProtocolCommon.h | 22 +++++--- .../Universal/PldmProtocol/Dxe/PldmProtocol.c | 56 ++++++++++++++++--- .../PldmProtocol/Dxe/PldmProtocolDxe.inf | 4 -- 8 files changed, 162 insertions(+), 37 deletions(-) diff --git a/Features/ManageabilityPkg/Include/Library/BasePldmProtocolLib.= h b/Features/ManageabilityPkg/Include/Library/BasePldmProtocolLib.h index 5523ac3a4d..a698197263 100644 --- a/Features/ManageabilityPkg/Include/Library/BasePldmProtocolLib.h +++ b/Features/ManageabilityPkg/Include/Library/BasePldmProtocolLib.h @@ -9,6 +9,22 @@ #ifndef EDKII_PLDM_PROTOCOL_LIB_H_ #define EDKII_PLDM_PROTOCOL_LIB_H_ =20 +/** + This function sets the PLDM source termius and destination terminus + ID for SMBIOS PLDM transfer. + + @param[in] SourceId PLDM source teminus ID. + @param[in] DestinationId PLDM destination teminus ID. + + @retval EFI_SUCCESS The terminus is set successfully. + @retval EFI_INVALID_PARAMETER The terminus is set unsuccessfully. +**/ +EFI_STATUS +PldmSetTerminus ( + IN UINT8 SourceId, + IN UINT8 DestinationId +); + /** This service enables submitting commands via EDKII PLDM protocol. =20 diff --git a/Features/ManageabilityPkg/Include/Protocol/PldmProtocol.h b/Fe= atures/ManageabilityPkg/Include/Protocol/PldmProtocol.h index 651997e1ad..02efb3015a 100644 --- a/Features/ManageabilityPkg/Include/Protocol/PldmProtocol.h +++ b/Features/ManageabilityPkg/Include/Protocol/PldmProtocol.h @@ -26,13 +26,15 @@ typedef struct _EDKII_PLDM_PROTOCOL EDKII_PLDM_PROTOCO= L; /** This service enables submitting commands via EDKII PLDM protocol. =20 - @param[in] This EDKII_PLDM_PROTOCOL instance. - @param[in] PldmType PLDM message type. - @param[in] Command PLDM Command of PLDM message type. - @param[in] RequestData Command Request Data. - @param[in] RequestDataSize Size of Command Request Data. - @param[out] ResponseData Command Response Data. The completi= on code is the first byte of response data. - @param[in, out] ResponseDataSize Size of Command Response Data. + @param[in] This EDKII_PLDM_PROTOCOL instan= ce. + @param[in] PldmType PLDM message type. + @param[in] Command PLDM Command of PLDM messa= ge type. + @param[in] PldmTerminusSourceId PLDM source teminus ID. + @param[in] PldmTerminusDestinationId PLDM destination teminus I= D. + @param[in] RequestData Command Request Data. + @param[in] RequestDataSize Size of Command Request Da= ta. + @param[out] ResponseData Command Response Data. The= completion code is the first byte of response data. + @param[in, out] ResponseDataSize Size of Command Response D= ata. =20 @retval EFI_SUCCESS The command byte stream was successfully = submit to the device and a response was successfully received. @retval EFI_NOT_FOUND The command was not successfully sent to = the device or a response was not successfully received from the device. @@ -49,6 +51,8 @@ EFI_STATUS IN EDKII_PLDM_PROTOCOL *This, IN UINT8 PldmType, IN UINT8 Command, + IN UINT8 PldmTerminusSourceId, + IN UINT8 PldmTerminusDestinationId, IN UINT8 *RequestData, IN UINT32 RequestDataSize, OUT UINT8 *ResponseData, diff --git a/Features/ManageabilityPkg/Library/PldmProtocolLibrary/Dxe/Pldm= ProtocolLib.c b/Features/ManageabilityPkg/Library/PldmProtocolLibrary/Dxe/P= ldmProtocolLib.c index 267bd8fbc1..37231b0756 100644 --- a/Features/ManageabilityPkg/Library/PldmProtocolLibrary/Dxe/PldmProtoco= lLib.c +++ b/Features/ManageabilityPkg/Library/PldmProtocolLibrary/Dxe/PldmProtoco= lLib.c @@ -9,10 +9,34 @@ #include #include #include +#include #include #include =20 -EDKII_PLDM_PROTOCOL *mEdkiiPldmProtocol =3D NULL; +EDKII_PLDM_PROTOCOL *mEdkiiPldmProtocol =3D NULL; +UINT8 mSourcePldmTerminusId =3D 0; +UINT8 mDestinationPldmTerminusId =3D 0; + +/** + This function sets the PLDM source termius and destination terminus + ID for SMBIOS PLDM transfer. + + @param[in] SourceId PLDM source teminus ID. + @param[in] DestinationId PLDM destination teminus ID. + + @retval EFI_SUCCESS The terminus is set successfully. + @retval EFI_INVALID_PARAMETER The terminus is set unsuccessfully. +**/ +EFI_STATUS +PldmSetTerminus ( + IN UINT8 SourceId, + IN UINT8 DestinationId +) +{ + mSourcePldmTerminusId =3D SourceId; + mDestinationPldmTerminusId =3D DestinationId; + return EFI_SUCCESS; +} =20 /** This service enables submitting commands via EDKII PLDM protocol. @@ -69,6 +93,8 @@ PldmSubmitCommand ( mEdkiiPldmProtocol, PldmType, Command, + mSourcePldmTerminus= Id, + mDestinationPldmTer= minusId, RequestData, RequestDataSize, ResponseData, @@ -85,3 +111,24 @@ PldmSubmitCommand ( =20 return Status; } +/** + + Initialize mSourcePldmTerminusId and mDestinationPldmTerminusId. + + @param ImageHandle The image handle. + @param SystemTable The system table. + + @retval EFI_SUCCESS Protocol listener is registered successfully. + +**/ +EFI_STATUS +EFIAPI +PldmProtocolLibConstructor ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + + PldmSetTerminus (PcdGet8(PcdPldmSourceTerminusId), PcdGet8(PcdPldmDestin= ationEndpointId)); + return EFI_SUCCESS; +} diff --git a/Features/ManageabilityPkg/Library/PldmProtocolLibrary/Dxe/Pldm= ProtocolLib.inf b/Features/ManageabilityPkg/Library/PldmProtocolLibrary/Dxe= /PldmProtocolLib.inf index 1233d76726..19c84840b6 100644 --- a/Features/ManageabilityPkg/Library/PldmProtocolLibrary/Dxe/PldmProtoco= lLib.inf +++ b/Features/ManageabilityPkg/Library/PldmProtocolLibrary/Dxe/PldmProtoco= lLib.inf @@ -16,7 +16,7 @@ MODULE_TYPE =3D DXE_DRIVER VERSION_STRING =3D 1.0 LIBRARY_CLASS =3D PldmProtocolLib|DXE_RUNTIME_DRIVER DX= E_DRIVER DXE_CORE UEFI_DRIVER UEFI_APPLICATION - + CONSTRUCTOR =3D PldmProtocolLibConstructor # # VALID_ARCHITECTURES =3D IA32 X64 # @@ -40,3 +40,7 @@ [Protocols] gEdkiiPldmProtocolGuid ## ALWAYS_CONSUMES =20 +[FixedPcd] + gManageabilityPkgTokenSpaceGuid.PcdPldmSourceTerminusId + gManageabilityPkgTokenSpaceGuid.PcdPldmDestinationEndpointId + diff --git a/Features/ManageabilityPkg/Universal/PldmProtocol/Common/PldmPr= otocolCommon.c b/Features/ManageabilityPkg/Universal/PldmProtocol/Common/Pl= dmProtocolCommon.c index 4edfe05955..ea3d4a22b2 100644 --- a/Features/ManageabilityPkg/Universal/PldmProtocol/Common/PldmProtocolC= ommon.c +++ b/Features/ManageabilityPkg/Universal/PldmProtocol/Common/PldmProtocolC= ommon.c @@ -64,6 +64,8 @@ GetFullPacketResponseSize ( @param[in] TransportToken The transport interface. @param[in] PldmType PLDM message type. @param[in] PldmCommand PLDM command of this PLDM type. + @param[in] SourceId PLDM source teminus ID. + @param[in] DestinationId PLDM destination teminus ID. @param[out] PacketHeader The pointer to receive header of r= equest. @param[out] PacketHeaderSize Packet header size in bytes. @param[in, out] PacketBody The request body. @@ -88,6 +90,8 @@ SetupPldmRequestTransportPacket ( IN MANAGEABILITY_TRANSPORT_TOKEN *TransportToken, IN UINT8 PldmType, IN UINT8 PldmCommand, + IN UINT8 SourceId, + IN UINT8 DestinationId, OUT MANAGEABILITY_TRANSPORT_HEADER *PacketHeader, OUT UINT16 *PacketHeaderSize, IN OUT UINT8 **PacketBody, @@ -118,8 +122,8 @@ SetupPldmRequestTransportPacket ( return EFI_OUT_OF_RESOURCES; } =20 - MctpHeader->SourceEndpointId =3D PcdGet8 (PcdMctpSourceEnd= pointId); - MctpHeader->DestinationEndpointId =3D PcdGet8 (PcdMctpDestinati= onEndpointId); + MctpHeader->SourceEndpointId =3D SourceId; + MctpHeader->DestinationEndpointId =3D DestinationId; MctpHeader->MessageHeader.IntegrityCheck =3D FALSE; MctpHeader->MessageHeader.MessageType =3D MCTP_MESSAGE_TYPE_PLDM; *PacketHeader =3D (MANAGEABILITY_TRANSPORT_= HEADER *)MctpHeader; @@ -161,13 +165,15 @@ SetupPldmRequestTransportPacket ( /** Common code to submit PLDM commands =20 - @param[in] TransportToken Transport token. - @param[in] PldmType PLDM message type. - @param[in] PldmCommand PLDM command of this PLDM type. - @param[in] RequestData Command Request Data. - @param[in] RequestDataSize Size of Command Request Data. - @param[out] ResponseData Command Response Data. The completi= on code is the first byte of response data. - @param[in, out] ResponseDataSize Size of Command Response Data. + @param[in] TransportToken Transport token. + @param[in] PldmType PLDM message type. + @param[in] PldmCommand PLDM command of this PLDM = type. + @param[in] PldmTerminusSourceId PLDM source teminus ID. + @param[in] PldmTerminusDestinationId PLDM destination teminus I= D. + @param[in] RequestData Command Request Data. + @param[in] RequestDataSize Size of Command Request Da= ta. + @param[out] ResponseData Command Response Data. The= completion code is the first byte of response data. + @param[in, out] ResponseDataSize Size of Command Response D= ata. =20 @retval EFI_SUCCESS The command byte stream was successfully = submit to the device and a response was successfully received. @retval EFI_NOT_FOUND The command was not successfully sent to = the device or a response was not successfully received from the device. @@ -182,6 +188,8 @@ CommonPldmSubmitCommand ( IN MANAGEABILITY_TRANSPORT_TOKEN *TransportToken, IN UINT8 PldmType, IN UINT8 PldmCommand, + IN UINT8 PldmTerminusSourceId, + IN UINT8 PldmTerminusDestinationId, IN UINT8 *RequestData OPTIONAL, IN UINT32 RequestDataSize, OUT UINT8 *ResponseData OPTIONAL, @@ -225,6 +233,8 @@ CommonPldmSubmitCommand ( TransportToken, PldmType, PldmCommand, + PldmTerminusSourceId, + PldmTerminusDestinationId, &PldmTransportHeader, &HeaderSize, &ThisRequestData, diff --git a/Features/ManageabilityPkg/Universal/PldmProtocol/Common/PldmPr= otocolCommon.h b/Features/ManageabilityPkg/Universal/PldmProtocol/Common/Pl= dmProtocolCommon.h index 231d6e802e..79431dd3b1 100644 --- a/Features/ManageabilityPkg/Universal/PldmProtocol/Common/PldmProtocolC= ommon.h +++ b/Features/ManageabilityPkg/Universal/PldmProtocol/Common/PldmProtocolC= ommon.h @@ -44,6 +44,8 @@ SetupPldmTransportHardwareInformation ( @param[in] TransportToken The transport interface. @param[in] PldmType PLDM message type. @param[in] PldmCommand PLDM command of this PLDM type. + @param[in] SourceId PLDM source teminus ID. + @param[in] DestinationId PLDM destination teminus ID. @param[out] PacketHeader The pointer to receive header of r= equest. @param[out] PacketHeaderSize Packet header size in bytes. @param[in, out] PacketBody The request body. @@ -68,6 +70,8 @@ SetupPldmRequestTransportPacket ( IN MANAGEABILITY_TRANSPORT_TOKEN *TransportToken, IN UINT8 PldmType, IN UINT8 PldmCommand, + IN UINT8 SourceId, + IN UINT8 DestinationId, OUT MANAGEABILITY_TRANSPORT_HEADER *PacketHeader, OUT UINT16 *PacketHeaderSize, IN OUT UINT8 **PacketBody, @@ -79,13 +83,15 @@ SetupPldmRequestTransportPacket ( /** Common code to submit PLDM commands =20 - @param[in] TransportToken Transport token. - @param[in] PldmType PLDM message type. - @param[in] PldmCommand PLDM command of this PLDM type. - @param[in] RequestData Command Request Data. - @param[in] RequestDataSize Size of Command Request Data. - @param[out] ResponseData Command Response Data. The completi= on code is the first byte of response data. - @param[in, out] ResponseDataSize Size of Command Response Data. + @param[in] TransportToken Transport token. + @param[in] PldmType PLDM message type. + @param[in] PldmCommand PLDM command of this PLDM = type. + @param[in] PldmTerminusSourceId PLDM source teminus ID. + @param[in] PldmTerminusDestinationId PLDM destination teminus I= D. + @param[in] RequestData Command Request Data. + @param[in] RequestDataSize Size of Command Request Da= ta. + @param[out] ResponseData Command Response Data. The= completion code is the first byte of response data. + @param[in, out] ResponseDataSize Size of Command Response D= ata. =20 @retval EFI_SUCCESS The command byte stream was successfully = submit to the device and a response was successfully received. @retval EFI_NOT_FOUND The command was not successfully sent to = the device or a response was not successfully received from the device. @@ -100,6 +106,8 @@ CommonPldmSubmitCommand ( IN MANAGEABILITY_TRANSPORT_TOKEN *TransportToken, IN UINT8 PldmType, IN UINT8 PldmCommand, + IN UINT8 PldmTerminusSourceId, + IN UINT8 PldmTerminusDestinationId, IN UINT8 *RequestData OPTIONAL, IN UINT32 RequestDataSize, OUT UINT8 *ResponseData OPTIONAL, diff --git a/Features/ManageabilityPkg/Universal/PldmProtocol/Dxe/PldmProto= col.c b/Features/ManageabilityPkg/Universal/PldmProtocol/Dxe/PldmProtocol.c index b2ca69b05f..726747416c 100644 --- a/Features/ManageabilityPkg/Universal/PldmProtocol/Dxe/PldmProtocol.c +++ b/Features/ManageabilityPkg/Universal/PldmProtocol/Dxe/PldmProtocol.c @@ -25,13 +25,15 @@ UINT32 TransportMaximumPayload; /** This service enables submitting commands via EDKII PLDM protocol. =20 - @param[in] This EDKII_PLDM_PROTOCOL instance. - @param[in] PldmType PLDM message type. - @param[in] Command PLDM Command of PLDM message type. - @param[in] RequestData Command Request Data. - @param[in] RequestDataSize Size of Command Request Data. - @param[out] ResponseData Command Response Data. The completi= on code is the first byte of response data. - @param[in, out] ResponseDataSize Size of Command Response Data. + @param[in] This EDKII_PLDM_PROTOCOL instan= ce. + @param[in] PldmType PLDM message type. + @param[in] Command PLDM Command of PLDM messa= ge type. + @param[in] PldmTerminusSourceId PLDM source teminus ID. + @param[in] PldmTerminusDestinationId PLDM destination teminus I= D. + @param[in] RequestData Command Request Data. + @param[in] RequestDataSize Size of Command Request Da= ta. + @param[out] ResponseData Command Response Data. The= completion code is the first byte of response data. + @param[in, out] ResponseDataSize Size of Command Response D= ata. =20 @retval EFI_SUCCESS The command byte stream was successfully = submit to the device and a response was successfully received. @retval EFI_NOT_FOUND The command was not successfully sent to = the device or a response was not successfully received from the device. @@ -39,7 +41,7 @@ UINT32 TransportMaximumPayload; @retval EFI_DEVICE_ERROR PLDM transport interface Device hardware = error. @retval EFI_TIMEOUT The command time out. @retval EFI_UNSUPPORTED The command was not successfully sent to = the device. - @retval EFI_OUT_OF_RESOURCES The resource allocation is out of resourc= e or data size error. + @retval EFI_OUT_OF_RESOURCES The resource allcation is out of resource= or data size error. @retval EFI_INVALID_PARAMETER Both RequestData and ResponseData are NULL **/ EFI_STATUS @@ -48,6 +50,8 @@ PldmSubmitCommand ( IN EDKII_PLDM_PROTOCOL *This, IN UINT8 PldmType, IN UINT8 Command, + IN UINT8 PldmTerminusSourceId, + IN UINT8 PldmTerminusDestinationId, IN UINT8 *RequestData, IN UINT32 RequestDataSize, OUT UINT8 *ResponseData, @@ -61,10 +65,46 @@ PldmSubmitCommand ( return EFI_INVALID_PARAMETER; } =20 + if (RequestData !=3D NULL && RequestDataSize =3D=3D 0) { + DEBUG (( + DEBUG_ERROR, + "%a: RequestDataSize =3D=3D 0, however RequestData is not NULL for P= LDM type: 0x%x, Command: 0x%x.\n", + __func__, + PldmType, + Command + )); + return EFI_INVALID_PARAMETER; + } + + if (ResponseData =3D=3D NULL && *ResponseDataSize !=3D 0) { + DEBUG (( + DEBUG_ERROR, + "%a: *ResponseDataSize !=3D 0, however ResponseData is NULL for PLDM= type: 0x%x, Command: 0x%x.\n", + __func__, + PldmType, + Command + )); + return EFI_INVALID_PARAMETER; + } + + if (ResponseData !=3D NULL && *ResponseDataSize =3D=3D 0) { + DEBUG (( + DEBUG_ERROR, + "%a: *ResponseDataSize =3D=3D 0, however ResponseData is not NULL fo= r PLDM type: 0x%x, Command: 0x%x.\n", + __func__, + PldmType, + Command + )); + return EFI_INVALID_PARAMETER; + } + + DEBUG ((DEBUG_MANAGEABILITY, "%a: Source terminus ID: 0x%x, Destination = terminus ID: 0x%x.\n")); Status =3D CommonPldmSubmitCommand ( mTransportToken, PldmType, Command, + PldmTerminusSourceId, + PldmTerminusDestinationId, RequestData, RequestDataSize, ResponseData, diff --git a/Features/ManageabilityPkg/Universal/PldmProtocol/Dxe/PldmProto= colDxe.inf b/Features/ManageabilityPkg/Universal/PldmProtocol/Dxe/PldmProto= colDxe.inf index 006f77b09a..aef25f6438 100644 --- a/Features/ManageabilityPkg/Universal/PldmProtocol/Dxe/PldmProtocolDxe.= inf +++ b/Features/ManageabilityPkg/Universal/PldmProtocol/Dxe/PldmProtocolDxe.= inf @@ -42,9 +42,5 @@ [Protocols] gEdkiiPldmProtocolGuid =20 -[FixedPcd] - gManageabilityPkgTokenSpaceGuid.PcdMctpSourceEndpointId - gManageabilityPkgTokenSpaceGuid.PcdMctpDestinationEndpointId - [Depex] TRUE --=20 2.34.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109920): https://edk2.groups.io/g/devel/message/109920 Mute This Topic: https://groups.io/mt/102134662/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-