From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (NAM11-BN8-obe.outbound.protection.outlook.com [40.107.236.41]) by mx.groups.io with SMTP id smtpd.web08.11662.1664463252143881722 for ; Thu, 29 Sep 2022 07:54:12 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=B0LhIGvj; 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.236.41, mailfrom: abner.chang@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lMfPdb6WvMwxIfsFp/+JALVr7eU2BG8xUAAI/ncbt9YFk1pbdGB+5nEbp/E6z+eZQvWhA06VcwGC73E+EGO27JA43407vsXKt7ttm/FwbxG+SNoL/ttgqBGb3JYVkfiVaij4x7okzHVSYqgDooWq4KSp9W4RWQYNgK6ZtlXBe4Am7Tvn7gJJAVRjULN+gEzfZxjDqs/Hx2Z1BJeiYezYMWqo9edC240g2KQS63IFiDJiNuwt5NU/3anz68xRw//pqqs1rxoMds/FzcLYzIJM5tGbjpQdiWGNEI6UuzLjrDiDKfRMOiNb4NWs7I1NprxZHZYiG7zRCHYG44V8vYTEtw== 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=HLD0qVL5DXj5GVcTVQFBm8SKfhdbhXJkpMClX4/4WTs=; b=VgwvCofgfbyztEO43zJ2Dz/nY5Q9Ix4/8r3A/t8HgGXAPDcGbTN1yH0XxzuGUIwVfl5HjoKozhC5t7OlqdPeaP39KKVUVX5d8CpKWMZQJzdp0xMMy4/tiEndi+k+o9/D4JbnVkpswcATozDZodNzfKxi+q/kWReJZ8OmfJ7eGBb6imcuM+3oWvQctt7bQOIcUoPjpJ777nUDJGWZkOhs3hO/nMRXZL9jmioijiub0BMbY5ayzkpAZk2WbWgXZK7xk54Ujn0R2ULragjB/Xye8rohL4nIwTe98qcVkOOddW/3FOtbXMK1TiIL2rv+9fZ262HmVFZ/UaRtUsjVkdoChw== 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=HLD0qVL5DXj5GVcTVQFBm8SKfhdbhXJkpMClX4/4WTs=; b=B0LhIGvjnRGbcqhsmGMSilFJ0a8vDPK0vOcZJU6i9ydcwF3j6pTaj3tSeNw9kMZ9FucUteEF8TzSvd2fsf7AnR0TmfdfPiQPnWm4E6jCdf6zzd+uaHtiCPXn+4NcXF19xj05C9KuNHS9FsQ0y0kIKF/kKYlji2U3ADhTvxbr9Ao= Received: from MN2PR12MB3966.namprd12.prod.outlook.com (2603:10b6:208:165::18) by PH7PR12MB6394.namprd12.prod.outlook.com (2603:10b6:510:1fe::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.26; Thu, 29 Sep 2022 14:54:06 +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.020; Thu, 29 Sep 2022 14:54:06 +0000 From: "Chang, Abner" To: "devel@edk2.groups.io" , "ray.ni@intel.com" , "sunilvl@ventanamicro.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: AdjPX4ZZG0rDXS4WTdOIWvoiYOLYcgC9rttQAC2dmIAAMr8a8AAOxMIA Date: Thu, 29 Sep 2022 14:54:05 +0000 Message-ID: References: In-Reply-To: Accept-Language: zh-CN, 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-29T14:54:04Z; 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=6d54a623-c01c-4124-b519-65ca189e498a; 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_|PH7PR12MB6394:EE_ x-ms-office365-filtering-correlation-id: 8521e638-c938-4dba-39e8-08daa22a74e0 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: iQZT5/sl5rLL2AFnfV2XlxpC6AL2h88P3Q59Jl1iKrueM5hOivjxfbBLh7CWFD/HLcFXxWxJ/4qniWBXjfeKcRLwIGAqX63eRfVB8l6w2FGAa0iouq6zNaJnOKfeQ3PRo0u+Pm4cf0WH6k0dNPmk+wvCbHjZ8Xuy0Sw87OicmaR/jlx+gDEnL2NKne5ZkmBHjkJuJn5XvCYtETWcJngBzNWUpn8Q8EqTjAU9PtwQPvcOH1yinuOerKzR45XpQ+xm1jp+TfSqZEidaHaPoVLTPPTCwYZXlEvWcgsza9SX722XJOILS8cUltoIHDP60myDkgIjgJpBOsfipnaCYZKza7yLy7W8Yjx9Qc/oFMgGEyUf9pjDWjKbq35ewfrCVeDkIkRtzcFF0lZm6/AH7HbCrdcHvdaY/Az6jcp3qpITHsS8AVihYknf50NwbqkzmuMO8vYXsGHcSI+iDmCWk6veKc/hHRDMPYW/9UWaToSlNzbODsPo4cfGrzBTt7VUJtBaa5ijT7/BleBwdV2amoApwQ7/5EjEp2XCov4ZV26kjckklrRH8vTGlauk8GvMa/8bFRi5WWxwVQ8UZ2eTvhCk0A6bU6SRD//FilTFFiHNBwXELGBKu1v9sU8xHwXlc8uw2Y/W4sX/NtZuPwAewdPvlMPkEU66mbSDnb+lFZWPeAVvi18tczq8EiZvQwNRYNg9kqWyYwn6dXnl/uRt0+Vq5tPho6FhJOaIn0TCEXHxr9EfUXFEbPUfOpLqs0kPeZo1EPycOzRmacfRKYQ6QtLjGH2upKS2GlzncsbFwxD+6bA9tmEES93hazym9NN/Ij8Pjzs/6i/2tKigb/89ztF+Zw== 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)(346002)(136003)(396003)(366004)(39860400002)(376002)(451199015)(2906002)(66899015)(83380400001)(86362001)(53546011)(478600001)(966005)(5660300002)(8936002)(52536014)(64756008)(55016003)(66946007)(4326008)(8676002)(66446008)(66476007)(66556008)(38070700005)(41300700001)(33656002)(45080400002)(76116006)(316002)(54906003)(122000001)(110136005)(26005)(71200400001)(9686003)(7696005)(6506007)(38100700002)(186003);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?BZPF5Qq+3XWitFxHt0aac5Zi6KdD0zxd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twSu7ZjWKwtkzzAGYiRM9HOw67MMZs8/AbbhEy40sbbsH7ypxU3sIgv?= =?us-ascii?Q?/U0+dsgX+wBhKMbEAHojIuH0+OI+4wlEKvM7PPa10Z+4DuUdTnAz7QEUqMWQ?= =?us-ascii?Q?vcp9uGwOBf5nwmctySTAHYA2EaA1CQRO+cKKiLMH9y+itBmE4Rj3Y/CC+qLE?= =?us-ascii?Q?zG4chCODG4d0qtHzdjHcIG3/D0JrVj3jzHILrNJ7MmJW2vkKDIwmSIcC55I4?= =?us-ascii?Q?v2DebYv42FKmljnu9r1hLMIf5ZA6NSFDuIZXfUT0XlnbGtC+S9EkCEMRXNCS?= =?us-ascii?Q?lmVk3H6/l5WHS5cp4+OckE3BdOmCaKCcVXrqhHyj4FRCUOE12e9jPMYgUm1k?= =?us-ascii?Q?dCCgnwcSDtyKwN36HDv0JTFUvOBIRFjrzLkHMxY1jG1vxMKM4MR8ufuplruF?= =?us-ascii?Q?Ir9JZ0ndNco5ku0Rb0Si6qUWUxz5mkvBIg2wM5V+vNxuJkjpzk6xgyusadF9?= =?us-ascii?Q?JzSIZGdFIV+d4OKN/Mn7F+TRZ993wKlKjkRLAkZ0nKmPsJISH/cXlOoKo/PN?= =?us-ascii?Q?PetfjWg5R5Zi6S92Zy+2kb4+K8GVptXfzYR6TwBkEvfkptyUUjiwo2eKms4u?= =?us-ascii?Q?zCS/ArF98h7CT8YF0ZYLIu4ZaiT/Aqwk3LsYRbzqDD2qrbC2zi7mORXiqBS7?= =?us-ascii?Q?RTaaESyI5zVnaAFe8dE=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: 8521e638-c938-4dba-39e8-08daa22a74e0 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Sep 2022 14:54:05.9212 (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: lzZ/vINsq/XZcvodckz4m1ciYcze4Y7/9Sb8JueyUVmaqxj8Hd/+bn9pC4kPDw5b+otMHTf6LI146/w1TUKGzg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6394 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable [AMD Official Use Only - General] Hi Sunil, One more thing other than the module reconstruction for archs before you se= nding patch to edk2: Not sure how would you do on migrating the RISC-V code from edk2-platforms = to edk2. Did you make some other changes to the RISC-V CpuDxe on edk2-plat= form? Please keep the files history and send the patch for the migration first. = Then have the follow up patches for your changes if any and also add the Ve= ntana license. Below branches could be the reference for this migration, https://github.com/changab/edk2/commits/RISC-V-MIGRATION-EDK2-PR https://github.com/changab/edk2-platforms/commits/RISC-V-MIGRATION-EDK2-PLA= TFORM Thanks Sunil. Abner > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Ni, Ray > via groups.io > Sent: Thursday, September 29, 2022 3:48 PM > To: devel@edk2.groups.io; sunilvl@ventanamicro.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 > Sunil, I don't have concern with your changes. > Perhaps you can also move all existing source files to X86 folder. >=20 > > -----Original Message----- > > From: devel@edk2.groups.io On Behalf Of Sunil V > > L > > Sent: Wednesday, September 28, 2022 3:34 PM > > To: devel@edk2.groups.io; Ni, Ray > > Cc: abner.chang@amd.com; 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 > > > > 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- > &data=3D05%7C01%7Cabner.chang%40amd.com%7C > > > 84150fde7ae94437a06908daa1eee77a%7C3dd8961fe4884e608e11a82d994e18 > 3d%7C > > > 0%7C0%7C638000344717043181%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiM > C4wLjAwMDA > > > iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C& > amp;sd > > > ata=3DP0QZ8%2B3IxaTnoEJPYOn3SgDLGhLZohPna53RoX6o2sc%3D&reserv > ed=3D0 > > staging/commit/bba1a11be47dd091734e185afbed73ea75708749 > > > https://nam11.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fgith > > ub.com%2Ftianocore%2Fedk2- > &data=3D05%7C01%7Cabner.chang%40amd.com%7C > > > 84150fde7ae94437a06908daa1eee77a%7C3dd8961fe4884e608e11a82d994e18 > 3d%7C > > > 0%7C0%7C638000344717043181%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiM > C4wLjAwMDA > > > iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C& > amp;sd > > > ata=3DP0QZ8%2B3IxaTnoEJPYOn3SgDLGhLZohPna53RoX6o2sc%3D&reserv > ed=3D0 > > staging/commit/7fccf92a97a6d0618a20f10622220e78b3687906 > > > > 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 > > > > > > > > > > >=20 >=20 >=20 >=20 >=20