From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (NAM04-BN8-obe.outbound.protection.outlook.com [40.107.100.61]) by mx.groups.io with SMTP id smtpd.web10.8977.1664377249064619467 for ; Wed, 28 Sep 2022 08:00:49 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=5ckKDQNa; 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.100.61, mailfrom: abner.chang@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J4Gh3xt7FprwktewLYcqwSuQlbUtcCJIYan7kCtK1V/JF7h057IqE4LIATubQ4qZzF/+oeC1obwsdQrVOoBGlvg/hoF9laoQin/miQ5+IPlxnhlyOdZamOYfaqStBafGwPR//9y34FWCrdh3wo2fH98/x+6IjnB+PgXdXWwJgqjQEc/heRIuDmDAvHdCeHrOaCOhn57Sj6NEeotFsypZXtjId26W70VN0eN9oDCwEss6i2uUlNfZgqyYtrYBmKeAPmDtJ+wTHBGRcj+BBKFGmA5jJSbesX6i1CSXgp/1v4zbl3xWeYTOQ25UXfXWHqwCavK2EaAD2jLnny+VqNzrAA== 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=W1wAzTNz3TDy8uj79G22+B5TYXt1qZV3rlXihkpXSYk=; b=LtIWRdZIrRw4eRBiQ+DNtFOsIgTji0j5oMbUADOwQuaeY/Qpi4Y/IKDYhauwBZR2kU6+rqYlbAHhzTbw7v/SKt0KjIX1nJiWm1+LZYrlZg71zZoHt662EjA4mgy+oM0DS6rvNe4nYSnlRZRskZW+U4gsNLuSxMm4409mG07RRt2oCUlhvYNXmFsZ7gJuZB5n6yDrANrXQTKo0xV0rXC8K5Topd1lr0zig5oQEzdWTe42kra098GbQDfLrU9u3A5w2hNSBkoWT5eLA6Yspb3Ky4OT5pf1+QiEjkSJc/0UxkepfTEGlvSOcduTB2Do0L5mw5BGr29kn/PHGhw0qIlONQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; 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=W1wAzTNz3TDy8uj79G22+B5TYXt1qZV3rlXihkpXSYk=; b=5ckKDQNaY5L0nCGwKCdBoywHEVjS++pQZ4c7Yjgop8fC8gyiG+GwafrHGUQZkyMfO9p2Dpbf+uU8QahfOwMTudg6T12zHBeadZn0hw5LnUm4HLJ4nNXkTf30249wrjd93b4NTINAKusu78ebxuPRZ/2JR7PKMwDs4IdNvcr2Ve4= Received: from MN2PR12MB3966.namprd12.prod.outlook.com (2603:10b6:208:165::18) by DM4PR12MB6661.namprd12.prod.outlook.com (2603:10b6:8:bb::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.24; Wed, 28 Sep 2022 15:00:45 +0000 Received: from MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::998b:f1a2:b183:43be]) by MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::998b:f1a2:b183:43be%4]) with mapi id 15.20.5676.017; Wed, 28 Sep 2022 15:00:45 +0000 From: "Chang, Abner" To: Sunil V L , "devel@edk2.groups.io" , "ray.ni@intel.com" CC: "Kinney, Michael D" , lichao , "Kirkendall, Garrett" , "Grimes, Paul" , "He, Jiangang" , "Attar, AbdulLateef (Abdul Lateef)" , Leif Lindholm , Andrew Fish Subject: Re: [edk2-devel] The principles of EDK2 module reconstruction for archs Thread-Topic: [edk2-devel] The principles of EDK2 module reconstruction for archs Thread-Index: AdjPX4ZZG0rDXS4WTdOIWvoiYOLYcgC9rttQAC2dmIAADxJbkA== Date: Wed, 28 Sep 2022 15:00:45 +0000 Message-ID: References: In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: msip_labels: MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Enabled=true; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SetDate=2022-09-28T15:00:30Z; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Method=Standard; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Name=General; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ActionId=936c2003-c641-4521-b45f-7c76248bcf2d; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ContentBits=1 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN2PR12MB3966:EE_|DM4PR12MB6661:EE_ x-ms-office365-filtering-correlation-id: f215e279-68c5-4ff1-0526-08daa16238c9 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: bR4jVlWVKCsDHKWtmsMryaMH5ynzqdb1Ze4LbbgXeWJDmGfokr7F0D/SNk8jgZnrRadi321bqPori/3i2Js9KkhO4Z2zOPG8928GhQnPGmaQrBs1Nwupgl26fu8ewQ0XhtZTmq9bTUHhlIFsokkHNdCvPHVqoyhlfqf/hndDzunY7ndcJLqCCRO7tTjYoQxM6GRS9GdWWUzfjD2dI37siIhyHAqC+vjrTtyTAM/ftniyK+JLpIqkkfRs2t5MTku6wI6UawIM84FEWZkSBsrMcQawPkBVSh33/V4Z9vY+fY3DMrLH62Lw2kIP9CXVE1L3XB48iiKQSsm9P3KqgQu3Qi2+7uZj8+0Wh5jjCn0l7S7laWwGU5Zv4dRAojzMoFZgriMLVG7XMmvqPyAISS2ee0j6hwBgPKKIaHDtMgwfc3enUsne/HBU4CkwCBG1V4gZIhsC2Y8diwJweN+D1S1XEnP0fWH3wVr9xp5ZnBkvdFWCVzpddBWJHZ15YEaDPCIdPpmka5V0uT9Ts+pMwhhMYipssNLDLMG0w0VtknNZlDX7C/WxwfKc2HmESiBIYAm++gYWIAOKac/uNgkY5zCeGnai6uqSYkLm5IwnxZtIRchxedi0APMRQxF+q/Esb+Fs0rONZ5xXukQpwUYmvRUKJW+5U00K3iFs3iqhwBLpWfmWUavGHkr3BaJIO5KTn8OHmUouvwrkq/G9NukZV0ly1mim/y5e8HT6cFAwh/K0lPNOpRbmVJe9R63Up6Y/qTo7YkkNNzL9zhKtgZDfLn/VdA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB3966.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(39860400002)(376002)(366004)(396003)(136003)(346002)(451199015)(38070700005)(52536014)(71200400001)(5660300002)(8936002)(26005)(966005)(122000001)(66446008)(7696005)(9686003)(110136005)(55016003)(478600001)(54906003)(76116006)(66556008)(186003)(4326008)(6506007)(83380400001)(316002)(8676002)(41300700001)(45080400002)(53546011)(66476007)(33656002)(64756008)(86362001)(66946007)(2906002)(38100700002)(99936003);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?PzTo2I8H/tbZpXE5oVgv9dgqKQRocU57Olyvcj3YIZ/vz011kugbEv4BwMYg?= =?us-ascii?Q?X18YOtcPlCiLCSPL4HfX606A4RYSdeqlgLtnz46JrcVgcjpXg3B2EI6uLQjw?=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U0LV/hGcHAJD3ZVfjAhW4kjrGo8?= =?us-ascii?Q?mBZq5m0GVveL0GqhGQqv1N+8yug1MEQpF/xELwzJDgwzXOto2DDSF0d7Vsqj?= =?us-ascii?Q?phEptawCfvzz/+lOvWg073nVYYfBiE1egB7vjYjZQzsSKPBK9eNqB7ryK6KG?= =?us-ascii?Q?Ijryei622pqaj8UIdi2f8POpgg0g7AKOFr7tTkWN3piAHnwRRSTZRAxvA78H?= =?us-ascii?Q?qaie6a50QmZMJ3mN71O78/PdXj4+KpSTtSEGVlhw5b1Tfl85tPlArSpNkvuM?= =?us-ascii?Q?LyKWaNWAdM5EBQ7MrFlrawWFpw2BAVJSTO1be7D5p95JWclYjLO+Lx7RZ1Zp?= =?us-ascii?Q?yrb3dlvbVINGTF+61tABMIlxBP6IalRuw3u1oLqAx29DM0mjsMZ2DWzy5dZo?= =?us-ascii?Q?L/iMwah49qFghi1SK/bqpUK7HvlHNFkDjF2pypc50GF5lqKnxh30On8QOuJY?= =?us-ascii?Q?iXyfTxNZgWZhAeeZyp32PIC7dEiIZneFpf3smhdZi6fBKFiTwtU7XQrSdr9e?= =?us-ascii?Q?aDjoaIcvoZkj/wjk9uJYsFG9iEv9vxN9JSt2cCgFIBP6WVSaz6Gdy7XzVsK6?= =?us-ascii?Q?rpRyv5o4c+LSLAu7dxU=3D?= MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB3966.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f215e279-68c5-4ff1-0526-08daa16238c9 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Sep 2022 15:00:45.7442 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: xzDb6ZIi96ryJMKjxiFV3qPC4JE24ad5K5HmmI6bIVjk7hghrLAAg0UtQd9OockmoIYTLXn53+G9WWH+Vl28CA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6661 X-Groupsio-MsgNum: 94467 Content-Language: en-US Content-Type: multipart/mixed; boundary="_002_MN2PR12MB39664BF726EF6AFE498F991EEA549MN2PR12MB3966namp_" --_002_MN2PR12MB39664BF726EF6AFE498F991EEA549MN2PR12MB3966namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable [AMD Official Use Only - General] I just had created PR to update edkII C coding standard spec for the file a= nd directory naming. We can review and confirm this update first and then g= o back to the principles of EDK2 module reconstruction for archs. Here is the PR: https://github.com/tianocore-docs/edk2-CCodingStandardsSpecification/pull/2 The naming rule is mainly for the new module or new file IMO. Some existing= module may not meet the guidelines mentioned in this spec. Thus we need th= e principles of EDK2 module reconstruction on the existing module to suppor= t other processor archs and not impacting the existing platforms (e.g. rena= me the INF file or directory to meet the guidelines). Sunil, seems RISC-V CpuDxe meet the guideline. Please check it. Just feel that having CpuDxe.c to Riscv64 folder is not quite a best solut= ion. I think at least we can abstract the protocol structure and protocol i= nstallation under CpuDxe\ and have the arch implementation under arch folde= r. We can discuss this later after we confirming the guideline and principl= es. Thanks Abner > -----Original Message----- > From: Sunil V L > Sent: Wednesday, September 28, 2022 3:34 PM > To: devel@edk2.groups.io; ray.ni@intel.com > Cc: Chang, Abner ; Kinney, Michael D > ; lichao ; Kirkendall, > Garrett ; Grimes, Paul > ; He, Jiangang ; Attar, > AbdulLateef (Abdul Lateef) ; Leif Lindholm > ; Andrew Fish > Subject: Re: [edk2-devel] The principles of EDK2 module reconstruction fo= r > archs >=20 > Caution: This message originated from an External Source. Use proper > caution when opening attachments, clicking links, or responding. >=20 >=20 > On Wed, Sep 28, 2022 at 03:33:45AM +0000, Ni, Ray wrote: > Hi Ray, > > > > 1. When a new arch's implementation is introduced to the existing > module which was developed for the specific arch: > > > > 1. The folder reconstruction: > > > > * Create arch folder for the existing arch implementation > > [Ray] Do you move existing arch implementation to that arch folder? It = will > break existing platforms a lot. > > > > * Create the arch folder for the new introduced arch > > [Ray] I agree. But if we don't create arch folder for existing arch > implementation, the pkg layout will be a mess. > > > > [Ray] Hard for me to understand all the principles here. Maybe we revie= w > existing code including to-be-upstreamed code and decide how to go. > > >=20 > Could you please take a look below changes which is trying to add RISC-V > support for CpuDxe? > https://nam11.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fgith > ub.com%2Ftianocore%2Fedk2- > staging%2Fcommit%2Fbba1a11be47dd091734e185afbed73ea75708749& > data=3D05%7C01%7Cabner.chang%40amd.com%7Ca419e6a010d34fde464b08d > aa123e080%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C63799947 > 2732494527%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIj > oiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sd > ata=3DVq6pJLnn8yJrJhFZn7LfLbZzrtpG4n1VLWgAil6J38U%3D&reserved=3D0 > https://nam11.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fgith > ub.com%2Ftianocore%2Fedk2- > staging%2Fcommit%2F7fccf92a97a6d0618a20f10622220e78b3687906&da > ta=3D05%7C01%7Cabner.chang%40amd.com%7Ca419e6a010d34fde464b08daa1 > 23e080%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C63799947273 > 2494527%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV > 2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata > =3DxFmvUv58vh4AUAM17Qy9G5jZWFZlK2Ozt3njpG1e8%2BY%3D&reserv > ed=3D0 >=20 > What do you suggest with above example? >=20 > 1) Common INF for all architectures - but modify INF alone, no X86 folder > creation. >=20 > This is what I have done in the commit above. May be of least impact to > existing code since it is only INF change. But like you mentioned this is= bit > weird that X86 files will remain in root folder directly along with some > common files. >=20 > 2) Common INF (CpuDxe.inf) + create arch folders X86, X64, IA32, RiscV64 = etc >=20 > IMO, this is probably the best approach. What would be the challenges wit= h > this? >=20 > 3) Separate INF for arch like CpuDxe.inf for x86, CpuDxeRiscV64.inf for R= ISC-V. >=20 > This again probably is not a good idea. >=20 > 4) If the module/library is specific to one arch (ex: SMM(X86), SBI(RISC-= V)), > then create separate INF. >=20 > Thanks! > Sunil --_002_MN2PR12MB39664BF726EF6AFE498F991EEA549MN2PR12MB3966namp_ Content-Type: message/rfc822 Content-Disposition: attachment; creation-date="Wed, 28 Sep 2022 15:00:33 GMT"; modification-date="Wed, 28 Sep 2022 15:00:44 GMT" Received: from BY5PR12MB4950.namprd12.prod.outlook.com (2603:10b6:a03:1d9::11) by MN2PR12MB3966.namprd12.prod.outlook.com with HTTPS; Wed, 28 Sep 2022 14:45:20 +0000 Received: from DM6PR06CA0081.namprd06.prod.outlook.com (2603:10b6:5:336::14) by BY5PR12MB4950.namprd12.prod.outlook.com (2603:10b6:a03:1d9::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.17; Wed, 28 Sep 2022 14:45:18 +0000 Received: from DM6NAM11FT094.eop-nam11.prod.protection.outlook.com (2603:10b6:5:336:cafe::a6) by DM6PR06CA0081.outlook.office365.com (2603:10b6:5:336::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.17 via Frontend Transport; Wed, 28 Sep 2022 14:45:17 +0000 Received: from mail02.groups.io (66.175.222.108) by DM6NAM11FT094.mail.protection.outlook.com (10.13.172.195) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.17 via Frontend Transport; Wed, 28 Sep 2022 14:45:17 +0000 From: "Chang, Abner via groups.io" To: "devel@edk2.groups.io" CC: Ray Ni , Michael D Kinney , Sunil V L , "Attar, AbdulLateef (Abdul Lateef)" Subject: [edk2-devel] [tianocore-docs][PATCH] edk II C Coding Standard: File and directory naming guidelines Thread-Topic: [edk2-devel] [tianocore-docs][PATCH] edk II C Coding Standard: File and directory naming guidelines Thread-Index: AQHY00juTHL2ux10oU64gcAHK5NhVg== Sender: "devel@edk2.groups.io" Date: Wed, 28 Sep 2022 14:44:49 +0000 Message-ID: <17190D706DD1B11D.9603@groups.io> List-Help: List-Subscribe: List-Unsubscribe: Reply-To: "devel@edk2.groups.io" , "Chang, Abner" Content-Language: zh-CN X-MS-Exchange-Organization-AuthSource: DM6NAM11FT094.eop-nam11.prod.protection.outlook.com X-MS-Has-Attach: X-Auto-Response-Suppress: All X-MS-Exchange-Organization-Network-Message-Id: 9a5163b4-e072-4bfa-c5ce-08daa1600fa9 X-MS-TNEF-Correlator: X-MS-Exchange-Organization-RecordReviewCfmType: 0 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 x-ms-exchange-organization-originalclientipaddress: 66.175.222.108 x-ms-exchange-organization-originalserveripaddress: 10.13.172.195 x-ms-publictraffictype: Email x-originating-ip: [10.180.168.240] authentication-results: spf=pass (sender IP is 66.175.222.108) smtp.mailfrom=groups.io; dkim=pass (signature was verified) header.d=groups.io;dmarc=bestguesspass action=none header.from=groups.io;compauth=pass reason=109 delivered-to: mailing list devel@edk2.groups.io mailing-list: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io list-id: dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1664376317; bh=j0avLITSMr0gvph0TdbYjtBqgLbVLr3gc4SzIzBWY48=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=i6tL7JPOc9C441qJZEXF0JFjbDJFqH6m7vpsAuq7jAK6ODgz076TnTChvIh3eqtqj1p xQku5S/W/M1+djzJtJDooWVFK04g+PNGKBcAED8gX4mRmvZIIU81DwbdOv8vfTDz0KNrb unOlEl4EogNlc1UW5f2tzeuRu95CdDoNk4Y= x-ms-office365-filtering-correlation-id: 9a5163b4-e072-4bfa-c5ce-08daa1600fa9 x-ms-traffictypediagnostic: CO1NAM11FT084:EE_|DM4PR12MB5889:EE_|DM6NAM11FT094:EE_|BY5PR12MB4950:EE_ x-forefront-antispam-report: CIP:66.175.222.108;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail02.groups.io;PTR:mail02.groups.io;CAT:NONE;SFS:(13230022)(4636009)(451199015)(336012)(66899015)(19810500001)(54906003)(956004)(2616005)(6486002)(7846003)(118246002)(19627235002)(36736006)(36756003)(83380400001)(8676002)(76796012)(966005)(4326008)(7596003)(7636003)(9316004)(6666004)(356005)(33656002)(34756004)(7696005)(1096003)(6862004)(5660300002)(26005)(19607625013);DIR:INB; x-microsoft-antispam: BCL:0; x-ms-exchange-crosstenant-network-message-id: 9a5163b4-e072-4bfa-c5ce-08daa1600fa9 x-ms-exchange-crosstenant-originalarrivaltime: 28 Sep 2022 14:45:17.6969 (UTC) x-ms-exchange-crosstenant-fromentityheader: Internet x-ms-exchange-crosstenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d x-ms-exchange-transport-crosstenantheadersstamped: BY5PR12MB4950 x-ms-exchange-transport-endtoendlatency: 00:00:02.6099158 x-ms-exchange-processed-by-bccfoldering: 15.20.5676.017 x-eopattributedmessage: 1 x-ms-exchange-crosstenant-authas: Anonymous x-ms-exchange-crosstenant-authsource: DM6NAM11FT094.eop-nam11.prod.protection.outlook.com x-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.28; Wed, 28 Sep 2022 09:45:07 -0500 arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bWiUsOdY+/ZQsiFTUH4JHwxscPaYV/FRvEtAelXksWRUS3l3lAF5+iXuIw4wiT0h02ffXPD+cslJezOqI1Mc9sm2Nu+ZjA4kveruojaEgLVgguSG5MvdsJ+erMoSzYgvQpHTD2bwGjjvHRessoivU0myXWr1dXCZfuz2y/M+nVNUaG77U7UZ3/k5yWW2OgXYl5wskox4SJ3r/wj9Pzwuls7iw8u0gHUK3cKWYoKDFXBikjzaQOHcw+VSeTKKKxcxhLFbk9VEbnNtahp64QMV5Mjb2y7WGzkR2tlcz0MU+abwJIl0lwa4VNiJ7sqcEAYN53zoU7xlHEMdejKvQU1CxA== 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=lm3xrOLtT6gqaKl8LLIjpsjFhqdO1dG/mAjgtQA3TLU=; b=Ga4pDRQ0FrHYNSANPluS8O+gA9t7Y9rIvBJZwAV66T6+T+CVw7Gjl1nLVGIkXQJ5x4IbZJvSTNDlQSAfoC9Wb0h1VpFaa53Fw8SK/K8++cniDe5uG2zeJq4YTcm0U4SZp192jPGekBjqOE4hlPBojmGUOB+GQHuwqdrxYapl2PwY0JJxijm32JL1pKL/2icnzYEYtkgYYQvxVbl1xRZah+So+doCY497j/kb4wn/KjSkVvrbhTO9BBJ8mP6e4+rTerVl/rJ8RbUTH2+vTU3RQYN8pmU1n5JzcoRa73YzMsBmAJeot0egnQeJc9/RuFkLD+DYTLdPwf9olBv/KPObhQ== 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 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info-original: qkZVbwzV+z3TpfBYb64y6qbGsZVKc/QN5ReQu0ZNthLFkys76e/vpyH/Q9LX3UiK4tiGjEx4tkcYvMkIJd1ODgLZmvNZyNAuZQnVemLRAIdsNm/OhusCAeXWD32Da8IM84Vxg5LNQDl6vZxyQYqI9DKUWwE2U8wDuvLqzaJW2aTD5WhBcQaG+mmUrbRZmV9ZnenmXn80wpSeHGvEiG86NvZr9+XBV0ywfIj7waTv+7ZdWg/WselqQylFDBN/6EvyQo7O1j7WwAZMEYQFWj9zVhkEVt5Qn09UjZhTmFZsFlb5fRjtSCHZa5dk2hqMTj7RuutBHiMPKa3XICCkOnyJl89hRO5MEbNAIZLWZZSAPDgiHf6HHhW+QcDxHLIe6Z414MzYl18tgL+pIMnXOBQbRfVBXWyoNmSv5pkBmWnNv5/Fs+g0JqNMyjfsgO2g5sHsdd/1D3MQHWsJIjXtiY4TAAYcUQoKTk29jMtdAsGRxQZMWnxbazGAAY2d8j/AJLgGi9hoDg/Agy7VQTesbegqtVqs7g0nPHOohdZ4f1R6Qasf3wIXwkw9KS7PxQXNAdhVs5UUXwNVt7muG3fjPGjoZM3VJVpQwLrqKU6rKojt1n6E1ovn3h5t8BVyhKl7er+0LULERLnLnJazhnKgeURuXHeCMyc4Mrm7LPlzmOwDmNhriJj44FoHOMB1XES9ALZnS7IXbNsaZyBaeXJfGT50LddqQ341oLFO18DzbZK/VXyYrgR/1NmpB+OYO3DQ83H0UKe7tiSuankBl3DpQTbfcDtfvJmXnDUsQpuP6dVhTOORkoa6xG3NZiCIBAZO4+WHnjKRotr1UqXWnyIWTLfZI8uXN567oW0HrqJsUbzA6cQ= x-ms-exchange-transport-crosstenantheadersstripped: DM6NAM11FT094.eop-nam11.prod.protection.outlook.com x-ms-office365-filtering-correlation-id-prvs: 7775f9c6-5dbf-403a-b85c-08daa1600b17 x-ms-exchange-antispam-relay: 0 x-gm-message-state: 28yRNnqgnDY46Yqb5qkJ0V8Jx7039027AA= x-clientproxiedby: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) x-ms-exchange-atpmessageproperties: SA|SL X-Microsoft-Antispam-Mailbox-Delivery: ucf:1;jmr:0;auth:0;dest:C;OFR:CustomRules;ENG:(910001)(944506478)(944626604)(920097)(930097); X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?CFAnuZmchEgaeulHNQepur0HHSxmlh5nkrzvtr8uwpQeBL6Cj43n5NihVyqV?= =?us-ascii?Q?7ORP40tVaQch718kmnT9gfeQWPZXuVVL24k3C2D33W+NnY/2FuDICNyMo6W6?= =?us-ascii?Q?N5i1MqSbWOEijrBaR7UBur+d4YFwbUdissg2yh7xVbW2s1wloSO3Gv99ZsRz?= =?us-ascii?Q?QokDMjB1CneAYohtNy1nDOP07IXKl1YOo9tcOMNUCv2kAimwrdMKMS4+HDUG?= =?us-ascii?Q?OFmcphTdu3IQAQVooG9WeevOyI6zw/Hby2Ot2kCjarGTPrt4RyouUc+K0Mac?= =?us-ascii?Q?1GeOEH8b6m1kuLgpyKIsm18g9zTTuU6JtyaCSU51UF+Mi5BRiywkgT4aH7Lm?= =?us-ascii?Q?UU31LD35ozm8LwqHoZfPhc+lsHrT2G49cRdd9svXxytPVurp4D92aBdHYZf3?= =?us-ascii?Q?w0sx4Df7saCW/fb6Yg3CfDyHTq3jNzibh/g4hssMSx87vl56SxYroNrf1lYe?= =?us-ascii?Q?5qsiV/v5lIHQ18lJRxpoSHonb+eJFBTOL+/iIIgVuscvBMgIunJeajfcDLEM?= =?us-ascii?Q?rgzQpxTulezbnt5nbAtJG0zKPNtRs+O6Cfo4FyRH6UkDXO7Oy2FBV+G1a6Uv?= =?us-ascii?Q?wjLblN89ecYVUPyRQQJd9IMUZR4MPL+UcEDfANkgUc4+63y9RRezHhy7y22Y?= =?us-ascii?Q?n/2W3akCj0C3ACO84wRKsmn4TpzoTcTo9a1/7km4M6Guhc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mOWYIWVqVQIVKk+N+L3Nt6c/Fw/k60PaYXq6xF4hQTVff?= =?us-ascii?Q?nizxTozBJtULxjFvjXlKQvhJ8ZrMjNXLWK77S3e2kPbmFNunxi2kxgHWjjc4?= =?us-ascii?Q?Dz9FUdUTO26ziBpCGskO2y4ahGBBgYKriQi9DwaBzCg/w3y40f4sdoSzJyzL?= =?us-ascii?Q?tuqQL29YEJQDbQde1z3+aNGL2v1hDJgU7U4esBPMpYCvkKTMb2/+MQewEPS0?= =?us-ascii?Q?dxASLnp/q/kkMxoZhEigr6tfjx3kvag/1nz8FNO+iSed/fSBMPFVVm+A40EQ?= =?us-ascii?Q?sSFchQ9j4CbosSZ5+g=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Caution: This message originated from an External Source. Use proper cautio= n when opening attachments, clicking links, or responding. From: Abner Chang Add file and directory naming guidelines for EDKII modules. Also consider the processor architecture and vendor implementation. This is the draft version to community for the wide discussion. PR https://nam11.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fgithub.= com%2Ftianocore-docs%2Fedk2-CCodingStandardsSpecification%2Fpull%2F2&da= ta=3D05%7C01%7Cabner.chang%40amd.com%7C9a5163b4e0724bfac5ce08daa1600fa9%7C3= dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637999731204161847%7CUnknown%7CTW= FpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3= D%7C3000%7C%7C%7C&sdata=3DO3PPK9Mfeh5HfDb%2FR5p3aLq1dh5X0eR80HbLGHxgD%2= FM%3D&reserved=3D0 Signed-off-by: Abner Chang Cc: Ray Ni Cc: Michael D Kinney Cc: Sunil V L Cc: Abdul Lateef Attar --- 4_naming_conventions/42_file_names.md | 124 +++++++++++++++++++++ 4_naming_conventions/46_directory_names.md | 114 +++++++++++++++++++ 2 files changed, 238 insertions(+) create mode 100644 4_naming_conventions/46_directory_names.md diff --git a/4_naming_conventions/42_file_names.md b/4_naming_conventions/4= 2_file_names.md index f948763..e7c10b5 100644 --- a/4_naming_conventions/42_file_names.md +++ b/4_naming_conventions/42_file_names.md @@ -58,3 +58,127 @@ regular expression: That is, a letter followed by zero, or more, letters, underscores, dashes,= or digits followed by a period followed by one or more letters or digits. + +### 4.2.5 File naming guidelines for modules + +Below sections are the file naming guidelines for EDK II meta files and so= urce files. + +#### 4.2.5.1 EDK II meta files within a package + +``` +Pkg.dec +Pkg.dsc + + REQUIRED * +``` + +#### 4.2.5.2 EDK II INF file within a Module instance +* If the implementation supports >=3D2 or all CPU archs: +``` +.inf + + REQUIRED * + REQUIRED Base, Sec, Pei, Dxe, DxeRuntime, Mm, Standal= oneMm, + Smm, Uefi. + +Example: + CpuIo2Dxe.inf +``` + +* If the implementation of CPU arch or vendor shares some code in the modu= le. Or the implementation is only for the specific CPU arch or vendor. +``` +.inf + + REQUIRED * + REQUIRED Base, Sec, Pei, Dxe, DxeRuntime, Mm, + StandaloneMm, Smm, Uefi. + OPTIONAL Ia32, X64, Arm, AArch64, RiscV64, LoongArch6= 4, Ebc, X86 + (X86 implies Ia32 and X64). + OPTIONAL * + +Example: + CpuIo2DxeAmd.inf +``` + +If the implementation does not have any shared code between phases. The mo= dule INF is located under \/\ or \/// (see section 4.6 Directory Names). + +* If the implementation supports >=3D2 or all CPU archs: +``` +//.inf + + OPTIONAL * + REQUIRED Base, Sec, Pei, Dxe, DxeRuntime, Mm, Standal= oneMm, Smm, + Uefi. + REQUIRED Same as + +Example: + PCD/Dxe/Pcd.inf +``` + +* If the implementation of CPU arch or vendor shares some code in the modu= le. Or the implementation is only for the specific CPU arch or vendor. +``` +//.inf + + OPTIONAL * + REQUIRED Base, Sec, Pei, Dxe, DxeRuntime, Mm, Standal= oneMm, Smm, + Uefi. + OPTIONAL Ia32, X64, Arm, AArch64, RiscV64, LoongArch6= 4, Ebc, X86 + (X86 implies Ia32 and X64). + OPTIONAL * + REQUIRED Same as + +``` +#### 4.2.5.3 EDK II INF file within a Library instance +``` +.inf + REQUIRED Base, Sec, Pei, Dxe, DxeRuntime, Mm, + StandaloneMm, Smm, Uefi. + OPTIONAL Ia32, X64, Arm, AArch64, RiscV64, Loo= ngArch64, + Ebc, X86 (X86 implies Ia32 and X64). + OPTIONAL * + REQUIRED * + OPTIONAL * (Typically name of PPI, Protocol, L= ibraryClass + that the implementation is layered = on top of) + +Example: + SmmAmdSmmCpuFeaturesLib.inf + SmmIntelSmmCpuFeaturesLib.inf +``` + +#### 4.2.5.4 EDK II source files within a Library/Module instance + +``` +.c +.h +.c +.h +/.c +/.h +/.nasm +/.S +//.c +//.h +//.nasm +//.S + + OPTIONAL Ia32, X64, Arm, AArch64, RiscV64, LoongArch64, Ebc= , X86 + (X86 implies Ia32 and X64). + OPTIONAL * + +Example: + IA32/SmiException.nasm + X64/SmiException.nasm + SmmCpuFeatureLib.c + SmmCpuFeatureLibCommon.c + IntelSmmCpuFeaturesLib.c + AmdSmmCpuFeaturesLib.c + + Or, + X86/IA32/SmiException.nasm + X86/X64/SmiException.nasm + X86/IntelSmmCpuFeaturesLib.c + X86/AmdSmmCpuFeaturesLib.c + RiscV64/JustAnExampleLib.c + SmmCpuFeatureLib.c + SmmCpuFeatureLibCommon.c +``` diff --git a/4_naming_conventions/46_directory_names.md b/4_naming_conventi= ons/46_directory_names.md new file mode 100644 index 0000000..e4df796 --- /dev/null +++ b/4_naming_conventions/46_directory_names.md @@ -0,0 +1,114 @@ + + +## 4.6 Directory Names +Below sections are the directory naming guidelines for EDK II modules + +#### 4.6.1 EDKII package directory + +``` +Pkg + + REQUIRED * +``` + +#### 4.6.2 EDKII Module directory + +* If the implementation supports >=3D2 or all CPU archs: +``` + + + REQUIRED Base, Sec, Pei, Dxe, DxeRuntime, Mm, Standal= oneMm, Smm, + Uefi. + REQUIRED * + +Example: + CpuDxe/ +``` + +* If the implementation is for the specific CPU arch or vendor: +``` + + + REQUIRED * + REQUIRED Base, Sec, Pei, Dxe, DxeRuntime, Mm, + StandaloneMm, Smm, Uefi. + OPTIONAL Ia32, X64, Arm, AArch64, RiscV64, LoongArch6= 4, Ebc, X86 + (X86 implies Ia32 and X64). + OPTIONAL * + +Example: + CpuDxeRiscv64/ +``` + +* If the implementation does not have any shared code between phases (e.g. +MdeModulePkg/Universal/PCD) and supports >=3D2 or all CPU archs: + +``` +/ + + OPTIONAL * + REQUIRED Base, Sec, Pei, Dxe, DxeRuntime, Mm, Standal= oneMm, Smm, + Uefi. + +Example: + Pcd/Dxe/ +``` + +* If the implementation does not have any shared code between phases (e.g. +MdeModulePkg/Universal/PCD) and is for the specifc CPU arch or vendor: +``` +/// + + OPTIONAL * + REQUIRED Base, Sec, Pei, Dxe, DxeRuntime, Mm, Standal= oneMm, Smm, + Uefi. + OPTIONAL Ia32, X64, Arm, AArch64, RiscV64, LoongArch6= 4, Ebc, X86 + (X86 implies Ia32 and X64). + OPTIONAL * +``` + +#### 4.6.2 EDKII Library directory +``` + + + REQUIRED Base, Sec, Pei, Dxe, DxeRuntime, Mm, + StandaloneMm, Smm, Uefi. + OPTIONAL Ia32, X64, Arm, AArch64, RiscV64, Loo= ngArch64, + Ebc, X86 (X86 implies Ia32 and X64). + OPTIONAL * + REQUIRED * + OPTIONAL * (Typically name of PPI, Protocol, L= ibraryClass + that the implementation is layered = on top of). + +Example: + SmmAmdSmmCpuFeaturesLib/ +``` -- 2.37.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#94466): https://nam11.safelinks.protection.outlook.com/= ?url=3Dhttps%3A%2F%2Fedk2.groups.io%2Fg%2Fdevel%2Fmessage%2F94466&data= =3D05%7C01%7Cabner.chang%40amd.com%7C9a5163b4e0724bfac5ce08daa1600fa9%7C3dd= 8961fe4884e608e11a82d994e183d%7C0%7C0%7C637999731204161847%7CUnknown%7CTWFp= bGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%= 7C3000%7C%7C%7C&sdata=3DKKnHsum9mc679b06mYD6s83ovN37LAulBdctW3pT86I%3D&= amp;reserved=3D0 Mute This Topic: https://nam11.safelinks.protection.outlook.com/?url=3Dhttp= s%3A%2F%2Fgroups.io%2Fmt%2F93974077%2F7039027&data=3D05%7C01%7Cabner.ch= ang%40amd.com%7C9a5163b4e0724bfac5ce08daa1600fa9%7C3dd8961fe4884e608e11a82d= 994e183d%7C0%7C0%7C637999731204161847%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wL= jAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&s= data=3Dlpbs%2B0DO5HZJzktqu6juC%2FW%2BAOYyqJsOQg9lSe%2FUwRI%3D&reserved= =3D0 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://nam11.safelinks.protection.outlook.com/?url=3Dhttps%3A= %2F%2Fedk2.groups.io%2Fg%2Fdevel%2Funsub&data=3D05%7C01%7Cabner.chang%4= 0amd.com%7C9a5163b4e0724bfac5ce08daa1600fa9%7C3dd8961fe4884e608e11a82d994e1= 83d%7C0%7C0%7C637999731204161847%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD= AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata= =3D1grbxhLEwUuA%2BbEPu3%2BCEk5p4B4L5czqP%2FAIVhTVOhE%3D&reserved=3D0 [a= bner.chang@amd.com] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --_002_MN2PR12MB39664BF726EF6AFE498F991EEA549MN2PR12MB3966namp_--