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.web11.19450.1665841176243084202 for ; Sat, 15 Oct 2022 06:39:36 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=kKqTBLyg; 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=Qx9W4kCPa1y5n9WHYH+tk/9PnvdxlW5PhCikj6lx2Q0tM9UXGnnsgMP4BW2Rj4Hz4lUqoaHhql+WOsQe18jhVtwVTqZBhutk1Vq5R5MUQC+xmU/Dg4Xjk8YjwvN+8/PZi0BOfmiXY3j9PPqkIervrFyCUI7f+f2p6ZOSvSnezvAvGaDuDaKM/zHS7i9YtaytrkGYdh0I4jAJe3pB8f83eJityu9eDEM4fGqDotFy+yuBRonLCgK7exuaJTvRhf6EoCVblGhUXrwaRFInA26NYuUMkPf9pNN73DT6dyEzD9aFf/7/i42bcfK/kz3JqgTL5Gzfj6raBmLAbf8PQ1UWGw== 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=qcBfjZq4dHigXlsXjZQjTslsitooY+41virDnDhp/+0=; b=mCJrNR/Ak+lquB9niA1UTneIkbWJD7gcGJxlXSMYx0A5OICJaB1BWzHpJwB+l1d3kDtaaVE9pTPVxFabW45G5wQPnxpPPAKww7oFjqEqyWEt/TuayhapBTyET+9OCNp103Zfwt2QZJ5E5fah9NsrAPAv42SNZVRjZZPuAOQS1ynO+jk4ZeSnx2B/xa1l5hiKvrYpr5em7viISB2JdH2avhmPM/0u677VGqudd0JO29dnOEbWO7w/8K7AG37yvNLZ4lQNKc/B3DB8tAKGR1UVAgh2QHNfP7mI+Mw2qXLo866akmFdnuYVT0xh5rMZgHviiAQooPk5XEBLjiueYx4/hA== 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=qcBfjZq4dHigXlsXjZQjTslsitooY+41virDnDhp/+0=; b=kKqTBLygAYx1wQCGRU4f7DoadaF3nNIB5uBvkNEB4OvtJRYQVCui1ZDnVIYGrvBX9xMc03e3rwDMEdAtjloXftMV7xrEpYP1qoKGRcOd3bCYNgvFKgzYXeEXwLDcWAiKguiCFgzDwXjHTIiZnAaymmxGpyyGUt5DRJLZ5YFKcEw= Received: from MN2PR12MB3966.namprd12.prod.outlook.com (2603:10b6:208:165::18) by DM4PR12MB6448.namprd12.prod.outlook.com (2603:10b6:8:8a::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.36; Sat, 15 Oct 2022 13:39:34 +0000 Received: from MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::2eab:b851:827c:1d88]) by MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::2eab:b851:827c:1d88%3]) with mapi id 15.20.5723.030; Sat, 15 Oct 2022 13:39:33 +0000 From: "Chang, Abner" To: "devel@edk2.groups.io" , "sunilvl@ventanamicro.com" CC: Ard Biesheuvel , Jiewen Yao , Jordan Justen , Gerd Hoffmann Subject: Re: [edk2-devel] [edk2-staging/RiscV64QemuVirt PATCH V4 05/34] OvmfPkg/PlatformInitLib: Refactor to allow other architectures Thread-Topic: [edk2-devel] [edk2-staging/RiscV64QemuVirt PATCH V4 05/34] OvmfPkg/PlatformInitLib: Refactor to allow other architectures Thread-Index: AQHY3+zoCLKyzhBbcUyAfKaEMxoE4a4PdwdA Date: Sat, 15 Oct 2022 13:39:33 +0000 Message-ID: References: <20221014164836.1513036-1-sunilvl@ventanamicro.com> <20221014164836.1513036-6-sunilvl@ventanamicro.com> In-Reply-To: <20221014164836.1513036-6-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-10-15T13:39:32Z; 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=9e375d57-bd39-41cf-be7d-6679eabe3f6e; 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_|DM4PR12MB6448:EE_ x-ms-office365-filtering-correlation-id: cb8bfe3f-1917-4ad3-5237-08daaeb2b1f0 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: HnaGKi0Eo/a16xgvhXjhkd0OcE5O72N0YrLqHyKr6vPyRqGqVZMVjLiN6ctSfIas8f7FYjcpTXw/mJbHVwvZiRpK45TDE0z3Bb0NclaA60NdGB7t/gKHZWgvxmzOHYZ+VV0I9m8CG+fH330K6s0PwYR85wV/95s4sugCpaoKC8bFj6YvFIUd9JO8SGXYWnQ96qHb92J08sFoJn1rW+hILhW+hz5pfy01Gg7CjzsTrj0DlrR1Pyf4oAerV51nbHhF9noEJfSA3iO454xUMYMBebEheywvbW8ujtLMXmI2LQsZ8jF5jq02+WM0jz+58+s9ah5E7aosfSA3SeCdHnDcrPqG6zMOnxFtl6/v3aM9D2280r49iObzp0doxeULmTaOOA+SpA1ee50U80LKPsYBI4N6I42hsQkaxCqF///31SyWg+qM/cQ9D/SQLfKNVXnJaCqEWb+drRqNKWpB2P5iyxiDCvZ+7yQ+SiwhZVa3SD+4bdi7dtvkbBY4UY7LTGQg9iUNy++wBNnWVZQRuXe+SAf/ycQlOVuzqr/kMpvmdtljVr0VznDB9rxk8NXBiqO2bX9dlZ54bH6haGM360ruPXM2dzF5WDYP/Rp/kOr2Fl1tYW8CYEfUMzDWSxKa4gVE1qRJl5idDb5Z4iJv4fNp/L3HWFMZZJl1PQqWYT849n7EUMGEc8G4AHE9YZCGHbZPuk7Wdb9jTHOvWiJZ79INXTSJ2D7o1ngGm9FhvId8+MnNsOQXHHq30BUhqRnIJ/01HtS9GP+Wxa2TwED/ZN0leznDbR7///Nkg4pFvbA28iS6YAUmVpoLu6nQH2LzR3Sh9MkbMd+q9FI/2z7Ve6nC3Q== 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)(366004)(396003)(39860400002)(346002)(136003)(376002)(451199015)(966005)(45080400002)(478600001)(66446008)(38070700005)(66946007)(6506007)(66556008)(4326008)(316002)(53546011)(64756008)(7696005)(76116006)(83380400001)(71200400001)(8676002)(110136005)(19627235002)(54906003)(86362001)(122000001)(41300700001)(26005)(38100700002)(33656002)(186003)(9686003)(55016003)(8936002)(2906002)(5660300002)(66899015)(66476007)(52536014);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?/ekHTjHoVcFFBQT+Tl+FnBD1gp88GunRo6wDc8uU5/EpWUmkL4uUqCGXek2I?= =?us-ascii?Q?xEUrWVTl4NG2uiE+LAxuGdZHwXerR2rpqX1/ptfPCfBaCN0EDHOV/CC+ODeg?= =?us-ascii?Q?D2FjBwKbOzE7gobbEL5sfn1RlnwO7ziPISiMXGWfuynZGQTZl9t2jGljKnTh?= =?us-ascii?Q?guvftkzqT4n6V2J1kPQIxYekHaFU9jMuMdpln4oZdgLFSjPAZH3871T4TtQj?= =?us-ascii?Q?exb25/qhOFB/Et9xGIX1tVcyfGkYMZInOQxAccQjC+4QfxvP50GcOEPfULD9?= =?us-ascii?Q?aeuNXdefbLteI6TKnxf3ymgKNx2gNL2hPB4zVr6t4hnKyY8BRqRmF/6dBZdD?= =?us-ascii?Q?3DN+GAgNRrJw9ytOcmDKhIyYwyXQEuMHI1zB8j7aKWCQMZNN1BFAsZw3ZNYx?= =?us-ascii?Q?63cpo4pgd6bKFwC5QHk8lneobzlbdb3ZQj+CF63zkgVQwwd50x1U/gHIga5u?= =?us-ascii?Q?6SYNKsDBBKdPFsLiWkd6KX4G22y4CCk/xMPIPeIszcAvTZxde0MPYyeEiA63?= =?us-ascii?Q?Dcv2iRVcb9p13FaFciKd9dpM9dgrWaQTy40FmuRdEhkL/8OLLwykPnKX1AGn?= =?us-ascii?Q?HVS3dU5cdNk+gmu5xN8lYnWQ22HnBIfm0dQYPVGEK/+A7rr15OHTjTtzCnae?= =?us-ascii?Q?AQB7oGys3U2M7OKDksiyMMyZRwMwlZwiNtsO/FmAcF8EUs7XeroN4j06vgsd?= =?us-ascii?Q?4/Abt+c7Dulgw4pwvCNOFgcszYAkOdatumKcNv8B6MTLZhN9vHyajqRbZ33E?= =?us-ascii?Q?TB8mSMR7TpxXcKFgiIDdwTPPkFsiYkRPmv1Q0AzVTJ9HFXJDKHEgyqEEtIzc?= =?us-ascii?Q?I4gjT+TlIZ1I9w1Ze+quQT9a95COd/huof4yVughmLl5uDE/KCN4NAxHzqRb?= =?us-ascii?Q?gKVjiChCL7BTQdFhWaGOnk2xOgLqVBXky/kQ851reNWAyQwtJ12b0LJT+sCz?= =?us-ascii?Q?gIjzaPEMnCRl51yjy/CkveTbmGSnz0sF5TLflVDKve8M9SLgGKob5y8DOmuo?= =?us-ascii?Q?84i9hEK4T+R7TEhuoRVFQCnUB9HR8yUfd4gakRvGlhtKG0cWStBFaOlY/Ml3?= =?us-ascii?Q?Y+Jjgvt7sREiOAbgDFNNMf+254NqFwlGslbc8C8GYX/8/F6hsbjlmt0JQuqG?= =?us-ascii?Q?RRcetSIEezGGrjilSbUwYck6EEANe7mkeOzE+wxMZRIckRhfbN2SGYxfnI9s?= =?us-ascii?Q?zoZOWCd2Yefw0ViJmwe5lzrL0IouwXgQauypR5eymXHXg/hMNjcVs7nr1YUK?= =?us-ascii?Q?4+tYFJTqn1Tod31vJNrxuHeos84ssk+qph8QUl/X9XZUI6wTTHrxx8bvBuYR?= =?us-ascii?Q?WkUKwVoiVUxZcoN497UYo9Eq/eK1dZsLNDVaabUetn/uJ5zvFIIcdR2hMlHj?= =?us-ascii?Q?IRBaURtwKgulYzB5+8o6q/DBONn/qU3dv3ENBkI+hjD9vBYqZW1/ot/h7duQ?= =?us-ascii?Q?oX1YUnQqDV9nJ5j7SCQwDdKvCE3RuVrGKUIqDvjFCz1jmPUBt+e7Xa5EbWkI?= =?us-ascii?Q?1Tcml7Mw31Jd/hS2YX+bfjk3h3O5jVvmllhAhytJKOJSqmTotNlg28vTFOdx?= =?us-ascii?Q?0wVbmj/6v4bob7I27Jh7hTAIWkpnb59g51SWjWuo?= 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: cb8bfe3f-1917-4ad3-5237-08daaeb2b1f0 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Oct 2022 13:39:33.8606 (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: ZcVtiA5xbRalnSCD4s9QhQc3ILYBQbt56PXWC3NBxvEc7lOzvunl/pVM2I8Y575ESh0OnDhM9U12TPRgoR06Lw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6448 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable [AMD Official Use Only - General] Need maintainer to review this changes. However, same comment as I gave ear= lier. We will have to wait until the File Naming and Directory naming secti= ons are firmed and published in edk2 coding standard spec. > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Sunil V L > via groups.io > Sent: Saturday, October 15, 2022 12:48 AM > To: devel@edk2.groups.io > Cc: Ard Biesheuvel ; Jiewen Yao > ; Jordan Justen ; Gerd > Hoffmann > Subject: [edk2-devel] [edk2-staging/RiscV64QemuVirt PATCH V4 05/34] > OvmfPkg/PlatformInitLib: 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%7Ced7f8b92a08f4857ec8308daae040947%7C3dd89 > 61fe4884e608e11a82d994e183d%7C0%7C0%7C638013629611675307%7CUnkn > own%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik > 1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=3D73IIv8KRu49Hir > C2wbaDc8flnZRiJ78k7cuTuQyVuFw%3D&reserved=3D0 >=20 > Currently, PlatformInitLib supports only X86 architecture. So, refactor t= o > allow adding other architectures like RISC-V. >=20 > Cc: Ard Biesheuvel > Cc: Jiewen Yao > Cc: Jordan Justen > Cc: Gerd Hoffmann > Signed-off-by: Sunil V L > --- > OvmfPkg/Library/PlatformInitLib/PlatformInitLib.inf | 22 ++++++= +++++- > -------- > OvmfPkg/Library/PlatformInitLib/{ =3D> Ia32X64}/Cmos.c | 0 > OvmfPkg/Library/PlatformInitLib/{ =3D> Ia32X64}/IntelTdx.c | 0 > OvmfPkg/Library/PlatformInitLib/{ =3D> Ia32X64}/IntelTdxNull.c | 0 > OvmfPkg/Library/PlatformInitLib/{ =3D> Ia32X64}/MemDetect.c | 0 > OvmfPkg/Library/PlatformInitLib/{ =3D> Ia32X64}/Platform.c | 0 > 6 files changed, 12 insertions(+), 10 deletions(-) >=20 > diff --git a/OvmfPkg/Library/PlatformInitLib/PlatformInitLib.inf > b/OvmfPkg/Library/PlatformInitLib/PlatformInitLib.inf > index 86a82ad3e084..5d31cad1b670 100644 > --- a/OvmfPkg/Library/PlatformInitLib/PlatformInitLib.inf > +++ b/OvmfPkg/Library/PlatformInitLib/PlatformInitLib.inf > @@ -22,16 +22,16 @@ [Defines] > # VALID_ARCHITECTURES =3D IA32 X64 EBC > # >=20 > -[Sources] > - Cmos.c > - MemDetect.c > - Platform.c > +[Sources.IA32, Sources.X64] > + Ia32X64/Cmos.c > + Ia32X64/MemDetect.c > + Ia32X64/Platform.c >=20 > [Sources.IA32] > - IntelTdxNull.c > + Ia32X64/IntelTdxNull.c >=20 > [Sources.X64] > - IntelTdx.c > + Ia32X64/IntelTdx.c >=20 > [Packages] > EmbeddedPkg/EmbeddedPkg.dec > @@ -45,12 +45,14 @@ [LibraryClasses] > DebugLib > IoLib > HobLib > + PcdLib > + PciLib > + > +[LibraryClasses.IA32, LibraryClasses.X64] > + MtrrLib > QemuFwCfgLib > QemuFwCfgSimpleParserLib > MemoryAllocationLib > - MtrrLib > - PcdLib > - PciLib > PeiHardwareInfoLib >=20 > [LibraryClasses.X64] > @@ -100,5 +102,5 @@ [FixedPcd] > gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase > gUefiOvmfPkgTokenSpaceGuid.PcdCfvRawDataSize >=20 > -[FeaturePcd] > +[FeaturePcd.IA32, FeaturePcd.X64] > gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode > diff --git a/OvmfPkg/Library/PlatformInitLib/Cmos.c > b/OvmfPkg/Library/PlatformInitLib/Ia32X64/Cmos.c > similarity index 100% > rename from OvmfPkg/Library/PlatformInitLib/Cmos.c > rename to OvmfPkg/Library/PlatformInitLib/Ia32X64/Cmos.c > diff --git a/OvmfPkg/Library/PlatformInitLib/IntelTdx.c > b/OvmfPkg/Library/PlatformInitLib/Ia32X64/IntelTdx.c > similarity index 100% > rename from OvmfPkg/Library/PlatformInitLib/IntelTdx.c > rename to OvmfPkg/Library/PlatformInitLib/Ia32X64/IntelTdx.c > diff --git a/OvmfPkg/Library/PlatformInitLib/IntelTdxNull.c > b/OvmfPkg/Library/PlatformInitLib/Ia32X64/IntelTdxNull.c > similarity index 100% > rename from OvmfPkg/Library/PlatformInitLib/IntelTdxNull.c > rename to OvmfPkg/Library/PlatformInitLib/Ia32X64/IntelTdxNull.c > diff --git a/OvmfPkg/Library/PlatformInitLib/MemDetect.c > b/OvmfPkg/Library/PlatformInitLib/Ia32X64/MemDetect.c > similarity index 100% > rename from OvmfPkg/Library/PlatformInitLib/MemDetect.c > rename to OvmfPkg/Library/PlatformInitLib/Ia32X64/MemDetect.c > diff --git a/OvmfPkg/Library/PlatformInitLib/Platform.c > b/OvmfPkg/Library/PlatformInitLib/Ia32X64/Platform.c > similarity index 100% > rename from OvmfPkg/Library/PlatformInitLib/Platform.c > rename to OvmfPkg/Library/PlatformInitLib/Ia32X64/Platform.c > -- > 2.38.0 >=20 >=20 >=20 >=20 >=20