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 64CD6740049 for ; Mon, 16 Oct 2023 13:18:23 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=JOI2ovk63V8HdGsxfLqcSmst5P5GJf/xAVMcumybkoY=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id: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=1697462302; v=1; b=S7asNHDTtdJ/0mRuwChNAoIgD8Mh7AwpxkOZ1qKyh4mH7w2mtpV4+ai/CXxnOeB1/mjO1Eq8 zYnqTWTmFazJJ/3qGaUT40AS8yhg4p5E7hIyye0EmIVS5vN3gMXi662j5hlDuss4V3l7VBybNYr EPzmQbObf0WOf7M/rL18foHE= X-Received: by 127.0.0.2 with SMTP id 2g0JYY7687511xUcFqpV4kWX; Mon, 16 Oct 2023 06:18:22 -0700 X-Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) by mx.groups.io with SMTP id smtpd.web10.123804.1697462301320304906 for ; Mon, 16 Oct 2023 06:18:21 -0700 X-Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-2c1807f3400so52574911fa.1 for ; Mon, 16 Oct 2023 06:18:21 -0700 (PDT) X-Gm-Message-State: sVB1oQEoZofBBSnbZM7nvk4kx7686176AA= X-Google-Smtp-Source: AGHT+IFw40oMrY0N3p4XAr5smTT+JD5YfEVicPFyjaXwHIcCzr7p0gPmeV5nUx5Cp8k1Dl9Yglp93A== X-Received: by 2002:a05:651c:168d:b0:2c5:332:f18d with SMTP id bd13-20020a05651c168d00b002c50332f18dmr5014757ljb.2.1697462299073; Mon, 16 Oct 2023 06:18:19 -0700 (PDT) X-Received: from PC10319.67 ([82.97.198.254]) by smtp.googlemail.com with ESMTPSA id 9-20020a2e1449000000b002ba586d27a2sm1362545lju.26.2023.10.16.06.18.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 06:18:18 -0700 (PDT) From: "Konstantin Aladyshev" To: devel@edk2.groups.io Cc: abner.chang@amd.com, isaac.w.oram@intel.com, AbdulLateef.Attar@amd.com, nicklew@nvidia.com, Konstantin Aladyshev Subject: [edk2-devel] [PATCH edk2-platforms 00/10] MTCP-over-KCS support Date: Mon, 16 Oct 2023 16:18:06 +0300 Message-Id: <20231016131816.6634-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: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=S7asNHDT; 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 The Manageability KCS transport library needs to support requests both from MCTP and IPMI transports. Currently the code only handles IPMI case correctly. In the MCTP case the communication should be based on the MCTP-over-KCS specification (DSP0254). This specification defines a special KCS binding header and trailer structures that need to be present in every MCTP message. The header structure contains a length field, therefore response packet size is not needed to be known beforehand. The trailer structure contains a PEC checksum that can be used to check itegrity of the response message. Modify Manageability KCS transport library code to check which message is processed (IPMI or MCTP) and handle each case correctly based on its own specification. This patch is a result of a joint effort from the Konstantin Aladyshev and Abner Chang . Tested: PLDM communication between the HOST and BMC was tested with both components implemented via open-source software: - The HOST (UEFI firmware) part was based one the edk2 [1] and edk2-platforms [2] code, - The BMC part was based on the openbmc [3] distribution. The testing process and all the necessary utilities are described in the [4] repository. The provided changes keep IPMI over KCS stack working as reported by Abner Chang. [1]: https://github.com/tianocore/edk2 [2]: https://github.com/tianocore/edk2-platforms [3]: https://github.com/openbmc/openbmc [4]: https://github.com/Kostr/PLDM Konstantin Aladyshev (10): ManageabilityPkg: Add definition for the MCTP KCS TRAILER structure ManageabilityPkg: Check MCTP EIDs for reserved values ManageabilityPkg: Support both MCTP and IPMI in KCS tranport library ManageabilityPkg: Check header fields in the MCTP response ManageabilityPkg: Correct typo in MCTP destination EID field ManageabilityPkg: Update the algorithm of using MCTP endpoint ID PCD ManageabilityPkg: Correct value for the MCTP TAG_OWNER response bit ManageabilityPkg: Don't check MCTP header fields if transfer has failed ManageabilityPkg: Use correct constants for PLDM header checks ManageabilityPkg: Return error on multiple-packet MCTP responses .../Library/ManageabilityTransportMctpLib.h | 9 +- .../Include/Protocol/MctpProtocol.h | 12 +- .../Common/KcsCommon.c | 284 +++++++++++++++--- .../Dxe/ManageabilityTransportMctp.c | 4 +- .../MctpProtocol/Common/MctpProtocolCommon.c | 129 +++++++- .../Universal/MctpProtocol/Dxe/MctpProtocol.c | 51 +++- .../PldmProtocol/Common/PldmProtocolCommon.c | 10 +- 7 files changed, 430 insertions(+), 69 deletions(-) -- 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109633): https://edk2.groups.io/g/devel/message/109633 Mute This Topic: https://groups.io/mt/101994937/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-