From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web09.7781.1664437348196599000 for ; Thu, 29 Sep 2022 00:42:28 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=aKdgGc0J; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: ray.ni@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1664437348; x=1695973348; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=NrcsfgN3vh+6GOoSmUSPa65sCpFWpN5tcLvpoiujNxY=; b=aKdgGc0JnDNWdlIjqiIPaybnWHKMbLwXpIzmk7d4VHu1vVE59FeWyEV4 qVojfcyP2Ygc3zBLVJ8UPcHwFhzYBMfEJuxuwAUuZ9rBu3uR9/Jvj2eMW Fzx23mAvf8cck2rWiHm/Dadt2GvB8Z5TX5qrhCyeHHg46IPGJe+uhcJXY sxh5FSv7QUVPApZOoeS3LFNHYpefx+Y6GSgDZpwPDtbVjKmodcECkk99W RTH+7QzHoumJqax1JkbSELOH5wqgFvsPtnBJeZQlepaBqZ1v8VOG4XvZE HkLA/2/NJgNFglnqTGDY5YhpLejKk8ATTts+FujSif29sPI0H8SyhpAym w==; X-IronPort-AV: E=McAfee;i="6500,9779,10484"; a="281536353" X-IronPort-AV: E=Sophos;i="5.93,354,1654585200"; d="scan'208";a="281536353" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2022 00:42:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10484"; a="599893514" X-IronPort-AV: E=Sophos;i="5.93,354,1654585200"; d="scan'208";a="599893514" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga006.jf.intel.com with ESMTP; 29 Sep 2022 00:42:18 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 29 Sep 2022 00:42:18 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Thu, 29 Sep 2022 00:42:18 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.107) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Thu, 29 Sep 2022 00:42:18 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c/Hngrf0qyuxZjIWEYtWOQ62oNrXZpD6oa4CwQBcSGg7KRIvsnYtRW7KAKekL9wilKB7zHpgnilx4dTeNtYF3GbmiIY0LWPpO8qsXgDyjmD/W9+omTOkIPcIcaddszXwIr+bgxAXTxz4hZwMNrUDAjygfJtIzrn5ZANKXKKoTc3rLtt8gEVrcUhPe1zB8CNhnZ5IB0X7Pr63nSrgyt5F36Rai4dErlzjmGs9f7rInRBZKYPdrNauQHj2W/FJLY7Hd7sQ+zFHDVcvmjxgsgL0LEOiv1u6Ac4iFwLhJ9ZA4FFsE5S08sGaIbx/iX2JYGMjTvGn+Fv4S9kp7lNjzfUBJg== 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=hPNSOntdBahoHLUFa5AXBgVtwt7HiGQrZbTvXyhnOfc=; b=hVNhWtMfpw32k4X1h+Wui0qWaig1Y9lmezkZKaQ3x4CCNgHw968hDPw8se/X2cqn8v7zanyIMW9dZ/4j+AFKKsA5HtMDxHR73avduXTFsbELz/jG5du4oaA4uYs1AOwj51Ix5EcV68ifTRwaF0JDolYcvGEmz8FH7X69mjPG1o/Mo+35Cs90mwwhDrwbUggBm4Uk+NhRWe+pgBpOg75gUIvm/+JzEd3vtXC1dXyQbmB6ibAyxD4H7bvUDu0Wv33S9iccdbg5KMGT8spIAwY65mJOtdiEal64Zph4YR7WHJPoF0E9XB38xrx786HExjahzQKphxpOn/YhG64rlAxaXg== 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 Received: from MWHPR11MB1631.namprd11.prod.outlook.com (2603:10b6:301:10::10) by SA1PR11MB6783.namprd11.prod.outlook.com (2603:10b6:806:25f::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.20; Thu, 29 Sep 2022 07:42:11 +0000 Received: from MWHPR11MB1631.namprd11.prod.outlook.com ([fe80::483f:4bb5:a15f:f571]) by MWHPR11MB1631.namprd11.prod.outlook.com ([fe80::483f:4bb5:a15f:f571%11]) with mapi id 15.20.5676.017; Thu, 29 Sep 2022 07:42:11 +0000 From: "Ni, Ray" To: "Attar, AbdulLateef (Abdul Lateef)" , "Chang, Abner" , Sunil V L , "devel@edk2.groups.io" CC: "Kinney, Michael D" , lichao , "Kirkendall, Garrett" , "Grimes, Paul" , "He, Jiangang" , 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: AdjPX4ZZG0rDXS4WTdOIWvoiYOLYcgC9rttQAC2dmIAADxJbkAAiVmtwAABqVrA= Date: Thu, 29 Sep 2022 07:42:11 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: 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=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MWHPR11MB1631:EE_|SA1PR11MB6783:EE_ x-ms-office365-filtering-correlation-id: b8f5733b-a621-4e2e-f348-08daa1ee1e8e x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: sU3BQctgGtgOaAzb2sLdhPP16IHJYTQ9qJ47GoojebPx4iIA5QyiGEJUk+BBSOwCljEt9/nxSy6u1hnTHXj9Eu5atIO0E2KUsW0QH/FffO76C46D/NlU/znlkkWA5obViTbuiwhGL5I4MI1z7RFQ8mOt313swlJmpN2FGVFbGU8PYOTC/d5o38xMDACcOTyJnZ6FxNxz8E41HrxXwFDr5lRtuKaC9c8o/nsgtuHHWCe+owaa8OSBHWolk64DCf/C3rLCaZhnDHoWYdFMra2gMzCuUrR9GRf6NJZTqYnHIHQ/xOtEv9Pbx1ydetsu2r8qCH9ZRvFRT65JCz6zObDDcjEN6pl2W2gV5bIDI2Rx8Sot5nOqkg4QU8LeUcrJ3L5lq044aAwmd4rep8pM7OVrg1jMFklEKX+NWmuzqtGSq9Ah6nvX7b9pbkzPLdkJQu8qa04iCM1S6NIf3AfOv5DjxLoR31DjJrZfUi/qcuTVOfqCjx6LkDUt0wr78A9dOz6lm6ri+QsNlF8qyOE7VTR+Rk4eofEEmDnudE/Hi7mmhhIDw3cCfPXNZGUu7INl2nSUb9xuxuLSuFihs/sm4XxkeWhYCG/EqMOKdsAjGBqqk6gU7E/qamWjo/bWzsy3Tqm51aWGnSLooDKcC/ghbAm3NIFK6OmZHQm9kxGbQFCoX6ZQ2nE3LKHnkzWmcMkpN2At2i61cU/gGeb7M9ayIyYKywGCLnJb+KD+VEVsio+2e1hllraZ3TUqhI4D7hb6QlBulaPM+iFUuIe1Cc2ODjQbaofDGN27LmacrdnI1CJn6k+h7CNGh0jRc3orYrDspaDHoHec/UgviMbYcf/jwnzfnA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR11MB1631.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(136003)(396003)(39860400002)(366004)(346002)(376002)(451199015)(71200400001)(45080400002)(478600001)(966005)(186003)(54906003)(110136005)(33656002)(6506007)(122000001)(5660300002)(38070700005)(7416002)(2906002)(7696005)(66946007)(66476007)(66446008)(66556008)(8676002)(64756008)(4326008)(76116006)(316002)(26005)(9686003)(19627235002)(53546011)(52536014)(8936002)(55016003)(82960400001)(41300700001)(83380400001)(86362001)(38100700002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?9Fh8fZsSGTRwNiz8j6IVeLF3yQE4Xkj+e+wzMZd8HRMSHvxeceHE1LaPjVP3?= =?us-ascii?Q?HlBp69eS6qy2W9TPQAmBpXlvaS7qpHhcWDsbTZ0eYjPaWDTRjnwRqxAAYvZG?= =?us-ascii?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hF1NB9h1/ONntxaLC?= =?us-ascii?Q?7yvvy0EeUot2jyNiGEUyzent8DZLA+WE1ng1AU+IEpvnAkZsCaNcDRJDisDm?= =?us-ascii?Q?n1mlLuyRHPavOyGmXnPDjq2Y2itfdX1+GjO8wgJ9vzAi1PhYcLrbGbVHzYb0?= =?us-ascii?Q?0xpipNf5907Z3f6/NbXpgiEpG3NHcpCrJN4RrXBb7JmcIGUwpIJMkdltcjiV?= =?us-ascii?Q?3Muv0z4+Zi+xW2H6SC3qM811mv8Nqkl6+4Q+24lBepYTEHohbsbStV3eiddk?= =?us-ascii?Q?f66RVb4rHAqLl6Qfs863YiECuauvUycttygBWy1SIMfka/8QRLD6opPHmSAr?= =?us-ascii?Q?i8+xlRXNoIt6GVMA2L4aNLpyNKOkFjLOWE+TFwwI5Xu8lZShI5YPRZvgATku?= =?us-ascii?Q?qkHn7OzC7iFdZ84ZSGzAh792MUw/ECafF337smfliqbSVPInhrKKWBUiBn8S?= =?us-ascii?Q?iiv1slWig5lhx7bZmigm7vbC/GOOfys/dzPSKDtJWlt8n9QyYZMDYO9snVLL?= =?us-ascii?Q?MNfaJfXqCXd7JdWJKjrZmtfwITbd/DwdYNbEdY9Ac72OYnSyfPpaIXps16Q2?= =?us-ascii?Q?UH/KBoRR6Bg+W/ZrMlQ=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1631.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b8f5733b-a621-4e2e-f348-08daa1ee1e8e X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Sep 2022 07:42:11.2694 (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: ypoFiZG0zXywD99h5NJ2N/zGmz1HDFlfAwgI28fqkoGHCdMIZOKTsU3FQu/dPOpkfCWYTmo00LIYlOjRr/PZpQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB6783 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Abner, Comments in https://github.com/tianocore-docs/edk2-CCodingStandardsSpecific= ation/pull/2#pullrequestreview-1124763311 We can discuss more in tomorrow's meeting. > -----Original Message----- > From: Attar, AbdulLateef (Abdul Lateef) > Sent: Thursday, September 29, 2022 3:11 PM > To: Chang, Abner ; Sunil V L > ; devel@edk2.groups.io; Ni, Ray > > Cc: Kinney, Michael D ; lichao > ; Kirkendall, Garrett ; > Grimes, Paul ; He, Jiangang > ; Leif Lindholm ; > Andrew Fish > Subject: RE: [edk2-devel] The principles of EDK2 module reconstruction fo= r > archs >=20 > Hi Abner, > Looks good to me. > Reviewed-by: Abdul Lateef Attar >=20 > Thanks > AbduL >=20 > -----Original Message----- > From: Chang, Abner > Sent: 28 September 2022 20:31 > 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 fo= r > archs >=20 > [AMD Official Use Only - General] >=20 > I just had created PR to update edkII C coding standard spec for the file= and > directory naming. We can review and confirm this update first and then go > back to the principles of EDK2 module reconstruction for archs. > Here is the PR: > https://github.com/tianocore-docs/edk2- > CCodingStandardsSpecification/pull/2 >=20 > The naming rule is mainly for the new module or new file IMO. Some existi= ng > module may not meet the guidelines mentioned in this spec. Thus we need > the principles of EDK2 module reconstruction on the existing module to > support other processor archs and not impacting the existing platforms (e= .g. > rename the INF file or directory to meet the guidelines). >=20 > 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 sol= ution. I > think at least we can abstract the protocol structure and protocol instal= lation > under CpuDxe\ and have the arch implementation under arch folder. We can > discuss this later after we confirming the guideline and principles. >=20 > Thanks > Abner >=20 > > -----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 > > for archs > > > > Caution: This message originated from an External Source. Use proper > > caution when opening attachments, clicking links, or responding. > > > > > > 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 > > > review > > existing code including to-be-upstreamed code and decide how to go. > > > > > > > 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 > > > > What do you suggest with above example? > > > > 1) Common INF for all architectures - but modify INF alone, no X86 > > folder creation. > > > > 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. > > > > 2) Common INF (CpuDxe.inf) + create arch folders X86, X64, IA32, > > RiscV64 etc > > > > IMO, this is probably the best approach. What would be the challenges > > with this? > > > > 3) Separate INF for arch like CpuDxe.inf for x86, CpuDxeRiscV64.inf for > RISC-V. > > > > This again probably is not a good idea. > > > > 4) If the module/library is specific to one arch (ex: SMM(X86), > > SBI(RISC-V)), then create separate INF. > > > > Thanks! > > Sunil