From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (NAM10-MW2-obe.outbound.protection.outlook.com [40.107.94.55]) by mx.groups.io with SMTP id smtpd.web10.2226.1681973776591139062 for ; Wed, 19 Apr 2023 23:56:16 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nvidia.com header.s=selector2 header.b=SjuPP1bd; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: nvidia.com, ip: 40.107.94.55, mailfrom: nicklew@nvidia.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eay3HSF4IHAbHC2vvWUeWjck+P30/LuwBBGPmkgkAj0tkaPVJm9oGJf2LEDt2gwR1Eo8VyoevTTTLyIwTzOnGK8IeEAA6FXga1t33wTIWkhmnWIJqZGcRLCjXkM9oEzCfcpwiDzqE8J5R5G0/nwk6SS59ftdAfeBCuGMvpNAVAr0GaC3TXw5DX3fcmbojU044wIN1yqOnd6cYoLuSClLmQ2Re3wqKlg9+NoRjNOu7m+YEaOe1PAfjxmxq12S/gbIi+eZbpjtfRU4RPw75mrJfj2h6tLcjmPGFaxsYffnzx4gxMK7gQ/E68NFhF58O/pFS57Eog/8M7WD1AaDaU8lMQ== 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=6S6Qy6S9uo/zHBGUKqGBrUB1yLxBPDyCVEQHRwjTUT0=; b=Jx3+qbMw1XzO5bVUnLfqg2s8a8vu6BdtpZAiXj5JzgQrMBZaheNA7KOFEkIWMbPmimn/nOQ6xP68omv4WzDnOoP+Z9vYDe+eD3j0fzR/rAr+RPz8aEJ4adDSXLx6akP/BZLtM/yDwhjjlMcGrOQoYN3uAhXqaMQjBz/FyacLw4rEn7h0Y6jg2B+BV48Uo2RC2wO0Ao5Q29hFPA43HV/qUDMmRc0+AtMClVbq7xP/t1u293vOf/oT7aNigXUBgUw/eDrNJiI/+RA3lPbr82f89+jAy0lDXB7cC3LhzaHYSCDDdtRncznzaXGq6VNVtGYHQTw1bI1LvjA9jHQBxZ2Zpg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6S6Qy6S9uo/zHBGUKqGBrUB1yLxBPDyCVEQHRwjTUT0=; b=SjuPP1bdk8ieZzfn5NFhHAPi8NOkMdxaqwT4tgu35XKR4ZX8UudfxlPtXGg2wB6VrCRCDhbEvXac603s+q73+7u8Ulb3uf5V2/P6jjR8xWyqYUmhqfGGXv/8pNdx+7G7O4O5iRqmh9qspsIYHcIWWAc1l1xF2rVwbmBwPK6COU716spiV9EUYvRXfIIF3GBKY7hN9JggkklvkfhjhbRFBdcS1ThU8smwg1WSsXeYn2O4MHk/5Q/+XN6/tuBo/4aQvqO1oHHOWnUa/fxIkbCRwlb0X8ELHe3ZBL+z+D39zUhH0WpNdlpBO/0yITBDgis6GYEKk5/bDTZ76NubmAHAcw== Received: from MW4PR12MB7031.namprd12.prod.outlook.com (2603:10b6:303:1ef::6) by PH0PR12MB7789.namprd12.prod.outlook.com (2603:10b6:510:283::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.45; Thu, 20 Apr 2023 06:56:13 +0000 Received: from MW4PR12MB7031.namprd12.prod.outlook.com ([fe80::d9df:b45b:2cc1:f017]) by MW4PR12MB7031.namprd12.prod.outlook.com ([fe80::d9df:b45b:2cc1:f017%5]) with mapi id 15.20.6319.022; Thu, 20 Apr 2023 06:56:13 +0000 From: "Nickle Wang" To: "abner.chang@amd.com" , "devel@edk2.groups.io" CC: Isaac Oram , Abdul Lateef Attar , Igor Kulchytskyy Subject: Re: [edk2-platforms][PATCH V2 08/14] ManageabilityPkg: Add MCTP manageability header file Thread-Topic: [edk2-platforms][PATCH V2 08/14] ManageabilityPkg: Add MCTP manageability header file Thread-Index: AQHZccWw+iTVNdwF7E+lnU+Oryuw468zxsfQ Date: Thu, 20 Apr 2023 06:56:13 +0000 Message-ID: References: <20230418071543.1951-1-abner.chang@amd.com> <20230418071543.1951-9-abner.chang@amd.com> In-Reply-To: <20230418071543.1951-9-abner.chang@amd.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW4PR12MB7031:EE_|PH0PR12MB7789:EE_ x-ms-office365-filtering-correlation-id: 1dc27d0a-ca99-4a6f-5b62-08db416c54d5 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: EHCt3D9SMM+HIH2c3SNM8kMznDeIVVGQoQ26UE8RODmAHp2A+RqT0PhXsGOqaVwbBQkSYE7Y2DhInHjkqKjwUQIVAGmjA0w4eEFAMURVFT4E5MFhesLWsrNmamOVOM6fW0OlQDR93r63ti7roeEjxjLVF1WUe2TA+GPtuH3Qu49ZLzX1wFkBDAa19kPYsjXVBXPx8837KlBYB3PDxwezVkMqXjf4VnCwW6SM4J7pUATxLl5kCxZQkkdjPq7hMGGMki+sWw8b8KrWyR+UesHVg7EyTLev0L49uEOmb2/z2ysmSHS3t+4lunlIh4sH/ZrgSIM/Gitzj9kKgBt+OTD7NojklF5JetvEfgoCbjqnm5OudTTGc2gvrOPWHC0kMOWPbzwDHSsTDKcrX7baagzXWSPAX/ctotitU4RPieSg2c4ai0QtqNzo3KmFKfqozdu4C8BKS4yGqJlpwBYQV7hms9Ekpot7f7L6u1jeksNqf+OQ1Eaq8B3apqRq2Rj7pJEvWHDWv/a1KYJJbhhJZ/bewxb4CKQu7+wiKV/HClwkZCrYv/kOT81SFCDWc5oF3oDDnLwz/4gqiQxJ1TjIshqEa7u/L2KFc2FLobQ4mL2xMZBCp3XhKAUfW2Rb1olhbqvH x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR12MB7031.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(376002)(346002)(39860400002)(396003)(366004)(451199021)(66946007)(64756008)(66556008)(2906002)(66446008)(66476007)(86362001)(4326008)(5660300002)(52536014)(8936002)(41300700001)(55016003)(76116006)(54906003)(478600001)(33656002)(110136005)(316002)(71200400001)(7696005)(26005)(9686003)(186003)(122000001)(6506007)(83380400001)(53546011)(8676002)(38070700005)(38100700002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?5RUkA5tWtlhWaA0MwPLXrZnFPFI6Vc1lfVm2jHDK7qcb8CyL23ZnyhfIEAmy?= =?us-ascii?Q?8asSgGJr+AmwLCbgmQ7NYDTGk9HqAAmgFclNyKd/rsHQN++RY6u62RJlMj/h?= =?us-ascii?Q?rAhejIIz9wkZZd4VRlfGn7Iy8ibdQSvswAkePRY+eskoloLhqh8QGC0GCDF0?= =?us-ascii?Q?VhkWIyUM6mD4o3kObajOH4YPWOkeCsOZn2Zf2+faXfY0LsmT07pQBYTROTnK?= =?us-ascii?Q?SP5JrIckw4GUUcsU7a+KCwbsvnB7V7TJb4EGcHz6bXN+uQFctYwFIY2H5YNr?= =?us-ascii?Q?4qNpGp8Z/OFnkMClA4qC2uuOBckHgunJHsxtCleFxtsHyMbsFrGE6+wjfjg7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vI8Q6Fm7++7Ij4eSxBk9xU6L5H?= =?us-ascii?Q?SXxLF/+Z5cKXx//lpRtlORJbevqUnm/Wuq5zu9ai+Q5bGnwNRUX3INIIl3va?= =?us-ascii?Q?VeG++3zGbdBO55WcDOOWN5pvZJO/E1AolqI4xFG05f5DyCbq03wCrxqesOSM?= =?us-ascii?Q?LdmTmMYH1mGqZL0fNkcuwOd6sDVsB6EgsxG6OSzWQU0R8DwV+L6SW0DfGGJb?= =?us-ascii?Q?z0CszZTw/EZKpWWf1XxeHtRPqs6HJSILtaxyGIV05qnmST+ejL1JBJrPBb3n?= =?us-ascii?Q?ttjVL1/LER7X3X/CnqCU0l4JSqMyPuXYOY+koIwMLk+7RqSn9jU/j5wNf/qm?= =?us-ascii?Q?niZCRAqzvRJ9SBSmiM8=3D?= MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR12MB7031.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1dc27d0a-ca99-4a6f-5b62-08db416c54d5 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Apr 2023 06:56:13.8110 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: i5aYuHhOqm3DttzvMH0iUAjmDrKGxR3DsH2nBh0sPxWtgQxdOffMFhfZQ4Sp986QHpA9yGQLOE1HC7SlQgZt+A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB7789 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Nickle Wang Regards, Nickle > -----Original Message----- > From: abner.chang@amd.com > Sent: Tuesday, April 18, 2023 3:16 PM > To: devel@edk2.groups.io > Cc: Isaac Oram ; Abdul Lateef Attar > ; Nickle Wang ; Igor Kulchytskyy > > Subject: [edk2-platforms][PATCH V2 08/14] ManageabilityPkg: Add MCTP > manageability header file >=20 > External email: Use caution opening links or attachments >=20 >=20 > From: Abner Chang >=20 > Add C header file of MCTP manageability transport interface library. >=20 > 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/ManageabilityTransportMctpLib.h >=20 > diff --git > a/Features/ManageabilityPkg/Include/Library/ManageabilityTransportMctpLib= .h > b/Features/ManageabilityPkg/Include/Library/ManageabilityTransportMctpLib= .h > new file mode 100644 > index 0000000000..43bd142f4c > --- /dev/null > +++ b/Features/ManageabilityPkg/Include/Library/ManageabilityTransportMc > +++ tpLib.h > @@ -0,0 +1,54 @@ > +/** @file > + > + This file defines the manageability MCTP protocol specific transport d= ata. > + > + 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_ > -- > 2.37.1.windows.1