From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web10.3729.1595902027442150792 for ; Mon, 27 Jul 2020 19:07:07 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=RrR/eh8U; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: liming.gao@intel.com) IronPort-SDR: X4G/Z3gL1qetvs+CSpaxsEMLJCeSSVGYDQvVcEllGE6ZW+ju5+iGLFGq1TRDbA3tLreaOLALu/ ieYmpuv+93gg== X-IronPort-AV: E=McAfee;i="6000,8403,9695"; a="151122509" X-IronPort-AV: E=Sophos;i="5.75,404,1589266800"; d="scan'208";a="151122509" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2020 19:07:07 -0700 IronPort-SDR: Ytk+U4nFnJY3eWfW4HfLJhvtp8okkovXVrIWOqbBpknyo5wx0LKb0Dwp15uLclqi/oDZRq8eGi 8qy4WsC1In3A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,404,1589266800"; d="scan'208";a="290006279" Received: from orsmsx107.amr.corp.intel.com ([10.22.240.5]) by orsmga006.jf.intel.com with ESMTP; 27 Jul 2020 19:07:07 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by ORSMSX107.amr.corp.intel.com (10.22.240.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 27 Jul 2020 19:07:06 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.169) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 27 Jul 2020 19:07:06 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oRMMWxFTN+SxmAjoSCDi7rJVLOgfjNJs7uor+eWx25zLZp9Nepi+XacYNDDkRapjtbO6TW0QuZke1vNjdtYSJVGzCTCo5+iLOVbIDQ2+V1FocUI5E04/UO26Senp2jEwAokYScQXnoFviz8YhErXxda6DOP3PBZtV5+Nw39lRiNbgdzY6SA5LzmgnCXTcIzV/z2uNsGSBq/wKpG8Gn2AzwCOFCBaA12+QT98V/NLW/b4WvhDxcfPLkdRLR47gaxLkJkXKgQuDu0oFrhFBlKV8pUGPgySuATYOCKqQyoNiWuPo7UE+YH+GXRJP8oTaHs1BaNHDA7h7eooyrlndjwLaQ== 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-SenderADCheck; bh=qcolqgKpMGcSy0jdiJwMDpdeAPMUqYpNvrJB9+UnVIU=; b=ZIY/X3KuPCilnOr2V2tq3lrCTu/KW0FLrS/E0FxwlevJAsGjBaDJvLPOCtiLLylSAIt5egAnDeKkvGHut8X3R2NSGjO3KA+uxk/rLlThY+1S4mEkMTQSYGS81Dvg12FRSOoVaEw2Ux3Fe8XmOvLoyjAZASBAebWAyu+eH4/cflxqxDM9kreuB0cDfacV3pxssjpyj3Mr7yxtDvQzqI/7aNVyTLf8FZEiwDpq6Ug5fBrXuTvDTM5vgu6Q45Dz7YR557A1i4AywoiF9Iuc3o6jZ4eUyBfeu+GIEnU5HJGKtMqy4Vy36CjuBpoEd/YeD/PKIAM8K9EgeQ77VDPC52LaFQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qcolqgKpMGcSy0jdiJwMDpdeAPMUqYpNvrJB9+UnVIU=; b=RrR/eh8UZBr9lDPYsAIap4C1rxpS+KCabcNrlJ3oB09NNo8aCYt2IsHBEPqI9Lb1JsISxQVWX447Q9D5heURXVtUAgwLbqOtQN7aDW7FerJionuNmIDPFWOVzkAfMvs6WzBwziiLguC3VLPTFPVzthdaW5D3ghGEXkRCt1UG1/c= Received: from MWHPR11MB1630.namprd11.prod.outlook.com (10.172.55.7) by MWHPR11MB0080.namprd11.prod.outlook.com (10.164.204.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.28; Tue, 28 Jul 2020 02:07:05 +0000 Received: from MWHPR11MB1630.namprd11.prod.outlook.com ([fe80::7847:b564:1b55:b67e]) by MWHPR11MB1630.namprd11.prod.outlook.com ([fe80::7847:b564:1b55:b67e%6]) with mapi id 15.20.3216.033; Tue, 28 Jul 2020 02:07:05 +0000 From: "Liming Gao" To: Leif Lindholm , "Javeed, Ashraf" , Laszlo Ersek , Sean Brogan CC: "devel@edk2.groups.io" , "Kinney, Michael D" Subject: Re: [edk2-devel] [PATCH V4 1/2] MdePkg/Include/IndustryStandard: CXL 1.1 Registers Thread-Topic: [edk2-devel] [PATCH V4 1/2] MdePkg/Include/IndustryStandard: CXL 1.1 Registers Thread-Index: AQHWZCG0D7AG/al15Em1JqAuuk3Zr6kbgIJAgAAZOICAAKOCkA== Date: Tue, 28 Jul 2020 02:07:04 +0000 Message-ID: References: <20200724182613.9344-1-ashraf.javeed@intel.com> <20200724182613.9344-2-ashraf.javeed@intel.com> <20200727142442.GA1337@vanye> <20200727161425.GB1337@vanye> In-Reply-To: <20200727161425.GB1337@vanye> Accept-Language: en-US X-Mentions: ashraf.javeed@intel.com X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: nuviainc.com; dkim=none (message not signed) header.d=none;nuviainc.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.194] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b9c0a2c1-2f11-4b85-3596-08d8329aecbf x-ms-traffictypediagnostic: MWHPR11MB0080: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: n1oiUOmPJho8sL7TsmGcOjZ9keGQcFiwDzuL9Z+8ZevE1mNcfFc0PTBJ0ayRhQzkQ1euVydyrC9ouQNI2G/oQ0PGvmfaXl1u4qn3IgVV3WDxM0w30BHiikPVOBS0UGDKD/5fwDbLVVr1/I07pN+wA7WCtmdY/uqTmLI0YMNEH5tE0rBPAn3ap1oyC7Z6PI53dYiOUTWl9qA9idyauZQWBElBf3LsSl6crAODKVzTFvFbZzFHimAOLODjC+yDqFqVk4rsBLCRIYkqrJg9AHrLMUfvB4e3ogKfN7+o64pIWFSU8pPhoOrDAmQvow51BGP+P2aHQ5TIv48kLB6yL0wgLzg3Ejp0+dIP9tE9dDfmVb0wOALZP3rwvd/A42C7tAk9IJReaukoIRxa5FVYOvAjSA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR11MB1630.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(39860400002)(376002)(136003)(366004)(396003)(346002)(86362001)(478600001)(6506007)(53546011)(55016002)(4326008)(8676002)(2906002)(26005)(8936002)(316002)(54906003)(966005)(9686003)(110136005)(71200400001)(107886003)(19627235002)(66476007)(7696005)(186003)(83380400001)(52536014)(66556008)(64756008)(66446008)(66946007)(33656002)(76116006)(5660300002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: gSqjRpat20Rx/+yu/jRCOnMPRR/GEwRMxw9gIRyLds580oeyiqqELMws5f5YOTYqo+vX2XRWWw2mlC/ajI/WogUrbUNFh9Kn7V9CYbXDk5yZZ/zb5QsPA+rF+EFBE+eS7oUGi57xo7pgg1PKflrhnErv8hx2cOB3NdlzOzacGJ0axIqYOiEqTlEpTCzb6tMy2vffVhqj/pn9W4aAJpVKYNsmuAm3gyYfplK291fCN+iq4KsDOPpsmxB9oCdCMbSdmkRK+su9xug8JJeFdN+7uGjW2v4t71DBT3qR016XvGqMatc9yHZHTvRn8rZ57ExbeN4TK3hqAESt/wgQrBDktDwj5CaszJfLzDRVNqXVluEjWNQkazyxA/489ttJ4To61Y/MzD6yfsYJNmvWvR27gKtaXjcIh0eTrw1Bm3PCQ1gZqsl012JR5l3jBGy21nxr4MLJHEHQnLfIH770/HG7Z4aYkItjmK2We7IMPa3tydvOMzi9lLw+dQW89OgMrunC MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1630.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b9c0a2c1-2f11-4b85-3596-08d8329aecbf X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jul 2020 02:07:04.9822 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 8tvpYW4vf9PehaH94WZBamQxe5DL5atXIX3mIVY1pFjydOdceaGLQDaN9A3F6ybpBSUWfZ3z6XLI5cjIYrSPgg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB0080 Return-Path: liming.gao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable Leif: -----Original Message----- From: Leif Lindholm =20 Sent: 2020=1B$BG/=1B(B7=1B$B7n=1B(B28=1B$BF|=1B(B 0:14 To: Gao, Liming Cc: devel@edk2.groups.io; Javeed, Ashraf ; Kinney,= Michael D Subject: Re: [edk2-devel] [PATCH V4 1/2] MdePkg/Include/IndustryStandard: C= XL 1.1 Registers On Mon, Jul 27, 2020 at 14:55:03 +0000, Gao, Liming wrote: > > > diff --git a/MdePkg/Include/IndustryStandard/Cxl11.h=20 > > > b/MdePkg/Include/IndustryStandard/Cxl11.h > > > new file mode 100644 > > > index 0000000000..933c1ab817 > > > --- /dev/null > > > +++ b/MdePkg/Include/IndustryStandard/Cxl11.h > > > @@ -0,0 +1,569 @@ > > > +/** @file > > > + CXL 1.1 Register definitions > > > + > > > + This file contains the register definitions based on the=20 > > > + Compute Express Link > > > + (CXL) Specification Revision 1.1. > > > + > > > +Copyright (c) 2020, Intel Corporation. All rights reserved.
> > > +SPDX-License-Identifier: BSD-2-Clause-Patent > > > + > > > +**/ > > > + > > > +#ifndef _CXL11_H_ > > > +#define _CXL11_H_ > >=20 > > We should not be adding macros with a leading _ - these are intended=20 > > for toolchain use. >=20 > This style is align to other header file. This is the file header=20 > macro to make sure the header file be included more than once. Yes. The other headers should also be changed, but in the meantime it would= be good to stop adding more incorrect ones. https://edk2-docs.gitbook.io/edk-ii-c-coding-standards-specification/5_sour= ce_files/53_include_files#5-3-5-all-include-file-contents-must-be-protected= -by-a-include-guard [Liming] Thank for your point. I miss this one, too. Now, most cases don't = follow this rule. So, there is no good example for the reference.=20 I agree the rule to apply the strict check for new adding file. I will chec= k whether ECC has this check point.=20 > > > + > > > +// > > > +// CXL Flex Bus Device default device and function number //=20 > > > +Compute Express Link Specification Revision: 1.1 - Chapter 7.1.1=20 > > > +// > > > +#define CXL_DEV_DEV = 0 > > > +#define CXL_DEV_FUNC = 0 > > > + > > > +// > > > +// Ensure proper structure formats // #pragma pack(1) > >=20 > > And this pragma has no function whatsoever with regards to any of=20 > > the register definition structs below. It would be much better if=20 > > the structs requiring packing (_DEVICE, _PORT, ...) were grouped=20 > > together and only those were given this treatment. > >=20 > > #pragma pack(1) is *not* a safe default. > >=20 >=20 > I know pack(1) is for the compact structure layout.=20 Yes. And it should be used when structs need to be compacted. All of the bitfield structs are single-variable structs, so the packing has= no effect on them, other than setting the struct alignment requirements to= 1 byte, which will not be correct (or efficient) on all architectures. [Liming] Yes. There is no effect for bitfield structure. This header file s= till includes some structure, such as CXL_1_1_DVSEC_FLEX_BUS_DEVICE. They m= ay have the compact alignment requirement.=20 @Javeed, Ashraf, can you conform it? > > Now, one final comment - and this is more of a project feature > > suggestion: > > Industry standard headers is something fairly special, even in=20 > > comparison with the rest of MdePkg. *I* would certainly like to=20 > > ensure I don't miss changes or additions to them. > > Could we set up a dedicated group of reviewers for this folder only? > > This need not affect the actual maintainership of MdePkg, just=20 > > ensure more eyeballs (or screen readers, braille terminals, ...) hit=20 > > updates here? > >=20 > > i.e. something like the below to Maintainers.txt: > >=20 > > F: MdePkg/Include/IndustryStandard/ > > R: Leif ... > > R: ... > > R: ... > >=20 >=20 > This is a good suggestion. IndustryStandard needs more feedback.=20 > Can you send the patch to update Maintainers.txt? Sure, I can do that. Any thoughts on others to add than me? [Liming] Thanks. Laszlo or Sean may be added if they are also interested in= IndustryStandard header file.=20 Thanks Liming / Leif