From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (NAM12-BN8-obe.outbound.protection.outlook.com [40.107.237.85]) by mx.groups.io with SMTP id smtpd.web11.2667.1681802183682273598 for ; Tue, 18 Apr 2023 00:16:23 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@amd.com header.s=selector1 header.b=Dehh8g+J; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.237.85, mailfrom: abner.chang@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LQHvq9rlxJGExNeNdcFJLyC3oVkv8p+sR2cvV3xZJKPIjt04Czdgyd8TdQkWVxGVaEX7EiDUW6PhEq8wQLyHpKlLYneDmcDlhmGOYvBGWqTUP1ydzWcrvV2X8AjPNEJJYa/VjkyLgsjaXeAE9eKwG+lDhaFEKHCNj1btqakDTIsRNOhwklEFuVtz8cuCt6zaBpOST3IcUBZI/19Vh/HYEakSfKp8LGdewIwrTl8c92CoX0LwjVbKqYg2ykQYUrfYD6LVj+Pr0ygna7Dkirf1c8bIVa1Ak49zwtfQicFJrtgeArlSk1ysSZ8EXh3iqTfecLJzYOirzYtU2evxD/VN5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pITins9LF7aSi3VqFP5wX/a0QR9oCRLLffI6PZuy0uA=; b=WKKk1BrqSSeqOWFbH3yMjbzXJ+ZMkxR8Jula9y4DW/xEAo3syEI5w+2eQpDBFwFQvFMLXULcfiBYMQKb3xobioHNH4sqLy2kKSiFQRnPxP/CNE1nRQBPzkVV0FAjCPCG+e5x8dLmpUrR5Hvb3fk7aJFdhPmlMkQCsMWPDgN7u5ceWZ/WHiifGmKooHn6Ch4GoUevG3EqBRe9dkL9H7e1YT4nUWdjr7Okv5Meq+sFVpY1S3VqoAF/QL9OgSig/FriVrg3VTaM5FFjHxuWLdk9IVgsvWmwDmI6+l3zs/7KkWpDH2F2/vWM1OWGXy4g4cediG5dIdU9i9wX0WQiiXaQoA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pITins9LF7aSi3VqFP5wX/a0QR9oCRLLffI6PZuy0uA=; b=Dehh8g+JrvDo7fY04ngqKJN0lrKZR8l2NLN3P7yoStewXoul5a1ql9CmBjm+kpS4CUsqXXCJGDG/mBW5eBQzPDSxFLNypHGX+8lgbSAJ3zjtrr6KwzfJ2jenGyZaWG+IjVSVEQV+WUuCSZqeODVXTEXEDv5lWRTKqXkC9Nlh7U8= Received: from DS0PR17CA0002.namprd17.prod.outlook.com (2603:10b6:8:191::25) by CH3PR12MB8910.namprd12.prod.outlook.com (2603:10b6:610:179::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.45; Tue, 18 Apr 2023 07:16:21 +0000 Received: from DM6NAM11FT110.eop-nam11.prod.protection.outlook.com (2603:10b6:8:191:cafe::6) by DS0PR17CA0002.outlook.office365.com (2603:10b6:8:191::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.47 via Frontend Transport; Tue, 18 Apr 2023 07:16:21 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DM6NAM11FT110.mail.protection.outlook.com (10.13.173.205) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6319.20 via Frontend Transport; Tue, 18 Apr 2023 07:16:20 +0000 Received: from TPE-L1-ABNCHANG.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Tue, 18 Apr 2023 02:16:18 -0500 From: "Chang, Abner" To: CC: Isaac Oram , Abdul Lateef Attar , Nickle Wang , Igor Kulchytskyy Subject: [edk2-platforms][PATCH V2 08/14] ManageabilityPkg: Add MCTP manageability header file Date: Tue, 18 Apr 2023 15:15:37 +0800 Message-ID: <20230418071543.1951-9-abner.chang@amd.com> X-Mailer: git-send-email 2.37.1.windows.1 In-Reply-To: <20230418071543.1951-1-abner.chang@amd.com> References: <20230418071543.1951-1-abner.chang@amd.com> MIME-Version: 1.0 Return-Path: Abner.Chang@amd.com X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT110:EE_|CH3PR12MB8910:EE_ X-MS-Office365-Filtering-Correlation-Id: 8121b228-2ce0-4d6d-450d-08db3fdccf8b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: m8rFN2Qxh6R7IqHKu718DGzVs078WJJ+BnsvK3wo3MGUM1g+2/OZLMO+UEvIKqoukcjhmJbkUluLw9LFh+PDrRNR/Cfjzr4AM7b8id0NbHqBM7XxwBOBq4YG8uPpldHC6KXjJOchAJA3E+a3+O1Ccbx3ujW7InXNhauWeTPACVwqOHqNgVcX+dDEIAIK4p2J+wgtrv1dLFUuPH81L2VgzIyq//lfpggqHmN7G3fHEzWLZyhHjKYf5k6DdAXKlNg8LrVgtXdKoE7sOGly6kFv9VpS+fhmZ931bH3Oer3oTsPjwrtPeRDmnTaQLAOpB+76wUxShDqsrpQB19zvs1c+CsVjtbzd0s2FwIYLW79f6mmLAV2yAIfo4QSCd3fQzL/Ei9Bz7L5baxTFqcYh3fPqe6u+iHogcfHKyyYim7mlr4+ibSSIt7vkkoa8Yxymp1BCiesIg9Cxv9vkO5Ti/hgOpa9o+FkE6Qx4jQFVNGj+tGbZeZiKyeRiDc+4iXDRmUmnGW/CLNnKCALUkqUtZzmPh998ceF1JIQBZj3W5j9oTsom26Oh3Il1nuXpOS5KU+cjtmbYJu0VJVwwHbnvXz5INjiVUF6qWYDtwirOQMzboVCMB7WSH0C2xbBvsG7VYOxiBt0vlvt11et6qpNB3BeIfs7nfTf1XuxoAvsEqaZg/Twit6q13KpTy5fPebKcRxjxHFnhMd7HIYZP7KuOR6I6uhL04MTwmg6ZBInYLNyon+I= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(376002)(396003)(136003)(39860400002)(346002)(451199021)(46966006)(36840700001)(40470700004)(36756003)(4326008)(6916009)(54906003)(316002)(70586007)(70206006)(7696005)(478600001)(6666004)(41300700001)(5660300002)(82310400005)(8676002)(8936002)(2876002)(40480700001)(2906002)(82740400003)(86362001)(81166007)(356005)(426003)(2616005)(336012)(40460700003)(1076003)(26005)(186003)(36860700001)(16526019)(47076005)(83380400001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2023 07:16:20.9641 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8121b228-2ce0-4d6d-450d-08db3fdccf8b X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT110.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8910 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain From: Abner Chang Add C header file of MCTP manageability transport interface library. Signed-off-by: Abner Chang Cc: Isaac Oram Cc: Abdul Lateef Attar Cc: Nickle Wang Cc: Igor Kulchytskyy --- .../Library/ManageabilityTransportMctpLib.h | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 Features/ManageabilityPkg/Include/Library/Manageability= TransportMctpLib.h diff --git a/Features/ManageabilityPkg/Include/Library/ManageabilityTranspo= rtMctpLib.h b/Features/ManageabilityPkg/Include/Library/ManageabilityTransp= ortMctpLib.h new file mode 100644 index 0000000000..43bd142f4c --- /dev/null +++ b/Features/ManageabilityPkg/Include/Library/ManageabilityTransportMctpL= ib.h @@ -0,0 +1,54 @@ +/** @file + + This file defines the manageability MCTP protocol specific transport dat= a. + + Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#ifndef MANAGEABILITY_TRANSPORT_MCTP_LIB_H_ +#define MANAGEABILITY_TRANSPORT_MCTP_LIB_H_ + +#include + +#define MCTP_KCS_HEADER_VERSION 0x01 + +// According to SMBUS spec, the polynomial is: +// C(x) =3D X^8 + X^2 + X^1 + 1, which is 0x107, +// just ignore bit8 in definition. +#define MCTP_KCS_PACKET_ERROR_CODE_POLY 0x07 + +/// +/// The MCTP Message header which is apart from +/// the payload. +/// + +typedef struct { + UINT8 IntegrityCheck : 1; ///< Message integrity check. + UINT8 MessageType : 7; ///< Message type. +} MANAGEABILITY_MCTP_MESSAGE_HEADER; + +typedef struct { + UINT8 SourceEndpointId; + UINT8 DestinationEndpointId; + MANAGEABILITY_MCTP_MESSAGE_HEADER MessageHeader; +} MANAGEABILITY_MCTP_TRANSPORT_HEADER; + +typedef struct { + UINT8 NetFunc; ///< Message integrity check. + UINT8 DefiningBody; ///< Message type. + UINT8 ByteCount; ///< Byte count of payload. +} MANAGEABILITY_MCTP_KCS_HEADER; +#define MCTP_KCS_NETFN_LUN 0xb0 +#define DEFINING_BODY_DMTF_PRE_OS_WORKING_GROUP 0x01 + +// This is used to track the response message. This value +// is not defined by the specification. +#define MCTP_MESSAGE_TAG 0x1 + +#define MCTP_MESSAGE_TAG_OWNER_REQUEST 0x01 +#define MCTP_MESSAGE_TAG_OWNER_RESPONSE 0x01 + +#define MCTP_PACKET_SEQUENCE_MASK 0x3 + +#endif // MANAGEABILITY_TRANSPORT_MCTP_LIB_H_ --=20 2.37.1.windows.1