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 25DB5AC1021 for ; Mon, 23 Oct 2023 13:05:31 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=DbBJXeypTDTldLr2C98jsrct/ga8cc4v5nGWAUk7RKg=; 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=1698066329; v=1; b=iEcxLSrkYEcmmTUjSt8PQlcrhNP1tq6Bu2YDFW+qoygy3zI1TD1sl1PDeyfMWIu+kgkUtCtL zs2oyKyj1LpVxQ842TVEJMWW3cJh/R2mbjGdP2gJd4U+ZZglT1EjiC6Ra376sfocwPmw8DmijiF tON4+tzy7ePeGYgevaN8rKg0= X-Received: by 127.0.0.2 with SMTP id h6v4YY7687511x3sRX2vpTKg; Mon, 23 Oct 2023 06:05:29 -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: ipdtQL52t3RFyJ9hPD7yDT75x7686176AA= 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-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=iEcxLSrk; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io 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_=0D #define EDKII_PLDM_PROTOCOL_LIB_H_=0D =0D +/**=0D + This function sets the PLDM source termius and destination terminus=0D + ID for SMBIOS PLDM transfer.=0D +=0D + @param[in] SourceId PLDM source teminus ID.=0D + @param[in] DestinationId PLDM destination teminus ID.=0D +=0D + @retval EFI_SUCCESS The terminus is set successfully.=0D + @retval EFI_INVALID_PARAMETER The terminus is set unsuccessfully.=0D +**/=0D +EFI_STATUS=0D +PldmSetTerminus (=0D + IN UINT8 SourceId,=0D + IN UINT8 DestinationId=0D +);=0D +=0D /**=0D This service enables submitting commands via EDKII PLDM protocol.=0D =0D 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; /**=0D This service enables submitting commands via EDKII PLDM protocol.=0D =0D - @param[in] This EDKII_PLDM_PROTOCOL instance.=0D - @param[in] PldmType PLDM message type.=0D - @param[in] Command PLDM Command of PLDM message type.= =0D - @param[in] RequestData Command Request Data.=0D - @param[in] RequestDataSize Size of Command Request Data.=0D - @param[out] ResponseData Command Response Data. The completi= on code is the first byte of response data.=0D - @param[in, out] ResponseDataSize Size of Command Response Data.=0D + @param[in] This EDKII_PLDM_PROTOCOL instan= ce.=0D + @param[in] PldmType PLDM message type.=0D + @param[in] Command PLDM Command of PLDM messa= ge type.=0D + @param[in] PldmTerminusSourceId PLDM source teminus ID.=0D + @param[in] PldmTerminusDestinationId PLDM destination teminus I= D.=0D + @param[in] RequestData Command Request Data.=0D + @param[in] RequestDataSize Size of Command Request Da= ta.=0D + @param[out] ResponseData Command Response Data. The= completion code is the first byte of response data.=0D + @param[in, out] ResponseDataSize Size of Command Response D= ata.=0D =0D @retval EFI_SUCCESS The command byte stream was successfully = submit to the device and a response was successfully received.=0D @retval EFI_NOT_FOUND The command was not successfully sent to = the device or a response was not successfully received from the device.=0D @@ -49,6 +51,8 @@ EFI_STATUS IN EDKII_PLDM_PROTOCOL *This,=0D IN UINT8 PldmType,=0D IN UINT8 Command,=0D + IN UINT8 PldmTerminusSourceId,=0D + IN UINT8 PldmTerminusDestinationId,=0D IN UINT8 *RequestData,=0D IN UINT32 RequestDataSize,=0D OUT UINT8 *ResponseData,=0D 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 =0D #include =0D #include =0D +#include =0D #include =0D #include =0D =0D -EDKII_PLDM_PROTOCOL *mEdkiiPldmProtocol =3D NULL;=0D +EDKII_PLDM_PROTOCOL *mEdkiiPldmProtocol =3D NULL;=0D +UINT8 mSourcePldmTerminusId =3D 0;=0D +UINT8 mDestinationPldmTerminusId =3D 0;=0D +=0D +/**=0D + This function sets the PLDM source termius and destination terminus=0D + ID for SMBIOS PLDM transfer.=0D +=0D + @param[in] SourceId PLDM source teminus ID.=0D + @param[in] DestinationId PLDM destination teminus ID.=0D +=0D + @retval EFI_SUCCESS The terminus is set successfully.=0D + @retval EFI_INVALID_PARAMETER The terminus is set unsuccessfully.=0D +**/=0D +EFI_STATUS=0D +PldmSetTerminus (=0D + IN UINT8 SourceId,=0D + IN UINT8 DestinationId=0D +)=0D +{=0D + mSourcePldmTerminusId =3D SourceId;=0D + mDestinationPldmTerminusId =3D DestinationId;=0D + return EFI_SUCCESS;=0D +}=0D =0D /**=0D This service enables submitting commands via EDKII PLDM protocol.=0D @@ -69,6 +93,8 @@ PldmSubmitCommand ( mEdkiiPldmProtocol,= =0D PldmType,=0D Command,=0D + mSourcePldmTerminus= Id,=0D + mDestinationPldmTer= minusId,=0D RequestData,=0D RequestDataSize,=0D ResponseData,=0D @@ -85,3 +111,24 @@ PldmSubmitCommand ( =0D return Status;=0D }=0D +/**=0D +=0D + Initialize mSourcePldmTerminusId and mDestinationPldmTerminusId.=0D +=0D + @param ImageHandle The image handle.=0D + @param SystemTable The system table.=0D +=0D + @retval EFI_SUCCESS Protocol listener is registered successfully.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +PldmProtocolLibConstructor (=0D + IN EFI_HANDLE ImageHandle,=0D + IN EFI_SYSTEM_TABLE *SystemTable=0D + )=0D +{=0D +=0D + PldmSetTerminus (PcdGet8(PcdPldmSourceTerminusId), PcdGet8(PcdPldmDestin= ationEndpointId));=0D + return EFI_SUCCESS;=0D +}=0D 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=0D VERSION_STRING =3D 1.0=0D LIBRARY_CLASS =3D PldmProtocolLib|DXE_RUNTIME_DRIVER DX= E_DRIVER DXE_CORE UEFI_DRIVER UEFI_APPLICATION=0D -=0D + CONSTRUCTOR =3D PldmProtocolLibConstructor=0D #=0D # VALID_ARCHITECTURES =3D IA32 X64=0D #=0D @@ -40,3 +40,7 @@ [Protocols]=0D gEdkiiPldmProtocolGuid ## ALWAYS_CONSUMES=0D =0D +[FixedPcd]=0D + gManageabilityPkgTokenSpaceGuid.PcdPldmSourceTerminusId=0D + gManageabilityPkgTokenSpaceGuid.PcdPldmDestinationEndpointId=0D +=0D 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.=0D @param[in] PldmType PLDM message type.=0D @param[in] PldmCommand PLDM command of this PLDM type.=0D + @param[in] SourceId PLDM source teminus ID.=0D + @param[in] DestinationId PLDM destination teminus ID.=0D @param[out] PacketHeader The pointer to receive header of r= equest.=0D @param[out] PacketHeaderSize Packet header size in bytes.=0D @param[in, out] PacketBody The request body.=0D @@ -88,6 +90,8 @@ SetupPldmRequestTransportPacket ( IN MANAGEABILITY_TRANSPORT_TOKEN *TransportToken,=0D IN UINT8 PldmType,=0D IN UINT8 PldmCommand,=0D + IN UINT8 SourceId,=0D + IN UINT8 DestinationId,=0D OUT MANAGEABILITY_TRANSPORT_HEADER *PacketHeader,=0D OUT UINT16 *PacketHeaderSize,=0D IN OUT UINT8 **PacketBody,=0D @@ -118,8 +122,8 @@ SetupPldmRequestTransportPacket ( return EFI_OUT_OF_RESOURCES;=0D }=0D =0D - MctpHeader->SourceEndpointId =3D PcdGet8 (PcdMctpSourceEnd= pointId);=0D - MctpHeader->DestinationEndpointId =3D PcdGet8 (PcdMctpDestinati= onEndpointId);=0D + MctpHeader->SourceEndpointId =3D SourceId;=0D + MctpHeader->DestinationEndpointId =3D DestinationId;=0D MctpHeader->MessageHeader.IntegrityCheck =3D FALSE;=0D MctpHeader->MessageHeader.MessageType =3D MCTP_MESSAGE_TYPE_PLDM;=0D *PacketHeader =3D (MANAGEABILITY_TRANSPORT_= HEADER *)MctpHeader;=0D @@ -161,13 +165,15 @@ SetupPldmRequestTransportPacket ( /**=0D Common code to submit PLDM commands=0D =0D - @param[in] TransportToken Transport token.=0D - @param[in] PldmType PLDM message type.=0D - @param[in] PldmCommand PLDM command of this PLDM type.=0D - @param[in] RequestData Command Request Data.=0D - @param[in] RequestDataSize Size of Command Request Data.=0D - @param[out] ResponseData Command Response Data. The completi= on code is the first byte of response data.=0D - @param[in, out] ResponseDataSize Size of Command Response Data.=0D + @param[in] TransportToken Transport token.=0D + @param[in] PldmType PLDM message type.=0D + @param[in] PldmCommand PLDM command of this PLDM = type.=0D + @param[in] PldmTerminusSourceId PLDM source teminus ID.=0D + @param[in] PldmTerminusDestinationId PLDM destination teminus I= D.=0D + @param[in] RequestData Command Request Data.=0D + @param[in] RequestDataSize Size of Command Request Da= ta.=0D + @param[out] ResponseData Command Response Data. The= completion code is the first byte of response data.=0D + @param[in, out] ResponseDataSize Size of Command Response D= ata.=0D =0D @retval EFI_SUCCESS The command byte stream was successfully = submit to the device and a response was successfully received.=0D @retval EFI_NOT_FOUND The command was not successfully sent to = the device or a response was not successfully received from the device.=0D @@ -182,6 +188,8 @@ CommonPldmSubmitCommand ( IN MANAGEABILITY_TRANSPORT_TOKEN *TransportToken,=0D IN UINT8 PldmType,=0D IN UINT8 PldmCommand,=0D + IN UINT8 PldmTerminusSourceId,=0D + IN UINT8 PldmTerminusDestinationId,=0D IN UINT8 *RequestData OPTIONAL,=0D IN UINT32 RequestDataSize,=0D OUT UINT8 *ResponseData OPTIONAL,=0D @@ -225,6 +233,8 @@ CommonPldmSubmitCommand ( TransportToken,=0D PldmType,=0D PldmCommand,=0D + PldmTerminusSourceId,=0D + PldmTerminusDestinationId,=0D &PldmTransportHeader,=0D &HeaderSize,=0D &ThisRequestData,=0D 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.=0D @param[in] PldmType PLDM message type.=0D @param[in] PldmCommand PLDM command of this PLDM type.=0D + @param[in] SourceId PLDM source teminus ID.=0D + @param[in] DestinationId PLDM destination teminus ID.=0D @param[out] PacketHeader The pointer to receive header of r= equest.=0D @param[out] PacketHeaderSize Packet header size in bytes.=0D @param[in, out] PacketBody The request body.=0D @@ -68,6 +70,8 @@ SetupPldmRequestTransportPacket ( IN MANAGEABILITY_TRANSPORT_TOKEN *TransportToken,=0D IN UINT8 PldmType,=0D IN UINT8 PldmCommand,=0D + IN UINT8 SourceId,=0D + IN UINT8 DestinationId,=0D OUT MANAGEABILITY_TRANSPORT_HEADER *PacketHeader,=0D OUT UINT16 *PacketHeaderSize,=0D IN OUT UINT8 **PacketBody,=0D @@ -79,13 +83,15 @@ SetupPldmRequestTransportPacket ( /**=0D Common code to submit PLDM commands=0D =0D - @param[in] TransportToken Transport token.=0D - @param[in] PldmType PLDM message type.=0D - @param[in] PldmCommand PLDM command of this PLDM type.=0D - @param[in] RequestData Command Request Data.=0D - @param[in] RequestDataSize Size of Command Request Data.=0D - @param[out] ResponseData Command Response Data. The completi= on code is the first byte of response data.=0D - @param[in, out] ResponseDataSize Size of Command Response Data.=0D + @param[in] TransportToken Transport token.=0D + @param[in] PldmType PLDM message type.=0D + @param[in] PldmCommand PLDM command of this PLDM = type.=0D + @param[in] PldmTerminusSourceId PLDM source teminus ID.=0D + @param[in] PldmTerminusDestinationId PLDM destination teminus I= D.=0D + @param[in] RequestData Command Request Data.=0D + @param[in] RequestDataSize Size of Command Request Da= ta.=0D + @param[out] ResponseData Command Response Data. The= completion code is the first byte of response data.=0D + @param[in, out] ResponseDataSize Size of Command Response D= ata.=0D =0D @retval EFI_SUCCESS The command byte stream was successfully = submit to the device and a response was successfully received.=0D @retval EFI_NOT_FOUND The command was not successfully sent to = the device or a response was not successfully received from the device.=0D @@ -100,6 +106,8 @@ CommonPldmSubmitCommand ( IN MANAGEABILITY_TRANSPORT_TOKEN *TransportToken,=0D IN UINT8 PldmType,=0D IN UINT8 PldmCommand,=0D + IN UINT8 PldmTerminusSourceId,=0D + IN UINT8 PldmTerminusDestinationId,=0D IN UINT8 *RequestData OPTIONAL,=0D IN UINT32 RequestDataSize,=0D OUT UINT8 *ResponseData OPTIONAL,=0D 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; /**=0D This service enables submitting commands via EDKII PLDM protocol.=0D =0D - @param[in] This EDKII_PLDM_PROTOCOL instance.=0D - @param[in] PldmType PLDM message type.=0D - @param[in] Command PLDM Command of PLDM message type.= =0D - @param[in] RequestData Command Request Data.=0D - @param[in] RequestDataSize Size of Command Request Data.=0D - @param[out] ResponseData Command Response Data. The completi= on code is the first byte of response data.=0D - @param[in, out] ResponseDataSize Size of Command Response Data.=0D + @param[in] This EDKII_PLDM_PROTOCOL instan= ce.=0D + @param[in] PldmType PLDM message type.=0D + @param[in] Command PLDM Command of PLDM messa= ge type.=0D + @param[in] PldmTerminusSourceId PLDM source teminus ID.=0D + @param[in] PldmTerminusDestinationId PLDM destination teminus I= D.=0D + @param[in] RequestData Command Request Data.=0D + @param[in] RequestDataSize Size of Command Request Da= ta.=0D + @param[out] ResponseData Command Response Data. The= completion code is the first byte of response data.=0D + @param[in, out] ResponseDataSize Size of Command Response D= ata.=0D =0D @retval EFI_SUCCESS The command byte stream was successfully = submit to the device and a response was successfully received.=0D @retval EFI_NOT_FOUND The command was not successfully sent to = the device or a response was not successfully received from the device.=0D @@ -39,7 +41,7 @@ UINT32 TransportMaximumPayload; @retval EFI_DEVICE_ERROR PLDM transport interface Device hardware = error.=0D @retval EFI_TIMEOUT The command time out.=0D @retval EFI_UNSUPPORTED The command was not successfully sent to = the device.=0D - @retval EFI_OUT_OF_RESOURCES The resource allocation is out of resourc= e or data size error.=0D + @retval EFI_OUT_OF_RESOURCES The resource allcation is out of resource= or data size error.=0D @retval EFI_INVALID_PARAMETER Both RequestData and ResponseData are NUL= L=0D **/=0D EFI_STATUS=0D @@ -48,6 +50,8 @@ PldmSubmitCommand ( IN EDKII_PLDM_PROTOCOL *This,=0D IN UINT8 PldmType,=0D IN UINT8 Command,=0D + IN UINT8 PldmTerminusSourceId,=0D + IN UINT8 PldmTerminusDestinationId,=0D IN UINT8 *RequestData,=0D IN UINT32 RequestDataSize,=0D OUT UINT8 *ResponseData,=0D @@ -61,10 +65,46 @@ PldmSubmitCommand ( return EFI_INVALID_PARAMETER;=0D }=0D =0D + if (RequestData !=3D NULL && RequestDataSize =3D=3D 0) {=0D + DEBUG ((=0D + DEBUG_ERROR,=0D + "%a: RequestDataSize =3D=3D 0, however RequestData is not NULL for P= LDM type: 0x%x, Command: 0x%x.\n",=0D + __func__,=0D + PldmType,=0D + Command=0D + ));=0D + return EFI_INVALID_PARAMETER;=0D + }=0D +=0D + if (ResponseData =3D=3D NULL && *ResponseDataSize !=3D 0) {=0D + DEBUG ((=0D + DEBUG_ERROR,=0D + "%a: *ResponseDataSize !=3D 0, however ResponseData is NULL for PLDM= type: 0x%x, Command: 0x%x.\n",=0D + __func__,=0D + PldmType,=0D + Command=0D + ));=0D + return EFI_INVALID_PARAMETER;=0D + }=0D +=0D + if (ResponseData !=3D NULL && *ResponseDataSize =3D=3D 0) {=0D + DEBUG ((=0D + DEBUG_ERROR,=0D + "%a: *ResponseDataSize =3D=3D 0, however ResponseData is not NULL fo= r PLDM type: 0x%x, Command: 0x%x.\n",=0D + __func__,=0D + PldmType,=0D + Command=0D + ));=0D + return EFI_INVALID_PARAMETER;=0D + }=0D +=0D + DEBUG ((DEBUG_MANAGEABILITY, "%a: Source terminus ID: 0x%x, Destination = terminus ID: 0x%x.\n"));=0D Status =3D CommonPldmSubmitCommand (=0D mTransportToken,=0D PldmType,=0D Command,=0D + PldmTerminusSourceId,=0D + PldmTerminusDestinationId,=0D RequestData,=0D RequestDataSize,=0D ResponseData,=0D 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]=0D gEdkiiPldmProtocolGuid=0D =0D -[FixedPcd]=0D - gManageabilityPkgTokenSpaceGuid.PcdMctpSourceEndpointId=0D - gManageabilityPkgTokenSpaceGuid.PcdMctpDestinationEndpointId=0D -=0D [Depex]=0D TRUE=0D --=20 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- 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/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-