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.web08.9369.1633512455632753141 for ; Wed, 06 Oct 2021 02:27:41 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=oebh32Cb; spf=temperror, err=temporary DNS error (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=0913b727be=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 1965LN3Z007877; Wed, 6 Oct 2021 09:27:20 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=QqOFHHgmLrS3T89HEjYAd+pLZRlHR9XDchRn8SC1mHQ=; b=oebh32CbAB6GId1ZR/yogXAdhVk8IFM8HY9wxxf7T9EvuxQxF1i6P+m3mS0Ap9RBEKMx lE2iiiFU2lPRtxAL2nYUD/jNGX3/t9EkNYCrLQkczlGDt2dx5jsDxgjiuVhiUZKFRNjh MjraRHXBxhopy77bxrNQJ14dPnJP3GD+cU5jFTWdV3869ItFb7+YKg93i79lY6AGOhAm VWqcaZz15K8/0W3ktIDsrFGIZsBY/3QfhPhhwoucEx4WOUSwHNYWI4PA/JdiYQGMNnjw a17mDlRRwABEyNk+4Rp3LM9CvtPnGI/AJaNY1QECfV1xr9VDOYdzatKIiPK0nVMJt94w og== Received: from g4t3427.houston.hpe.com (g4t3427.houston.hpe.com [15.241.140.73]) by mx0b-002e3701.pphosted.com with ESMTP id 3bh5k1a1yb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Oct 2021 09:27:20 +0000 Received: from G9W8456.americas.hpqcorp.net (exchangepmrr1.us.hpecorp.net [16.216.161.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g4t3427.houston.hpe.com (Postfix) with ESMTPS id 38F3457; Wed, 6 Oct 2021 09:27:19 +0000 (UTC) Received: from G4W9121.americas.hpqcorp.net (2002:10d2:1510::10d2:1510) by G9W8456.americas.hpqcorp.net (2002:10d8:a15f::10d8:a15f) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Wed, 6 Oct 2021 09:27:19 +0000 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (15.241.52.12) by G4W9121.americas.hpqcorp.net (16.210.21.16) with Microsoft SMTP Server (TLS) id 15.0.1497.23 via Frontend Transport; Wed, 6 Oct 2021 09:27:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=be+szjfBLuWdTjVeEei/etkCUogg5p3VBxDqT4XT7pTjytpPXTLU2zXhLhbO84FYcVNKlr63qyQZLh+64Q4cyUuvQj8wlRRGQfwMgmSTzDS2ka6RGehKtca9FqmUFswpIdnsdr0o9MWetERfWp01CzW09i8dcpMtwa3WtC0zv9mGB+opNB8daGIjxVqC5sPBioZYFCsCRZX0FqAOzV+htoQ7HptVbIrU+s01rwCbrWikQ40A+vqeS6L8xuNBlZzYywjRVy6xS5RoR39F9Rkxa/e+movYFj+3xB05/Wm5HvDZyBzljr7VWrW2qg3VrjJ+gXtnx3mKnSStqWZSF1Ogxw== 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=9Udses0ZfEH+bc77Jh/qLNsB5ZzsTTxcyTnhMBF/DHg=; b=SNYKXlVYZyJkpEobS9rh7NKKrwgEw+5ATxNfwsd2Ir0O8YLDjPGYGX41+Ca14ZqJ1fZoWjyGiFD1N2g61ayfvgB7Q8Ely8Mdf956qPP6UI3zYX6JQm+7zKIpEcTPUBS6ZC1RuANTcLEUJDMv7o7hd4QjoaIc5zuqSZGuSEFCFaOuuEVsxRKRCakgeOlFRULKL2N3q/SMRu9PIE2NWKeX6Lce1MXDhfNsPTRZJcNUAWVWtd0N5zrusdLnaQW4sZ9e+sK4a0NU7h6Dv6fwzgxiO7R+RqLMsz2qKUlasZRF4H0f4rP2pYjd9QiUIznMQJNIyPpnJYl3ph1tb8zzxMlmyQ== 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 CS1PR8401MB1285.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:750a::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.19; Wed, 6 Oct 2021 09:27:17 +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; Wed, 6 Oct 2021 09:27:17 +0000 From: "Abner Chang" To: edk2-devel-groups-io , "ardb@kernel.org" , "Chang, Abner (HPS SW/FW Technologist)" 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: AQHXucuaiu4vyKNgf0iJbS9pUkMJ2qvEfo2zgAEtEjc= Date: Wed, 6 Oct 2021 09:27:16 +0000 Message-ID: References: <20210930004548.3033-1-abner.chang@hpe.com> <16AB2A90260D3DD8.20282@groups.io> In-Reply-To: <16AB2A90260D3DD8.20282@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: suggested_attachment_session_id: d3f571a3-1507-4d19-a309-c1e0396cded3 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: 7065f2c8-7f6f-48ca-d769-08d988ab7d27 x-ms-traffictypediagnostic: CS1PR8401MB1285: 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: Hw/Jp5IiiR2FBo842TbDIH19khOWSZVFTPfKz46Ew7vdGi+b3kYC5TYswbv8RYe+EePC3G6sAJ2/acUQK+nVjuok6pnQBwv5zu5bjNs5QR9mBYsf9m9nsbrCvlL01H6NFnRY7v3C26N3i9FNqwwFRUifOztJgWdGxonGAn+O5QE0+nhPp3k5Bp1tsK8e2/d8nHHDxHn+QKKtEvRq9cpTWaxp2ev099aVQcaFmaoHgoKZFuEVnEMoyWQGm55XtWvOo3L6wf9XlN69EBrY98eWwxardrzTrGOpjVVKUAsyuwv+2lKq1OrkbgwoS7JtScj6mlFMzlS8saUMu0QB366OZiwmVijHYutdtO1jMTIJDgRAd2/q42DLW4IjJ1Z4MoINyvzaXfZFNnFeteJjWInh6gZg98h2DIr9OKseb8Sv2atqcEjBoGe1/mISjj9qLf8jdev8vbNeKSFBYZZvjEvnhjvQnMNoj4KqlX1rTekQGcjP3+CZO74wR8N2EJgXfaijBDmWTyS7xPXycMNCIuwQHi8EL0hCW1wQqdamim1ZsN7Fxz0KgWHAlb6S5cjY8XHw8CsVkodgi8/EIvQxRsIDWwOintXg8kgfKHYUD8ULWVJrqO/1o0PqL3bez/cRBqO33vbtSZLomio5EWhXnGFP8wuuBQXOuey3/e2KWgf72MiZA0DU+9gRvEGY/BS1F0wjrSf7CWT8tcXJx9dV0ezRzjiyWqzxQ0X9G1IUN825Vu6y8ItZsPR2ur106DZW56CJrYtZQMlYsXNHWF3N7Y/xlYtNCwDrTOmClJwBQscFWBQmrAiwQspQWTKadYPqzV5aZ1s6yLAw4YtB9Xs/8DrE5JizJabO/QPFIDMtwS9148s= 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)(7696005)(508600001)(53546011)(71200400001)(83380400001)(76116006)(110136005)(91956017)(26005)(186003)(9686003)(6506007)(2906002)(33656002)(55016002)(122000001)(55236004)(76236003)(54906003)(19627405001)(4326008)(316002)(66946007)(38070700005)(86362001)(8676002)(66556008)(64756008)(52536014)(7416002)(5660300002)(66446008)(38100700002)(66476007)(166002)(8936002)(156123004);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?weFjYDJNG9T7QwzhnJ0AQpSmUj+znJpSNaJtBz29EztR7y1CiPATVbgRXW?= =?iso-8859-1?Q?h23AM1EqlVb0SGuhuxB/YZNeK/dyJtyzNtMi2EAKDC92kloG5t1PvvJFFa?= =?iso-8859-1?Q?SMGMsF2Yn8/Ab8SQU0qaDQxUW9GnN5/4IzccdM0ykS2dL3Wx7Op8deBwNY?= =?iso-8859-1?Q?wj+qcQQqLPP9qlA6Qqb4lRjx2V+nyVE9LoRRM02SE/QKvvxvnTOhSVRvfL?= =?iso-8859-1?Q?4hqLM7Jn39KMHOGRmfp30Mc7yc6SxAxtjndp/uwm+XJl/azTHwCM23fZr+?= =?iso-8859-1?Q?TPlpuoLSVlLPBbUxb8X1nzGvNPQajcZUbsoyLf/yAIByeihG9AFc5pjTCZ?= =?iso-8859-1?Q?oHa8BBdzu5PR4KkNQuz0ePbFgG/EmSkE9RU72P4PJwYN3BX34iukIcvj45?= =?iso-8859-1?Q?jz810AAic3QPTasfuM526AjNrJT6mFnRpWe9QA3AY2fPAmubxlSfdNVhaN?= =?iso-8859-1?Q?WZ0xCGM1iOxDV7AFQY5cq/ReXlzsU6UrXySMjvEPwEr8W2rsU9Pznb4ol0?= =?iso-8859-1?Q?0RWWXSuPIA5vtgxG2+rBcNbnl2pv/MIZMsxIW04H55Hrw4qF7E1qglmMXo?= =?iso-8859-1?Q?vUOEFny9Ki1HUWEEt85pQbW2Uvv6R0yhgiitRXfqxyrGnN+TIiPj8aIzTo?= =?iso-8859-1?Q?CxPJFbR/FwReAnzPCduOx5xJFHqs76T5e6tzT4DmYcDl4eqe7UDZLNNCzi?= =?iso-8859-1?Q?QEbTLycng0fAbNSBNqJxJ4pfX8NsLtL/771SA9Sjdj8ptjrJodxbARgYTR?= =?iso-8859-1?Q?5mZ4YFmLc5OfDWULKn1kJCpknvCu5Ot96XhLH1ZUtrs3PCM/qvPkvbQAYQ?= =?iso-8859-1?Q?Lxw/NuoN7j1w7IAprp0f4AjVZ0GwdDxO8lLOk3Uobvzm9hj/9WaKQ34VJO?= =?iso-8859-1?Q?iIyrhuLSZsMrCSpze49aI2a7gg72wprGfwAZ5GsxbaNbL5KZC7jJ5FfBSE?= =?iso-8859-1?Q?sGH56DVsIvMLr4q7IbNmR0hpx/o9XMytlaI5SeuiV0Yqh7O125VI9Cga7I?= =?iso-8859-1?Q?sDn7cAH/33/9bxRv/rk3Kg+DmvEHBo5puTV7sdBHz6zXfAklPY907l7cw+?= =?iso-8859-1?Q?bQ1MP/KeXy6LdnXIlBEka5axqUkw/4LPWTX/86xIoxZHYl3bqBaGheJXQy?= =?iso-8859-1?Q?YfqjtsEBtc25UJ1YtFNW39mAO0Vf3O9NFItTNB/Xq2kTsk7f3IVjpK7voY?= =?iso-8859-1?Q?btTfY9aQ/V4h5uABrVPJVZvP4PR3eFtLaszzawWKXhGMMC2fjKBgAIqyPx?= =?iso-8859-1?Q?3cBRg0TWbHx+hOU+y+lKItkVZOxrOkWdk0mt7sYNErfVSfQ9ji4Q+q19Pn?= =?iso-8859-1?Q?fQAr6AyHD9CcSS3L/ZynTRqsde4qJggWONNzx5o+Dxmh2AlGxYhUpDpxer?= =?iso-8859-1?Q?xTP+cdVRu7?= X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 7065f2c8-7f6f-48ca-d769-08d988ab7d27 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Oct 2021 09:27:16.8734 (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: Ex1WegfpWxBkDuvq3+XYq8K6Yifb3qQ4oFfS7X4hWJ0Wc9NA6IltmG8bxb1M7z6KIb74cdLDcOs1wnMANDoA/g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR8401MB1285 X-OriginatorOrg: hpe.com X-Proofpoint-GUID: A5TgS5eUScH5VXC6TWV3HlIdbMFQkCbT X-Proofpoint-ORIG-GUID: A5TgS5eUScH5VXC6TWV3HlIdbMFQkCbT X-Proofpoint-UnRewURL: 10 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_06,2021-10-04_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 adultscore=0 mlxscore=0 suspectscore=0 priorityscore=1501 malwarescore=0 lowpriorityscore=0 mlxlogscore=999 clxscore=1015 phishscore=0 impostorscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110060060 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_CS1PR8401MB1144D54B9296DB8DA7000E0BFFB09CS1PR8401MB1144_" --_000_CS1PR8401MB1144D54B9296DB8DA7000E0BFFB09CS1PR8401MB1144_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Ard, I realized there is a problem if we duplicate ArmPkg defined PCD to under O= vmfPkg (e.g. PcdPciIoTranslate PCD) when I was duplicating this PCD to Ovmf= Pkg. FdtPciProducerLib is relocated to OvmfPkg/Fdt and uses PcdPciIoTranslate PC= D declared with OvmfPkg namespace. FdtPciProducerLib is also used by both A= rmVirtPkg and RiscVVirtPkg. ArmVirtPkg uses ArmPciCpuIoDxe provided by ArmPkg however PcdPciIoTranslate= used by ArmPciCpuIoDxe is declared with ArmPkg namespace. I think this results in the problem because PcdPciIoTranslate(s) that are r= eferred by ArmPkg and ArmVirtPkg come from two different namespaces, right?= Unless ArmPciCpuIoDxe uses the one declared in OvmfPkg, but I don't think = we want to do this. Thought? Otherwise, we should still keep the original patch that relocates = these PCDs under MdePkg. Thanks Abner ________________________________ From: devel@edk2.groups.io on behalf of Abner Chang = Sent: Tuesday, October 5, 2021 11:00 PM 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 Ov= mfPkg 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_CS1PR8401MB1144D54B9296DB8DA7000E0BFFB09CS1PR8401MB1144_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi Ard,
I realized there is a problem if we duplicate ArmPkg defined PCD to under O= vmfPkg (e.g. PcdPciIoTranslate = PCD) when I was duplicating this PCD to Ov= mfPkg.
FdtPciProducerLib&nbs= p;is relocated to OvmfPkg/Fdt and uses PcdPciI= oTranslate PCD declared with OvmfPkg namespace. FdtPciProducerLib is also used by both ArmVirtPkg  = and RiscVVirtPkg.
ArmVirtPkg uses ArmPciCpuIoDxe provided by ArmPkg however PcdPciIoTranslate used by ArmPc= iCpuIoDxe  is declared with ArmPkg namespace.
I think this results in the problem because PcdPciIoTranslate(s) that are referred by ArmPkg and ArmVirtPkg come from= two different namespaces, right? Unless A= rmPciCpuIoDxe uses the one declared in OvmfPkg, but I don't think we want to do this.<= /span>
Thought? Otherwise, we should still keep the original patch that = relocates these PCDs under MdePkg.

Thanks
Abner



From: devel@edk2.groups.i= o <devel@edk2.groups.io> on behalf of Abner Chang <abner.chang@hpe= .com>
Sent: Tuesday, October 5, 2021 11:00 PM
To: edk2-devel-groups-io <devel@edk2.groups.io>; ardb@kernel.o= rg <ardb@kernel.org>
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
 
Hi Ard,
This way reduces the impact of MdePkg. We can try it.

Thanks
Abner


From: devel@edk2.groups= .io <devel@edk2.groups.io> on behalf of Ard Biesheuvel <ardb@kerne= l.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 <a= bner.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_CS1PR8401MB1144D54B9296DB8DA7000E0BFFB09CS1PR8401MB1144_--