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.43]) by mx.groups.io with SMTP id smtpd.web08.3563.1666146294836588259 for ; Tue, 18 Oct 2022 19:24:55 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=KjK55evc; 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.94.43, mailfrom: abdullateef.attar@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a5TUza+FbickJCXm9Ve6fe99DqbrW3AKDS3PNNe9i1AsLV7gS8xdbt6M55us6LZ2f8oJV/LjJFque5T0wAW5ittMz8uX0PEPSc1vU9rbpqZKYPZjzExmsv5z8ik0El6c2LGum5P4pi745ewc3hM58fdMiQP5EKtW5FQtQleRn2GqctXEwHXRTYQS6xT3mFAgZYaJ+q/ynakXEFowBVO8qpDFarhEdnh6OctjYZ2MgVnYcxd1jvx+pNg1jJcw+HCUZ3uG6hDIFMD1jv6EOAAiyVISLLD6Hcv8MME/Kwmz+gogKXkCOrVPA7DYnhhEre9Q2clZrWcihlzJR5ycEIdpxQ== 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=sSKjPY/QWv3qwiMB5DaRZztDwJt21zkAySrMEhSASgU=; b=fnnTlg6rTwgJaJuxtjCZGFqdtprtwJcjrZbpdig5uygIzG+sl/GAuJrQvgaQ93qT4+svdoyiBmL9gWQlvQs1DyVddMQEQsn5zqnoQaVYv7gDH+Bjzto/Rpl3190BtgvEVVymhGf3yZrUmUEt7O/VlbbPo5sgZBU0rFK3lEPT9Qcd5dTZL738pfS5soX/opSrx70aTUvRFbbrmsPKrkvfFuqtAJm8M6DYdQ57sUaa4RJa9Xii3vehYUNlR92d+l8C2no8MBE5SbjphJzGtIZXjJEVmG46QbSZqfS2HAl77norqEdU1+ZLnrs0eHR7R1BAmcCmrYHNIIBTu4IlzevmgA== 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=sSKjPY/QWv3qwiMB5DaRZztDwJt21zkAySrMEhSASgU=; b=KjK55evcFpvY3itzdgXwfRLgeXoFVXgONe/w5H8NhAyWZyJMZY+6QuILoWt3qC70gt8QHpvtkRKSrcFNa967lL2q50u5NqtQnGryST3XSijGdJzc81Vuyn1t+wCKPjB1eNodhJXkKsKkbe8qng4OQS3MvhjAyqjYQO6VQjsCpHo= Received: from IA1PR12MB6458.namprd12.prod.outlook.com (2603:10b6:208:3aa::22) by MN0PR12MB5858.namprd12.prod.outlook.com (2603:10b6:208:379::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.33; Wed, 19 Oct 2022 02:24:52 +0000 Received: from IA1PR12MB6458.namprd12.prod.outlook.com ([fe80::6170:9bdb:7130:57fe]) by IA1PR12MB6458.namprd12.prod.outlook.com ([fe80::6170:9bdb:7130:57fe%4]) with mapi id 15.20.5676.017; Wed, 19 Oct 2022 02:24:52 +0000 From: "Attar, AbdulLateef (Abdul Lateef)" To: "Chang, Abner" , "devel@edk2.groups.io" CC: Ray Ni , Michael D Kinney , Sunil V L , Leif Lindholm Subject: Re: [tianocore-docs][PATCH V2 2/2] edk II C Coding Standard: Updates 4.2 and 4.3 sections Thread-Topic: [tianocore-docs][PATCH V2 2/2] edk II C Coding Standard: Updates 4.2 and 4.3 sections Thread-Index: AQHY4IwZFonmt4RXs06ajCbGmGLgwK4VAl8A Date: Wed, 19 Oct 2022 02:24:52 +0000 Message-ID: References: <20221015114757.383-1-abner.chang@amd.com> In-Reply-To: <20221015114757.383-1-abner.chang@amd.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ActionId=004e53d5-44f3-41e3-a07e-b5bdd4d5203b;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ContentBits=0;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Enabled=true;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_SetDate=2022-10-19T02:23:11Z;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; 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: IA1PR12MB6458:EE_|MN0PR12MB5858:EE_ x-ms-office365-filtering-correlation-id: 1cb414c8-eab3-402e-92eb-08dab1791ad4 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 39GKGR7t4//FJkdeWF6LxZwTN3ChEjT3rt9Rfsx9jQghib9HGrPwXppdgiQkv3zDgaAFGtjNcAHRsihSw6csHm0R48/crhmRUtgy6amBaKyFhmLcAHHY+7GYgElyI1WKXCY4kjla5e0wtdb5Vea/yPeEhAWzWI9tXkrNA1VzreRuiIs43MJhaW3skW5XgCwUOpPicUON0rhBVqEURWpopzMGq7t+N5kpNJnQK5h+QYf355qpjT7naAKtYNtIJsfgAmAGBK8q80tEN9H6SpbkyAqAr01Vo/c8uiTzowaHGoi10xHJIdy+xAetOYbsGqv3QY5kS9/oom1/A6pf7WeHD+z4o1g1HHCEGw7HOfbpFx3BjWg4zjggiu5Qiefe5KXHraBvIiY/0igoKwXyio8ZzTnf4zsZCY4MP4OFnghVGBwEvLRyCVr0Z1O9T7WN82jOdYGhZDiHOgk00a07Xe5X5pU3hmhotSttXdG8Ytwzk8lZmxbqhJTA0ud1ar01k2oc99isz3Jq6MEbdaNgl8b9mvG76WJcvDCx8yNZmb/Mjm3SdSe1HABJB8C72V86WP2Drm9HCLc+Rk01miEq94bn8sKNUOSNHR6qRDlY4onjh+afNiNlsnO8MaSySPK7Xf2oll6F9Cm07kCp5+AC+T3KSaSzyAmvZP0oRwk4owUAFFdf+AE30HR4qVh5jwisDKMe28RAJFKyscWYV8WFIaUebw5IyQqhyeQm+vNIP8aTu2chNJjylczXWDDUdSS4tj5MIICFxYWmbvcxdF5lGrya9dEbZQNi/Hniv90tY04wMtc+JB+c2Cl6iL3LzEfW2fcArI/bllpJI/W5ksadOReROA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:IA1PR12MB6458.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(366004)(396003)(346002)(376002)(39860400002)(136003)(451199015)(186003)(9686003)(53546011)(6506007)(26005)(83380400001)(7696005)(2906002)(5660300002)(55016003)(15650500001)(19627235002)(8936002)(478600001)(71200400001)(316002)(966005)(110136005)(52536014)(41300700001)(66946007)(4326008)(54906003)(66476007)(8676002)(66446008)(66556008)(76116006)(64756008)(86362001)(33656002)(122000001)(38100700002)(38070700005)(19607625013);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?eamUn8DXyEZ7WZcmHJQqOklL1En5Gs0S1+zSeMRbdCU/MFfAKBhlSRPY8e3H?= =?us-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6vn6tFUE9c8mhyf?= =?us-ascii?Q?7r7kEssOeNUUFIkaSJ9qgzJgCSQlAWqgNrxGUoNjgD5BsHj5viOcA5leb3DQ?= =?us-ascii?Q?MQ2/40La7TxsT8GA387blFM2gBiV5Cak93kPlE6y6WxNJZ6WVRrLzExE7Dis?= =?us-ascii?Q?Z+8dWaLLcB63egjT+qnYBo2/Z9hsjzXqTvwxTJV96wxejyWsTcCTFvQjMQc1?= =?us-ascii?Q?gqaXIhbm787nU4H99MuCrKKYQyUQE+XZbvCqckVF/sPTMHrC53RvLVA8tuO0?= =?us-ascii?Q?faT+WBm5b1ECGay1SSuo6ur/bUFzbexxFjC90595z+IpCVzgcPHepNko79HF?= =?us-ascii?Q?wWBWLWJ+sQJd/wIt/ZopfCdaw3SvDL29oy/5zsy8AEHIjxEqZ/DBmtT1Sdo2?= =?us-ascii?Q?d0g8hI4T8jH6ostNKGaB5sgFIdLDmhGF4PYzZQuvuOdLBzy5thyqIv0dQEtw?= =?us-ascii?Q?rSugCge260DufEoCV+M7unDc7eqZEB6KKcLOQ0dTA3komzryKqWqtChf15aZ?= =?us-ascii?Q?iB780AsRUGNQA+7VF6ekl31bPdCgEfttxnag+Lh5/8jxjBNuHstuYq5W8gSa?= =?us-ascii?Q?PszWGbMhFXg9pYqaEJKKbaUAs/zi86dlZxV+L0ow/+kd5mCkMp2KO2B2jVI4?= =?us-ascii?Q?VtfSY/9eUp/laLLsme4C1fAb1jPvDRT/psOFcjGW?= MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: IA1PR12MB6458.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1cb414c8-eab3-402e-92eb-08dab1791ad4 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Oct 2022 02:24:52.5176 (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: 4n/CYREX5zXT2bh36+1YkQe698TnRsGcPhWq5e3JRKh1UCSu7hKrRbuME9cb8SBzbUi4TPWZyJKp+1X8yD+Ilg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB5858 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable [AMD Official Use Only - General] Looks good to me Reviewed-by: Abdul Lateef Attar -----Original Message----- From: Chang, Abner Sent: 15 October 2022 17:18 To: devel@edk2.groups.io Cc: Ray Ni ; Michael D Kinney ; Sunil V L ; Attar, AbdulLateef (Abdul Lateef) = ; Leif Lindholm Subject: [tianocore-docs][PATCH V2 2/2] edk II C Coding Standard: Updates 4= .2 and 4.3 sections From: Abner Chang Updates 4.2 Directory names and 4.3 file names for the guidelines of module= directory and file naming. PR: https://github.com/tianocore-docs/edk2-CCodingStandardsSpecification/pu= ll/2/files Signed-off-by: Abner Chang Cc: Ray Ni Cc: Michael D Kinney Cc: Sunil V L Cc: Abdul Lateef Attar Cc: Leif Lindholm --- 4_naming_conventions/42_directory_names.md | 101 +++++++++++++++++++ 4_naming_conventions/43_file_names.md | 108 ++++++++++++++++++++- 2 files changed, 208 insertions(+), 1 deletion(-) diff --git a/4_naming_conventions/42_directory_names.md b/4_naming_conventi= ons/42_directory_names.md index 766ccb1..959a3c9 100644 --- a/4_naming_conventions/42_directory_names.md +++ b/4_naming_conventions/42_directory_names.md @@ -2,6 +2,7 @@ 4.2 Directory Names Copyright (C) 2022 Advanced Micro Devices, Inc. All rights reserved.
+ Copyright (c) 2022, Intel Corporation. All rights reserved.
Redistribution and use in source (original document form) and 'compiled' forms (converted to PDF, epub, HTML and other formats) with or without @= @ -28,3 +29,103 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --> + +## 4.2 Directory Names +Below sections are the directory naming guidelines for EDK II modules. +The guidelines are not just considering the the uniformity of directory +naming, but it also provides the flexibility of directory name +construction for the scenario of different EDK II module designs; such +as the support for multiple processor architectures and vendors. It may +require the further discussions between EDK II maintainers and contributor= s in order to determine the best naming of the EDK II module directory. + +#### 4.2.1 EDKII package directory + +``` +Pkg + + REQUIRED * +``` + +#### 4.2.2 EDKII Module directory + +* The guideline below is applied to all CPU architectures support, specifi= c CPU architecture and vendors support, or the implementation is shared by = certain CPU archs: +``` +[[]] + or +[/[/]] + + REQUIRED * + REQUIRED Base, Sec, Pei, Dxe, DxeRuntime, Mm, Standal= oneMm, Smm, + Uefi. + OPTIONAL The is represented with a BNF, + ::=3D'Ia32' | 'X64' | 'Arm' | 'AArch6= 4' | 'RiscV64' | + 'LoongArch64' | 'Ebc' + ::=3D []* + + Example: Ia32X64Arm or RiscV64LoongArch64 + + OPTIONAL * + +Example: + - SmbiosDxe/ + - CpuDxe/ # First implementation of CpuDxe. + - CpuDxeIa32X64Amd/ # Ia32 and X64 AMD specific implementation= . + - CpuDxe/RiscV64/ # RiscV64 specific implementation. + / # Common files for the RiscV64 and other a= rchs. + - CpuDxe/Ia32X64/Amd/ # Ia32 and X64 AMD specific implementation= . + / # Common files for Ia32 and X64 archs. + /ArmAArch64/ # Arm and AArch64 implementation of CpuDxe= . + / # Common files for the Arm, AArch64, Ia32 = and X64. +``` + +* If the implementation does not have any shared code between phases (e.g. +MdeModulePkg/Universal/PCD). The guideline below is applied to all CPU arc= hitectures support, specific CPU architecture and vendors support, or the i= mplementation is shared by certain CPU archs: + +``` +/[/[/]] + + REQUIRED * + REQUIRED Base, Sec, Pei, Dxe, DxeRuntime, Mm, Standal= oneMm, Smm, + Uefi. + OPTIONAL The is represented with a BNF, + ::=3D'Ia32' | 'X64' | 'Arm' | 'AArch6= 4' | 'RiscV64' | + 'LoongArch64' | 'Ebc' + ::=3D []* + + Example: Ia32X64Arm or RiscV64LoongArch64 + OPTIONAL * +Example: + Pcd/Dxe/ +``` + +#### 4.2.2 EDKII Library directory +``` +[[]][] + or +[]/[[/]] + + REQUIRED Base, Sec, Pei, Dxe, DxeRuntime, Mm, + StandaloneMm, Smm, Uefi. + OPTIONAL The is represented with a B= NF, + ::=3D'Ia32' | 'X64' | 'Arm' | = 'AArch64' | 'RiscV64' | + 'LoongArch64' | 'Ebc' + ::=3D []* + + Example: Ia32X64Arm or RiscV64LoongAr= ch64 + OPTIONAL * + REQUIRED * + OPTIONAL * (Typically name of PPI, Protocol, L= ibraryClass + that the implementation is layered = on top of). + +Example: + - BaseXApicLib/ + - SmmIa32X64AmdSmmCpuFeaturesLib/ + - SmmArmAArch64SmmCpuFeaturesLib/ + - BaseMpInitLib/RiscV64/ # RiscV64 specific implementation. + /Ia32X64/ # Ia32 and X64 specific implementation. + /Ia32X64/Amd # Ia32 and X64 AMD specific implementat= ion. + /ArmAArch64/ # Arm and AAch64 specific implementatio= n. + /LoongArch64/ # LoongArch64 specific implementation. + / # Common files for RiscV64, Ia32, X64, = Arm, AArch64 and + LoongArch64. +``` diff --git a/4_naming_conventions/43_file_names.md b/4_naming_conventions/4= 3_file_names.md index 13e0c63..5714008 100644 --- a/4_naming_conventions/43_file_names.md +++ b/4_naming_conventions/43_file_names.md @@ -1,7 +1,8 @@