From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by mx.groups.io with SMTP id smtpd.web10.1683.1633446075834005838 for ; Tue, 05 Oct 2021 08:01:28 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=hwj2vXIq; spf=temperror, err=temporary DNS error (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=091255f111=abner.chang@hpe.com) Received: from pps.filterd (m0134424.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 195Dv40J004514; Tue, 5 Oct 2021 15:00:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : mime-version; s=pps0720; bh=YHwqOzwCjmZTborXCSBmsO086o3opKvFcQyz3oHUWmM=; b=hwj2vXIqrQ1i87IMu5vsyfP3aAYxgIeQoYfA4NM2H91PokX7Fg2otgeAurzI+GohgIA5 4JnEp0NmoqWzp21npZwCBcnK3ccmJP2OipUtEzl+7YP9kBjuV+laToU0ZIxdQPzmZ0+z 7xfFNqnqdg/fFlSsL18yVYIsRwDLk8VrlcDK384F3MfHU6+UCPzOdl7nWUEtyaYa2/eA ZZoMD4KaQidycxLoAqAOxDDWrijTNECqbmGR51hi2OJ2QByGS7s8LECX4/C8OH7cRzSj kC1shYABS2YkhGq4HM3TLzKza3TYg8PVEQY/jV4cHinUoI+kvNq3YGKXtyBDJRV5q7eY Mw== Received: from g9t5009.houston.hpe.com (g9t5009.houston.hpe.com [15.241.48.73]) by mx0b-002e3701.pphosted.com with ESMTP id 3bgknj2vab-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 05 Oct 2021 15:00:51 +0000 Received: from G1W8106.americas.hpqcorp.net (g1w8106.austin.hp.com [16.193.72.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g9t5009.houston.hpe.com (Postfix) with ESMTPS id 9174293; Tue, 5 Oct 2021 15:00:50 +0000 (UTC) Received: from G9W9210.americas.hpqcorp.net (16.220.66.155) by G1W8106.americas.hpqcorp.net (16.193.72.61) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Tue, 5 Oct 2021 15:00:37 +0000 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (15.241.52.11) by G9W9210.americas.hpqcorp.net (16.220.66.155) with Microsoft SMTP Server (TLS) id 15.0.1497.23 via Frontend Transport; Tue, 5 Oct 2021 15:00:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j8VSMm/Oxgxnde1SAapVCkdNCQpAqBaR96rm/hvmlzACIP4SuNNmmG6fkSWC9jGgGO+AiQyeI/vrPpHwhZanWH5Vxg5g/b3weu6XJ2jDBU/tuUJRF5GW7VWwEU7ObSgaAyAsg4LXUTW2/cCl4+I9sTzab/HMUW2FfQ49u1daWMvB+090tXE4lGW2rHUWln8Pv3j4VjyYenaS1uE4IfjkCPGOnByP0TQpW6XyCM3w7w/FBK5PQlnI/w6GgtAPQq8UUPi6veuqQV+Cco094BfEnCIGWiJyqDt9WbclSIcnreqNWQJHXYFMZiMQjr4CgtuSb1z/+AFtfOrMD2iKwhUUUQ== 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=eHCJhKId+JVIDb46OvdxIJOhcE3EdYPxqKAD9aq5Dwc=; b=jsddaWEY/Hd4NWwaoizvhaYokFf4FwTZQ0/9pxaZ58JcVJF+eZ4xYX3O1+BIdBqSUZRCu+TaiO4nPtUSKFp6jg+lCZRxUNN5c2aa1GqKN5AafxGcGrcAv+d8XYlyBIMliJJrmjdk4KVj0fI1Oisibr3LGewKC+IVlyKPwrh+tZ0fhVA9cwHrjk2wZ5DsHx5askWCv+OxkOMp7LTioOJpA6iaNlIWRbCT2JIR22TWqmiyddZDrsZdVlMJZE8etoEcpRrBx7pYC1zpORLXivGDF72ldbtDq3cwqa2/piyC+rJvpLoTJxOHbtvm/nytWJOEwkNFZEQf3k4gcvL8yr2GFQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hpe.com; dmarc=pass action=none header.from=hpe.com; dkim=pass header.d=hpe.com; arc=none Received: from CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7508::16) by CS1PR8401MB0424.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7510::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18; Tue, 5 Oct 2021 15:00:29 +0000 Received: from CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM ([fe80::b88a:7fe7:6294:683f]) by CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM ([fe80::b88a:7fe7:6294:683f%9]) with mapi id 15.20.4566.022; Tue, 5 Oct 2021 15:00:29 +0000 From: "Abner Chang" To: edk2-devel-groups-io , "ardb@kernel.org" CC: Ard Biesheuvel , Leif Lindholm , Sami Mujawar , Jiewen Yao , Jordan Justen , "Gerd Hoffmann" , "Schaefer, Daniel" , Sunil V L , Liming Gao , Zhiguang Liu , Michael D Kinney Subject: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg Thread-Topic: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg Thread-Index: AQHXucuaiu4vyKNgf0iJbS9pUkMJ2qvEfo2z Date: Tue, 5 Oct 2021 15:00:28 +0000 Message-ID: References: <20210930004548.3033-1-abner.chang@hpe.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: suggested_attachment_session_id: 0fbdb411-3553-8f97-513e-82820f5e05bb authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=hpe.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 70ee1f40-971b-4d22-83d8-08d98810def2 x-ms-traffictypediagnostic: CS1PR8401MB0424: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: RuiI4l0LRErdbZ95q4pMab6eH8lJSGWzCTSunLwr6IvbWHpeyQomLeoIPgrxgk1vTEkdIK0QnZgS6yGfLD0hzdqG9qLm3LDwgw8AU29SVK8EWPIcvmzLQkdc2PPYGgtTssijwnXcgRiMPFiiYDBMEUbh2cQBgrVtXUUMKBTikEEV5BUmi942ZRaCShanuFkK7DoG+h9+I2NEn7wSBR4bDc6iN3jbos/0HnCmoQ/JrBLRoleNJE4YDqokdEEQk0xvQrQZwBXwe5J6qaMSk5GsfB2G0NDJdfZi+VZZouaOF1VAv2G0ulnpGnSOjxKJSzNPNgWuMzRkwMU0v6Sqq7hKh+8WX1cC18XcuzArdFuvg19VUamYO+kyUz2KSAtS8vhlE9NmEZmH7YolRbSkC0rrGlS6ZGsYWyDqKZJ1kfUKYY6yt9am8xSIoaQaxYPQ6zeWogYt9cWdpw7oPRi3XIW6iOM1IqTsfkw+SxsI1iZU6NjK0ysPKYyk6Z37b5Ok63r0z8xFSqjYB6eE2t7cdD4o8mdOp2uu7/SL4RBH1SmJJb/mV86zDYu2RMoyOxL4lUqei7vVceJABnbpvA9SMxPhNBSkHHpJXu7vGHSxHXCAVVNKrTahwRciHy/E91gsTrrdp0DJ40x16/0yKQaAYP977StrB58cGeF3gL2duQEg/z3hsWHw+7ppVQ7ttKNAAqSldxpC/3Avpu47s9mafS51KTz5iggrLje9MmoKJejbo8zpWXE2zFNYJrtAue+/jyrVisVfPKLkYSRODGvS0+jZaiYj0rclsMO7cjmOfiQpLduvjMb5PPhaSkb4HMCOfkoOsovhm/zqozgDYwIb6WW28QDNRbvxUMYgfBj4FUBAWGg= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(366004)(76116006)(91956017)(122000001)(38100700002)(55016002)(71200400001)(26005)(9686003)(54906003)(19627405001)(110136005)(166002)(316002)(186003)(4326008)(8936002)(7696005)(38070700005)(86362001)(52536014)(33656002)(66946007)(508600001)(55236004)(8676002)(966005)(53546011)(6506007)(83380400001)(7416002)(5660300002)(2906002)(66446008)(64756008)(66556008)(66476007)(156123004);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?ufsJ0HkN4YNhajp6oM0VvbxlLhGJ17fA8leE6GKTczWiI0mGTLosWut+WC?= =?iso-8859-1?Q?LoDfqPO/WPBMztcVS8AILm0lY1Hld2Djv8YarxoYr8ZOt0qqBdgrBe3pGk?= =?iso-8859-1?Q?sDMfLhj5XUiBj94X8cwDHm89VsgQz5sau6awhCXiBQawcO59Byx0iXMBia?= =?iso-8859-1?Q?Er9x5f8lvD98UOSTn50mUQSs6gFbIa1D8ChplZRO81LYbhzO6XbhisBSnP?= =?iso-8859-1?Q?Xcmo3pwJQ6tXaae6kB1oKtP4kvFkZAKP/MQAGFQAKjnIM0dQSr4f69ASnu?= =?iso-8859-1?Q?AWCcDA+bsitn6Ao9nrvRkukLqeUdfxXFFSrypZcGE9Nfmm5GVfKc1NPhjL?= =?iso-8859-1?Q?SS4Pan5ZaS5SVmVmoFexfsnZeagQUumJtIzcVZrCmcPSI2Fc6A2anrYnNT?= =?iso-8859-1?Q?cdZbyGZzB+fz63cnlFfRdntS74CVJ9zgGV9BjfmthUaHwNP4FUqNWnvz5R?= =?iso-8859-1?Q?1s+VxKNRHoxXdY7R6mUAA7sYaHyArnnh+m3MlKnD0RqRyB/ayvC7Dapl8o?= =?iso-8859-1?Q?cbp+pLif0k/xfzlFRlYw13yjIgOzxtYXMtTEQ8KMNGfDhcPfyZS53LMtpq?= =?iso-8859-1?Q?EuOBYpzTpneV5lJYbZlUrmvFpgDipPp6gMYksTyUhIkgFhigQKXiPlW3dQ?= =?iso-8859-1?Q?cVBJZLJDyINouJ9tnyLjarPI4FZhVmTtsfnjloSiUlKQaF6w2V58zb/315?= =?iso-8859-1?Q?yYFEDilOi8evSttm5iTlzNWROoKYs5WqfS3VN8Zu48DtRGb8CNarnd4Hdy?= =?iso-8859-1?Q?rNdYdF8q48AsFBw4TwFlrM6pJBGYAB3k09BHTPgmVEVyseGFBMpqi6Yko+?= =?iso-8859-1?Q?Gioi5+WAfzUdeUZwtLVWZFInpocLcMF/e6yN2tKzF5ig30cSoiHOzUaihr?= =?iso-8859-1?Q?j6wswdEd27JCipizJFTa7KucYaXwkgTaIXPVts2qJG4km0HP/yxN1PGY8T?= =?iso-8859-1?Q?a/ZGioVu6zIoS+C/9XxjXVNm7huDmGrWId8OaGp5/2stZkGPNsUtKX5tSP?= =?iso-8859-1?Q?MLsEdc0TeFvynRfSDyyDk/bkV/gBZqn8rWhoP+IYn47ar4+WNK2YgUakF2?= =?iso-8859-1?Q?2bMyVkf76NS7qUinEdepHrBGOppLR+EhKF54DqbY7x29BTdaHP5onB3PRe?= =?iso-8859-1?Q?QSrD0l+TQ6UHiKbRaKmPNF0nP/qHYNGutbvWD4K5WmxNy9wQqmakzjGEDC?= =?iso-8859-1?Q?WL3h3JgQzzZCcXmsY0meJ3gRKkTzt3i9MPOVYnS67Ml77zq+d5GuCOt821?= =?iso-8859-1?Q?EpPrDPKdmBgWdqWWLUahscEMWQZ7KddHEXKV6QljXspV6qCM2D0idxdJ39?= =?iso-8859-1?Q?AI06yRknIJr4dk3k9kxAzdPOlfB77A7Um5jLXQt+jRXpwhu4C7EFmp6ubk?= =?iso-8859-1?Q?nG1V4EmKeT?= X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 70ee1f40-971b-4d22-83d8-08d98810def2 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Oct 2021 15:00:28.9296 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 4TB6bx7335b6v6EZkUpLpMZ5VZu33cytk6zFoAGe/ktrNJN8V+H1h8/oWeqNBnbc7NkzVoWvKYyrcXFGA77Chg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR8401MB0424 X-OriginatorOrg: hpe.com X-Proofpoint-ORIG-GUID: MlbtqMXNdxNdRUeGSXTsJOb2ZXNLHV59 X-Proofpoint-GUID: MlbtqMXNdxNdRUeGSXTsJOb2ZXNLHV59 X-Proofpoint-UnRewURL: 12 URL's were un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-10-05_02,2021-10-04_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 priorityscore=1501 mlxscore=0 lowpriorityscore=0 malwarescore=0 mlxlogscore=999 impostorscore=0 clxscore=1015 spamscore=0 suspectscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110050089 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_CS1PR8401MB114426A342791DED7638D2EAFFAF9CS1PR8401MB1144_" --_000_CS1PR8401MB114426A342791DED7638D2EAFFAF9CS1PR8401MB1144_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Ard, This way reduces the impact of MdePkg. We can try it. Thanks Abner ________________________________ From: devel@edk2.groups.io on behalf of Ard Biesheuv= el Sent: Tuesday, October 5, 2021 5:30 PM To: edk2-devel-groups-io ; Chang, Abner (HPS SW/FW Te= chnologist) Cc: Ard Biesheuvel ; Leif Lindholm ; Sami Mujawar ; Jiewen Yao ; Jordan Justen ; Gerd Hoffmann ; Schaefer, Daniel ; Sunil V L ; Liming Gao ; Zhiguang Liu ; Michael D Kinney Subject: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to Ov= mfPkg On Thu, 30 Sept 2021 at 03:43, Abner Chang wrote: > > In V3: Address comments on V2. > In V2: Remove HPE license on the files that just moved around or > the changes in the file are just code removal. > > edk2 BZ #: 3665 > edk2 platform corresponding changes will be submitted after > this pactch set is reviewed. > > This pacthes set is to migrate some modules from ArmVirtPkg > to under OvmfPkg for the upcoming RiscVVirtPkg that can leverage > those modules without the dependency with Arm*Pkg. > > The modules moved from ArmVirtPkg to OvmfPkg are, > - FdtClientDxe > - PciPcdProducerLib > - HighMemDxe > - QemuFwCfgLib > - FdtPciHostBridgeLib > - VirtioFdtDxe > > Below PCDs are moved to under MdePkg and leverage by RiscVVirtPkg. > This change also remove the dependency on ArmPkg of OvmfPkg. > - PcdPciIoTranslation > - PcdPciIoTranslation > - PcdPciMmio32(64)Translation > > Signed-off-by: Abner Chang > Cc: Ard Biesheuvel > Cc: Leif Lindholm > Cc: Sami Mujawar > Cc: Jiewen Yao > Cc: Jordan Justen > Cc: Gerd Hoffmann > Cc: Daniel Schaefer > Cc: Sunil V L > Cc: Liming Gao > Cc: Zhiguang Liu > Cc: Michael D Kinney > > Abner Chang (12): > ArmVirtPkg/FdtClintDxe: Move FdtClientDxe to EmbeddedPkg > MdePkg: Add PcdPciIoTranslation PCD > ArmPkg: Use PcdPciIoTranslation PCD from MdePkg > ArmVirtPkg/FdtPciPcdProducerLib: Relocate PciPcdProducerLib to OvmfPkg > ArmVirtPkg/HighMemDxe: Relocate HighMemDxe to OvmfPkg > OvmfPkg/HighMemDxe: Add RISC-V in the supported arch. > ArmVirtPkg/QemuFwCfgLib: Relocate QemuFwCfgLib to OvmfPkg > OvmfPkg/QemuFwCfgLibMMIO: Add RISC-V arch support > MdePkg: Add PcdPciMmio32(64)Translation PCDs > ArmVirtPkg/FdtPciHostBridgeLib: Relocate FdtPciHostBridgeLib to > OvmfPkg/Fdt > OvmfPkg/FdtPciHostBridgeLib: Add RISC-V in the supported arch. > ArmVirtPkg/VirtioFdtDxe: Relocate VirtioFdtDxe to OvmfPkg/Fdt > Hello all, These patches look ok to me, but I wonder if the MdePkg maintainers are happy taking these PCD declaration changes. Translations for PCIe are typically defined per host bridge, and I would rather move away from using PCDs for this entirely than 'promote' them by carrying them in MdePkg. As this issue is somewhat orthogonal to what Abner is trying to fix, perhaps it is better to avoid MdePkg changes for now, and just duplicate these PCDs into OvmfPkg. This is reasonable, given that we know that QEMU only exposes a single host bridge. The one in ArmPkg can hopefully be removed and replaced with something that is more appropriate. > ArmPkg/ArmPkg.dec | 15 ++++++-------- > ArmVirtPkg/ArmVirtPkg.dec | 3 --- > EmbeddedPkg/EmbeddedPkg.dec | 1 + > MdePkg/MdePkg.dec | 12 +++++++++++ > ArmVirtPkg/ArmVirtCloudHv.dsc | 18 ++++++++--------- > ArmVirtPkg/ArmVirtKvmTool.dsc | 18 ++++++++--------- > ArmVirtPkg/ArmVirtQemu.dsc | 20 +++++++++---------- > ArmVirtPkg/ArmVirtQemuKernel.dsc | 20 +++++++++---------- > ArmVirtPkg/ArmVirtXen.dsc | 2 +- > EmbeddedPkg/EmbeddedPkg.dsc | 1 + > ArmVirtPkg/ArmVirtCloudHv.fdf | 6 +++--- > ArmVirtPkg/ArmVirtKvmTool.fdf | 6 +++--- > ArmVirtPkg/ArmVirtXen.fdf | 2 +- > ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 6 +++--- > .../ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf | 2 +- > .../ArmVirtGicArchLib/ArmVirtGicArchLib.inf | 1 + > .../ArmVirtPL031FdtClientLib.inf | 1 + > .../ArmVirtPsciResetSystemLib.inf | 1 + > .../ArmVirtTimerFdtClientLib.inf | 1 + > .../KvmtoolRtcFdtClientLib.inf | 1 + > .../NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf | 1 + > .../NorFlashQemuLib/NorFlashQemuLib.inf | 1 + > .../XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf | 1 + > ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.inf | 1 + > .../Drivers}/FdtClientDxe/FdtClientDxe.inf | 1 - > .../FdtPciHostBridgeLib.inf | 11 +++++----- > .../FdtPciPcdProducerLib.inf | 5 ++--- > .../Fdt}/HighMemDxe/HighMemDxe.inf | 7 ++++--- > .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf | 2 +- > .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf | 6 +++--- > .../Include/Protocol/FdtClient.h | 0 > .../Drivers}/FdtClientDxe/FdtClientDxe.c | 0 > .../FdtPciHostBridgeLib/FdtPciHostBridgeLib.c | 0 > .../FdtPciPcdProducerLib.c | 0 > .../Fdt}/HighMemDxe/HighMemDxe.c | 3 ++- > .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.c | 0 > .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.c | 7 ++++--- > Maintainers.txt | 6 ++++++ > 38 files changed, 106 insertions(+), 83 deletions(-) > rename {ArmVirtPkg =3D> EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.i= nf (92%) > rename {ArmVirtPkg/Library =3D> OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciH= ostBridgeLib.inf (77%) > rename {ArmVirtPkg/Library =3D> OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPci= PcdProducerLib.inf (87%) > rename {ArmVirtPkg =3D> OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.inf (83%) > rename {ArmVirtPkg =3D> OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf (92%) > rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf =3D> OvmfPkg/Lib= rary/QemuFwCfgLib/QemuFwCfgLibMmio.inf (86%) > rename {ArmVirtPkg =3D> EmbeddedPkg}/Include/Protocol/FdtClient.h (100%) > rename {ArmVirtPkg =3D> EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.c= (100%) > rename {ArmVirtPkg/Library =3D> OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciH= ostBridgeLib.c (100%) > rename {ArmVirtPkg/Library =3D> OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPci= PcdProducerLib.c (100%) > rename {ArmVirtPkg =3D> OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.c (95%) > rename {ArmVirtPkg =3D> OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.c (100%) > rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c =3D> OvmfPkg/Libra= ry/QemuFwCfgLib/QemuFwCfgLibMmio.c (93%) > > -- > 2.17.1 > > > > > > --_000_CS1PR8401MB114426A342791DED7638D2EAFFAF9CS1PR8401MB1144_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi Ard,
This way reduces the impact of MdePkg. We can try it.

Thanks
Abner


From: devel@edk2.groups.i= o <devel@edk2.groups.io> on behalf of Ard Biesheuvel <ardb@kernel.= org>
Sent: Tuesday, October 5, 2021 5:30 PM
To: edk2-devel-groups-io <devel@edk2.groups.io>; Chang, Abner = (HPS SW/FW Technologist) <abner.chang@hpe.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>; Leif Lindholm = <leif@nuviainc.com>; Sami Mujawar <sami.mujawar@arm.com>; Jiewe= n Yao <jiewen.yao@intel.com>; Jordan Justen <jordan.l.justen@intel= .com>; Gerd Hoffmann <kraxel@redhat.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>; Sunil V L <sunilvl@ventanamicro.com>= ;; Liming Gao <gaoliming@byosoft.com.cn>; Zhiguang Liu <zhiguang.l= iu@intel.com>; Michael D Kinney <michael.d.kinney@intel.com>
Subject: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg module= s to OvmfPkg
 
On Thu, 30 Sept 2021 at 03:43, Abner Chang <abn= er.chang@hpe.com> wrote:
>
> In V3: Address comments on V2.
> In V2: Remove HPE license on the files that just moved around or
>        the changes in the file are = just code removal.
>
> edk2 BZ #: 3665
> edk2 platform corresponding changes will be submitted after
> this pactch set is reviewed.
>
> This pacthes set is to migrate some modules from ArmVirtPkg
> to under OvmfPkg for the upcoming RiscVVirtPkg that can leverage
> those modules without the dependency with Arm*Pkg.
>
> The modules moved from ArmVirtPkg to OvmfPkg are,
> - FdtClientDxe
> - PciPcdProducerLib
> - HighMemDxe
> - QemuFwCfgLib
> - FdtPciHostBridgeLib
> - VirtioFdtDxe
>
> Below PCDs are moved to under MdePkg and leverage by RiscVVirtPkg.
> This change also remove the dependency on ArmPkg of OvmfPkg.
> - PcdPciIoTranslation
> - PcdPciIoTranslation
> - PcdPciMmio32(64)Translation
>
> Signed-off-by: Abner Chang <abner.chang@hpe.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Leif Lindholm <leif@nuviainc.com>
> Cc: Sami Mujawar <sami.mujawar@arm.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
> Cc: Sunil V L <sunilvl@ventanamicro.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
>
> Abner Chang (12):
>   ArmVirtPkg/FdtClintDxe: Move FdtClientDxe to EmbeddedPkg >   MdePkg: Add PcdPciIoTranslation PCD
>   ArmPkg: Use PcdPciIoTranslation PCD from MdePkg
>   ArmVirtPkg/FdtPciPcdProducerLib: Relocate PciPcdProducerLi= b to OvmfPkg
>   ArmVirtPkg/HighMemDxe: Relocate HighMemDxe to OvmfPkg
>   OvmfPkg/HighMemDxe: Add RISC-V in the supported arch.
>   ArmVirtPkg/QemuFwCfgLib: Relocate QemuFwCfgLib to OvmfPkg<= br> >   OvmfPkg/QemuFwCfgLibMMIO: Add RISC-V arch support
>   MdePkg: Add PcdPciMmio32(64)Translation PCDs
>   ArmVirtPkg/FdtPciHostBridgeLib: Relocate FdtPciHostBridgeL= ib to
>     OvmfPkg/Fdt
>   OvmfPkg/FdtPciHostBridgeLib: Add RISC-V in the supported a= rch.
>   ArmVirtPkg/VirtioFdtDxe: Relocate VirtioFdtDxe to OvmfPkg/= Fdt
>

Hello all,

These patches look ok to me, but I wonder if the MdePkg maintainers
are happy taking these PCD declaration changes. Translations for PCIe
are typically defined per host bridge, and I would rather move away
from using PCDs for this entirely than 'promote' them by carrying them
in MdePkg.

As this issue is somewhat orthogonal to what Abner is trying to fix,
perhaps it is better to avoid MdePkg changes for now, and just
duplicate these PCDs into OvmfPkg. This is reasonable, given that we
know that QEMU only exposes a single host bridge.

The one in ArmPkg can hopefully be removed and replaced with something
that is more appropriate.


>  ArmPkg/ArmPkg.dec        = ;            &n= bsp;        | 15 ++++++--------
>  ArmVirtPkg/ArmVirtPkg.dec      &nb= sp;            =   |  3 ---
>  EmbeddedPkg/EmbeddedPkg.dec      &= nbsp;            |&n= bsp; 1 +
>  MdePkg/MdePkg.dec        = ;            &n= bsp;        | 12 +++++++++++
>  ArmVirtPkg/ArmVirtCloudHv.dsc      = ;           | 18 ++++++++= ---------
>  ArmVirtPkg/ArmVirtKvmTool.dsc      = ;           | 18 ++++++++= ---------
>  ArmVirtPkg/ArmVirtQemu.dsc      &n= bsp;            = ; | 20 +++++++++----------
>  ArmVirtPkg/ArmVirtQemuKernel.dsc     &n= bsp;        | 20 +++++++++----------
>  ArmVirtPkg/ArmVirtXen.dsc      &nb= sp;            =   |  2 +-
>  EmbeddedPkg/EmbeddedPkg.dsc      &= nbsp;            |&n= bsp; 1 +
>  ArmVirtPkg/ArmVirtCloudHv.fdf      = ;           |  6 +++= ---
>  ArmVirtPkg/ArmVirtKvmTool.fdf      = ;           |  6 +++= ---
>  ArmVirtPkg/ArmVirtXen.fdf      &nb= sp;            =   |  2 +-
>  ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc    &nbs= p;     |  6 +++---
>  .../ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf    &= nbsp;  |  2 +-
>  .../ArmVirtGicArchLib/ArmVirtGicArchLib.inf   |  = 1 +
>  .../ArmVirtPL031FdtClientLib.inf     &n= bsp;        |  1 +
>  .../ArmVirtPsciResetSystemLib.inf     &= nbsp;       |  1 +
>  .../ArmVirtTimerFdtClientLib.inf     &n= bsp;        |  1 +
>  .../KvmtoolRtcFdtClientLib.inf     &nbs= p;          |  1 +
>  .../NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf |  1 +
>  .../NorFlashQemuLib/NorFlashQemuLib.inf    &= nbsp;  |  1 +
>  .../XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf |  1 +
>  ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.inf    &n= bsp;   |  1 +
>  .../Drivers}/FdtClientDxe/FdtClientDxe.inf    |&n= bsp; 1 -
>  .../FdtPciHostBridgeLib.inf      &= nbsp;            | 1= 1 +++++-----
>  .../FdtPciPcdProducerLib.inf      =             |  = 5 ++---
>  .../Fdt}/HighMemDxe/HighMemDxe.inf     =        |  7 ++++---
>  .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf    &n= bsp;   |  2 +-
>  .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf |  6 +++--- >  .../Include/Protocol/FdtClient.h     &n= bsp;        |  0
>  .../Drivers}/FdtClientDxe/FdtClientDxe.c    =   |  0
>  .../FdtPciHostBridgeLib/FdtPciHostBridgeLib.c |  0
>  .../FdtPciPcdProducerLib.c      &n= bsp;            = ; |  0
>  .../Fdt}/HighMemDxe/HighMemDxe.c     &n= bsp;        |  3 ++-
>  .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.c    &nbs= p;     |  0
>  .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.c   |  = 7 ++++---
>  Maintainers.txt        &= nbsp;           &nbs= p;          |  6 ++++++ >  38 files changed, 106 insertions(+), 83 deletions(-)
>  rename {ArmVirtPkg =3D> EmbeddedPkg/Drivers}/FdtClientDxe/Fdt= ClientDxe.inf (92%)
>  rename {ArmVirtPkg/Library =3D> OvmfPkg/Fdt}/FdtPciHostBridge= Lib/FdtPciHostBridgeLib.inf (77%)
>  rename {ArmVirtPkg/Library =3D> OvmfPkg/Fdt}/FdtPciPcdProduce= rLib/FdtPciPcdProducerLib.inf (87%)
>  rename {ArmVirtPkg =3D> OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.in= f (83%)
>  rename {ArmVirtPkg =3D> OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDx= e.inf (92%)
>  rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf =3D> = OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf (86%)
>  rename {ArmVirtPkg =3D> EmbeddedPkg}/Include/Protocol/FdtClie= nt.h (100%)
>  rename {ArmVirtPkg =3D> EmbeddedPkg/Drivers}/FdtClientDxe/Fdt= ClientDxe.c (100%)
>  rename {ArmVirtPkg/Library =3D> OvmfPkg/Fdt}/FdtPciHostBridge= Lib/FdtPciHostBridgeLib.c (100%)
>  rename {ArmVirtPkg/Library =3D> OvmfPkg/Fdt}/FdtPciPcdProduce= rLib/FdtPciPcdProducerLib.c (100%)
>  rename {ArmVirtPkg =3D> OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.c = (95%)
>  rename {ArmVirtPkg =3D> OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDx= e.c (100%)
>  rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c =3D> Ov= mfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.c (93%)
>
> --
> 2.17.1
>
>
>
>
>
>





--_000_CS1PR8401MB114426A342791DED7638D2EAFFAF9CS1PR8401MB1144_--