From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (NAM12-MW2-obe.outbound.protection.outlook.com [40.107.244.60]) by mx.groups.io with SMTP id smtpd.web11.15776.1667738183260414460 for ; Sun, 06 Nov 2022 04:36:23 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=I05xyrDF; 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.244.60, mailfrom: abner.chang@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Cmazq2buGtR0yTgwJwNFrFKNeCSUWcn/eElsU95tdkqxKVlZRe5YHCyZ+MMeRGN3lqPgKEQiXSBPJiw2iAhdqPxNno1f84cZJOnuNljh81asrdDsA9xi0tKs2vmlmkEmxONS9IPRXaDgTmeI2hmKTUxn27o6r1YjqYQtewH/le6crmoW3W6Il6nKKP35rZLD4ugosLiNGJku2ayMaXnkmUU5JkcTMtD6KbPxA1Pk4oVhkIoH9U0yhbGwKbm3yjVnEis2VedIpOIMsMHxtnD4hqdk4Q8U/EUplJPSaTK8WXx3vHK375o9vRDbseb6XJfYy8vOnZmYl91/tCHLYg673Q== 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=0B9oLh+h3g5uPXhJI4MBaExhK+W7NvOAhFQTzdeR36o=; b=MVyLgAFF6H1NLZKqvBlSHewL5b9G+Ke5dumbBqUCZfVA2YaAV61fNAcL6okHBrTRL+uvLPqKemGP3ilqoXIYNMjPnJpBerZnmLeeRZYvHK4G4l4lIq0wla3Pv/za0GxR31aIiU1/TGzG17Srx6bXrbehMv8A00z7VJTE/zMfNle4EhExK+4l4y3SMEv8JARVQGc4O3AM5JYSwBRkX5Ddi3E8fxWt6ktj+EN9EVNiO08qC5xCGkRrk2SZk3EdBiMHg2M0RxEmBLuJfTOIQdmPaSKB0NgqjSN5NM0KJ71twOgWJiJkmOAgWovErwsglBGZ2AEpZB8hRl76yH6FPi5AnQ== 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=0B9oLh+h3g5uPXhJI4MBaExhK+W7NvOAhFQTzdeR36o=; b=I05xyrDF16W/RTNf1LdsUqvR2y1VUhP4Bdn8KERGM1J4Ul28Tuh1TIFdvUS3hJaqbm888dLXnEvTwMPgiAJEarLinJg05ebMvMH54bKEfLrrh/uuYysCe2T6AMqlmqd6FNKXtftLLExhKyNqmsODYTaHN5QCr93wQ1aZaTo4Kbg= Received: from MN2PR12MB3966.namprd12.prod.outlook.com (2603:10b6:208:165::18) by BL1PR12MB5850.namprd12.prod.outlook.com (2603:10b6:208:395::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.25; Sun, 6 Nov 2022 12:36:21 +0000 Received: from MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::ce0a:283e:839:34bd]) by MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::ce0a:283e:839:34bd%3]) with mapi id 15.20.5791.026; Sun, 6 Nov 2022 12:36:21 +0000 From: "Chang, Abner" To: "devel@edk2.groups.io" , "sunilvl@ventanamicro.com" CC: Eric Dong , Ray Ni , Rahul Kumar Subject: Re: [edk2-devel] [edk2-staging/RiscV64QemuVirt PATCH V5 17/30] UefiCpuPkg/CpuDxe: Refactor to allow other architectures Thread-Topic: [edk2-devel] [edk2-staging/RiscV64QemuVirt PATCH V5 17/30] UefiCpuPkg/CpuDxe: Refactor to allow other architectures Thread-Index: AQHY7GPhsYJ6fm9xAk6qXZP3QPHPOa4x393A Date: Sun, 6 Nov 2022 12:36:21 +0000 Message-ID: References: <20221030132842.54077-1-sunilvl@ventanamicro.com> <20221030132842.54077-18-sunilvl@ventanamicro.com> In-Reply-To: <20221030132842.54077-18-sunilvl@ventanamicro.com> 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-11-06T12:36:19Z; 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=81df597d-3ec1-4f5c-b6fa-06465bf0973f; 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_|BL1PR12MB5850:EE_ x-ms-office365-filtering-correlation-id: e135bfce-5515-4659-337b-08dabff38290 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: uGsYFEHq5MD3pWsBi6SDWLeqvaCDaeWuSGLjbekyrdIiTcE8dTz6WXTCzffyBrs/WzUMXgKDHsYfS6kDMTFfwpCB+rkuRybmQu0sygVWjXRwfQTVszU5IJMq6LB7W2RmApBIoRU//qLCB+iFk89qzwDbELBQIFpZwgdqiiaiBIvPG5jYIsJVHk1ew2eYPAETfnTkF/PxqnimsLtz6xCg0/MG/D2SpManlp/LdI6kLMpnH+FZXyMnuR/hn7bZF48JMT/2umhCxa/X1sYtN3/Q35BjxqIq4laqF29j6XXd5V8wjIvInHtzWMAbke15fKvTkX0ic2gNJrjZrMVvgM/r6Fw9hIyKpMRB4109l2VqFQSio2NJ4d/I/kg+1vLKfLXefKNZTQy2mHscyHiwS9UXvmQ+q/u+qECq4KUJ7Ndh2F44KxsJelCaTPY+4jZlnLGJQkHwnAxmK9lLe+Yv9XHzk87gAsc3XAYExuMT9nJTd4gerV1fWhvuAdviJdGGuODltqmCJzhPVl1QkK+88FlPl4WyAMDJNKiZgW1gzaCWIU+vX3m4oU3F351qIaMqyKYmv96u1gbU9Xg6NLjcs5veZtwR5Q5Cfmdfz359NIFMK103+aG2jvdQIosqV8VL+3xXeu7/Tw007+wl0SJkdfAffjOERExTUQnGy4Z3vQ6YQS1YwbrdK2fh1TKjkN7OfoA7SMbf99mZmhADhcx7sZ03iMYJHnvXalJy2yg6orAG+KHzRARwDSeD7nG/CiP0tqHEI+Rt2NINgL7wZsBO7z3M5pfbD/swiUi4HPMRX59WtCMxKqd3tg5gTeWknFVFLypnSEyybLflVB/bZEYwsBQV3A== 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)(136003)(396003)(366004)(376002)(39860400002)(346002)(451199015)(66899015)(8936002)(5660300002)(41300700001)(33656002)(45080400002)(54906003)(19627235002)(86362001)(71200400001)(478600001)(966005)(316002)(66946007)(76116006)(110136005)(2906002)(8676002)(4326008)(66446008)(64756008)(66476007)(66556008)(26005)(38070700005)(186003)(9686003)(52536014)(83380400001)(6506007)(7696005)(53546011)(55016003)(38100700002)(122000001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-asc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aSTOLGw4GUbah5IbXJXa5ddDFcsOfNHx?= =?us-ascii?Q?JIZa9CphS37viKQ5qIjIA8nkScHEXIXT3n0lZaxaTv+AO9lqzZBpn2w8Xj7Z?= =?us-ascii?Q?GhJs+h4JFmvYavkyOq4puy02El/i+DQbl715oHxWBfroQNmkbvW5FxqrSsNV?= =?us-ascii?Q?NiMGBelg/BzGhDo1zn5jU9ZD0EqTj/A8VqTSOmunRjFPCSLE0qKDjQK8lYGK?= =?us-ascii?Q?6yNVHDyrl+eBlpsdyvjUMuC0PnXmg60LOUD+OWbmZakB0xsTipen2RoDWl9w?= =?us-ascii?Q?gO+Vy5exvtw9M2Cek2q+MAiuTXm3ZZptag7k3OtqXEgY0mS9eENxTN+vTJL5?= =?us-ascii?Q?M70h3uca4XBVQJOveqVeVhHrNdX1ISuNnnSCJg/uYEYCl/z/ERTKV+7gJA6e?= =?us-ascii?Q?HIws2Fgq/FCgSUD04hZb786ayTCxvvi1f3QvtkxznDBT4Z2/wgfz9pOfXrCb?= =?us-ascii?Q?yUCJc+sR1mzGtNCRHAZAOxble3P8Pk2QPGMjVlPhuOy0pl/jc7/eTI0m/l4N?= =?us-ascii?Q?6qDgNnar1DTXp+085Ok6q+kB7iIxpzNyfCsI9MOJGO8AWBr0oCzYu+IAhTa8?= =?us-ascii?Q?iNOU6TqZISRvUivEpEPti8f2K44ZesTjsbEknGvrpa9BIlK0MDcCtEy6JJ7o?= =?us-ascii?Q?aPyuMfZyl9gddubo6w8RCmiRl5IbyvmCrnIMZJEBckdfHkrxz4lJsBCh8UI/?= =?us-ascii?Q?4NXf83zAVPm/zmcwPM6KHGj9UYX+he9FLTTE0N7r?= 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: e135bfce-5515-4659-337b-08dabff38290 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Nov 2022 12:36:21.4636 (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: q/m/eyMGonFIpBZDJxrjPLmbgad2ARjLEVTWB3/OFZBA+1K4gdz+TjGlGMQa2BEqhs+mGa+OzOYu/WKrsnUm2A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5850 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable [AMD Official Use Only - General] This change follows the Directory/File naming guidance for Processor archs/= vendors. Acked-by: Abner Chang > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Sunil V L > via groups.io > Sent: Sunday, October 30, 2022 9:28 PM > To: devel@edk2.groups.io > Cc: Eric Dong ; Ray Ni ; Rahul > Kumar > Subject: [edk2-devel] [edk2-staging/RiscV64QemuVirt PATCH V5 17/30] > UefiCpuPkg/CpuDxe: Refactor to allow other architectures >=20 > Caution: This message originated from an External Source. Use proper > caution when opening attachments, clicking links, or responding. >=20 >=20 > REF: > https://nam11.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fbugz > illa.tianocore.org%2Fshow_bug.cgi%3Fid%3D4076&data=3D05%7C01%7Ca > bner.chang%40amd.com%7C70f25f604a424cb0698208daba7b02ef%7C3dd896 > 1fe4884e608e11a82d994e183d%7C0%7C0%7C638027334732457153%7CUnkn > own%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik > 1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=3DGMUtJAXQA9u > N77LI5Bt6DloS5mQAS2UypwODwmAG20s%3D&reserved=3D0 >=20 > Currently, CpuDxe supports only X86 architecture. To add support for othe= r > architectures like RISC-V, this need to be refactored. >=20 > Cc: Eric Dong > Cc: Ray Ni > Cc: Rahul Kumar > Signed-off-by: Sunil V L > --- > UefiCpuPkg/CpuDxe/CpuDxe.inf | 28 +++++++++++--------- > UefiCpuPkg/CpuDxe/{ =3D> Ia32X64}/CpuDxe.h | 0 > UefiCpuPkg/CpuDxe/{ =3D> Ia32X64}/CpuGdt.h | 0 > UefiCpuPkg/CpuDxe/{ =3D> Ia32X64}/CpuMp.h | 0 > UefiCpuPkg/CpuDxe/{ =3D> Ia32X64}/CpuPageTable.h | 0 > UefiCpuPkg/CpuDxe/{ =3D> Ia32X64}/CpuDxe.c | 0 > UefiCpuPkg/CpuDxe/{ =3D> Ia32X64}/CpuGdt.c | 0 > UefiCpuPkg/CpuDxe/{ =3D> Ia32X64}/CpuMp.c | 0 > UefiCpuPkg/CpuDxe/{ =3D> Ia32X64}/CpuPageTable.c | 0 > 9 files changed, 15 insertions(+), 13 deletions(-) >=20 > diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.inf > b/UefiCpuPkg/CpuDxe/CpuDxe.inf index 235241899222..65961813f74b > 100644 > --- a/UefiCpuPkg/CpuDxe/CpuDxe.inf > +++ b/UefiCpuPkg/CpuDxe/CpuDxe.inf > @@ -29,28 +29,30 @@ [LibraryClasses] > DebugLib > DxeServicesTableLib > MemoryAllocationLib > - MtrrLib > UefiBootServicesTableLib > UefiDriverEntryPoint > - LocalApicLib > - UefiCpuLib > UefiLib > CpuExceptionHandlerLib > HobLib > ReportStatusCodeLib > - MpInitLib > TimerLib > PeCoffGetEntryPointLib >=20 > -[Sources] > - CpuDxe.c > - CpuDxe.h > - CpuGdt.c > - CpuGdt.h > - CpuMp.c > - CpuMp.h > - CpuPageTable.h > - CpuPageTable.c > +[LibraryClasses.IA32, LibraryClasses.X64] > + LocalApicLib > + MpInitLib > + MtrrLib > + UefiCpuLib > + > +[Sources.IA32, Sources.X64] > + Ia32X64/CpuDxe.c > + Ia32X64/CpuDxe.h > + Ia32X64/CpuGdt.c > + Ia32X64/CpuGdt.h > + Ia32X64/CpuMp.c > + Ia32X64/CpuMp.h > + Ia32X64/CpuPageTable.h > + Ia32X64/CpuPageTable.c >=20 > [Sources.IA32] > Ia32/CpuAsm.nasm > diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.h > b/UefiCpuPkg/CpuDxe/Ia32X64/CpuDxe.h > similarity index 100% > rename from UefiCpuPkg/CpuDxe/CpuDxe.h > rename to UefiCpuPkg/CpuDxe/Ia32X64/CpuDxe.h > diff --git a/UefiCpuPkg/CpuDxe/CpuGdt.h > b/UefiCpuPkg/CpuDxe/Ia32X64/CpuGdt.h > similarity index 100% > rename from UefiCpuPkg/CpuDxe/CpuGdt.h > rename to UefiCpuPkg/CpuDxe/Ia32X64/CpuGdt.h > diff --git a/UefiCpuPkg/CpuDxe/CpuMp.h > b/UefiCpuPkg/CpuDxe/Ia32X64/CpuMp.h > similarity index 100% > rename from UefiCpuPkg/CpuDxe/CpuMp.h > rename to UefiCpuPkg/CpuDxe/Ia32X64/CpuMp.h diff --git > a/UefiCpuPkg/CpuDxe/CpuPageTable.h > b/UefiCpuPkg/CpuDxe/Ia32X64/CpuPageTable.h > similarity index 100% > rename from UefiCpuPkg/CpuDxe/CpuPageTable.h rename to > UefiCpuPkg/CpuDxe/Ia32X64/CpuPageTable.h > diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.c > b/UefiCpuPkg/CpuDxe/Ia32X64/CpuDxe.c > similarity index 100% > rename from UefiCpuPkg/CpuDxe/CpuDxe.c > rename to UefiCpuPkg/CpuDxe/Ia32X64/CpuDxe.c > diff --git a/UefiCpuPkg/CpuDxe/CpuGdt.c > b/UefiCpuPkg/CpuDxe/Ia32X64/CpuGdt.c > similarity index 100% > rename from UefiCpuPkg/CpuDxe/CpuGdt.c > rename to UefiCpuPkg/CpuDxe/Ia32X64/CpuGdt.c > diff --git a/UefiCpuPkg/CpuDxe/CpuMp.c > b/UefiCpuPkg/CpuDxe/Ia32X64/CpuMp.c > similarity index 100% > rename from UefiCpuPkg/CpuDxe/CpuMp.c > rename to UefiCpuPkg/CpuDxe/Ia32X64/CpuMp.c diff --git > a/UefiCpuPkg/CpuDxe/CpuPageTable.c > b/UefiCpuPkg/CpuDxe/Ia32X64/CpuPageTable.c > similarity index 100% > rename from UefiCpuPkg/CpuDxe/CpuPageTable.c rename to > UefiCpuPkg/CpuDxe/Ia32X64/CpuPageTable.c > -- > 2.38.0 >=20 >=20 >=20 >=20 >=20