From nobody Mon Feb 9 11:30:23 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+81310+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+81310+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=hpe.com ARC-Seal: i=1; a=rsa-sha256; t=1632966230; cv=none; d=zohomail.com; s=zohoarc; b=C0/u7xIJLea5kS0B963Mw+ROv0xCUA8FF01phbEh/sBIxk5CeZO51m1hwe9Sr7xeztRbfiuq0zGQfQcz1chgbP14a+2MI5uVLIMtf7blzsQxmz9gAVWOoEWAmgPLryldr2MP4xvyGvAsyqhiPPmU0EVsuOFca7gePu0Vnghf+jE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1632966230; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=OM4V19adt8o6ED9h5YvYv8F8ASpYxQXXbgNGzBOkD/I=; b=ehkEvqAWres1RArJ6BW+erAwCwvUdjcjRUSEJNPn4QTFP+lKRsAa84KYP52KxtqNhxpGdwVFGRhpLFIr5YtcyijfqEvRdItjx+Ro5cC8vRQKFqx4nx7co84ie/5toLaacEmaiqW1LsQWj7pH60IXZhuSWokLpFE4XYnkjsOz4Mw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+81310+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1632966230575867.3339243079839; Wed, 29 Sep 2021 18:43:50 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id QVhHYY1788612xjcHRgfYQmx; Wed, 29 Sep 2021 18:43:50 -0700 X-Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by mx.groups.io with SMTP id smtpd.web10.6734.1632966217469845452 for ; Wed, 29 Sep 2021 18:43:49 -0700 X-Received: from pps.filterd (m0134423.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 18U1Pfiu001755; Thu, 30 Sep 2021 01:43:33 GMT X-Received: from g2t2353.austin.hpe.com (g2t2353.austin.hpe.com [15.233.44.26]) by mx0b-002e3701.pphosted.com with ESMTP id 3bd3jkg2ts-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 Sep 2021 01:43:33 +0000 X-Received: from g2t2360.austin.hpecorp.net (g2t2360.austin.hpecorp.net [16.196.225.135]) by g2t2353.austin.hpe.com (Postfix) with ESMTP id D8E078B; Thu, 30 Sep 2021 01:43:32 +0000 (UTC) X-Received: from abner-virtual-machine.asiapacific.hpqcorp.net (abner-virtual-machine.asiapacific.hpqcorp.net [15.119.210.153]) by g2t2360.austin.hpecorp.net (Postfix) with ESMTP id 00D2E49; Thu, 30 Sep 2021 01:43:30 +0000 (UTC) From: "Abner Chang" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Leif Lindholm , Sami Mujawar , Jiewen Yao , Jordan Justen , Gerd Hoffmann , Daniel Schaefer , Sunil V L Subject: [edk2-devel] [PATCH V3 10/12] ArmVirtPkg/FdtPciHostBridgeLib: Relocate FdtPciHostBridgeLib to OvmfPkg/Fdt Date: Thu, 30 Sep 2021 08:45:46 +0800 Message-Id: <20210930004548.3033-11-abner.chang@hpe.com> In-Reply-To: <20210930004548.3033-1-abner.chang@hpe.com> References: <20210930004548.3033-1-abner.chang@hpe.com> X-Proofpoint-GUID: hKllE8bI8zu6wc1zEQriXbheEGtCY8xb X-Proofpoint-ORIG-GUID: hKllE8bI8zu6wc1zEQriXbheEGtCY8xb X-HPE-SCL: -1 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,abner.chang@hpe.com X-Gm-Message-State: YORFGlaBeLd5g4hInDL2cb1Bx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1632966230; bh=/D9lYpH4ioWchwovVAFt8fNtWVLfxi8cHffOKrsOhPE=; h=Cc:Date:From:Reply-To:Subject:To; b=Vh0t2o5G9Uzv6rDYXq+oRm7PPLU+j+FDMVanhn/IYtICWGTE0fnqcIlU6+kF7WpWVq6 jQxIM3eb9Ue9VGhpDDxjdhnZyZzOU4+HdOupGsP+EjqzR14EzK/APXp9DDmWgPepEsn7T xQyVFEhjDih+7AWqVtEkU/+G25BzHzMxVCU= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1632966232480100005 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Relocate FdtPciHostBridgeLib to OvmfPkg/Fdt, this library is leverage by both ARM and RISC-V archs. Also use PcdPciMmio32Translation and PcdPciMmio64Translation PCDs provided by MdePkg instead of ArmPkg. 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 --- ArmPkg/ArmPkg.dec | 10 ++++------ ArmVirtPkg/ArmVirtCloudHv.dsc | 2 +- ArmVirtPkg/ArmVirtKvmTool.dsc | 2 +- ArmVirtPkg/ArmVirtQemu.dsc | 2 +- ArmVirtPkg/ArmVirtQemuKernel.dsc | 2 +- .../Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf | 6 ++---- .../Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c | 0 7 files changed, 10 insertions(+), 14 deletions(-) rename {ArmVirtPkg/Library =3D> OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHos= tBridgeLib.inf (85%) rename {ArmVirtPkg/Library =3D> OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHos= tBridgeLib.c (100%) diff --git a/ArmPkg/ArmPkg.dec b/ArmPkg/ArmPkg.dec index 12584fb319..5935663fa9 100644 --- a/ArmPkg/ArmPkg.dec +++ b/ArmPkg/ArmPkg.dec @@ -338,8 +338,8 @@ # UINT64 Mmio64CpuBase; // mapping target in 64-bit cpu-physical space # # gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslation =3D IoCpuBase - PcdPciI= oBase; - # PcdPciMmio32Translation =3D Mmio32CpuBase - (UINT64)PcdPciMmio32Base; - # PcdPciMmio64Translation =3D Mmio64CpuBase - PcdPciMmio64Base; + # gEfiMdePkgTokenSpaceGuid.PcdPciMmio32Translation =3D Mmio32CpuBase -= (UINT64)PcdPciMmio32Base; + # gEfiMdePkgTokenSpaceGuid.PcdPciMmio64Translation =3D Mmio64CpuBase -= PcdPciMmio64Base; # # because (a) the target address space (ie. the cpu-physical space) is # 64-bit, and (b) the translation values are meant as offsets for *modul= ar* @@ -358,9 +358,9 @@ # TranslatedIoAddress =3D UntranslatedIoAddress + # gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslati= on; # TranslatedMmio32Address =3D (UINT64)UntranslatedMmio32Address + - # PcdPciMmio32Translation; + # gEfiMdePkgTokenSpaceGuid.PcdPciMmio32Trans= lation; # TranslatedMmio64Address =3D UntranslatedMmio64Address + - # PcdPciMmio64Translation; + # gEfiMdePkgTokenSpaceGuid.PcdPciMmio64Trans= lation; # # The modular arithmetic performed in UINT64 ensures that the translati= on # works correctly regardless of the relation between IoCpuBase and @@ -371,10 +371,8 @@ gArmTokenSpaceGuid.PcdPciIoSize|0x0|UINT64|0x00000051 gArmTokenSpaceGuid.PcdPciMmio32Base|0x0|UINT32|0x00000053 gArmTokenSpaceGuid.PcdPciMmio32Size|0x0|UINT32|0x00000054 - gArmTokenSpaceGuid.PcdPciMmio32Translation|0x0|UINT64|0x00000055 gArmTokenSpaceGuid.PcdPciMmio64Base|0x0|UINT64|0x00000056 gArmTokenSpaceGuid.PcdPciMmio64Size|0x0|UINT64|0x00000057 - gArmTokenSpaceGuid.PcdPciMmio64Translation|0x0|UINT64|0x00000058 =20 # # Inclusive range of allowed PCI buses. diff --git a/ArmVirtPkg/ArmVirtCloudHv.dsc b/ArmVirtPkg/ArmVirtCloudHv.dsc index 4470fa3b14..0f26c10aab 100644 --- a/ArmVirtPkg/ArmVirtCloudHv.dsc +++ b/ArmVirtPkg/ArmVirtCloudHv.dsc @@ -51,7 +51,7 @@ FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf PciPcdProducerLib|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.= inf PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.i= nf - PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridge= Lib.inf + PciHostBridgeLib|OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf PciHostBridgeUtilityLib|ArmVirtPkg/Library/ArmVirtPciHostBridgeUtilityLi= b/ArmVirtPciHostBridgeUtilityLib.inf =20 TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurem= entLibNull.inf diff --git a/ArmVirtPkg/ArmVirtKvmTool.dsc b/ArmVirtPkg/ArmVirtKvmTool.dsc index 97fc98d778..0c5da4427e 100644 --- a/ArmVirtPkg/ArmVirtKvmTool.dsc +++ b/ArmVirtPkg/ArmVirtKvmTool.dsc @@ -59,7 +59,7 @@ =20 PciPcdProducerLib|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.= inf PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.i= nf - PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridge= Lib.inf + PciHostBridgeLib|OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf PciHostBridgeUtilityLib|ArmVirtPkg/Library/ArmVirtPciHostBridgeUtilityLi= b/ArmVirtPciHostBridgeUtilityLib.inf =20 TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurem= entLibNull.inf diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index d4ada5c541..ac86f20e68 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -79,7 +79,7 @@ FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf PciPcdProducerLib|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.= inf PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.i= nf - PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridge= Lib.inf + PciHostBridgeLib|OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf PciHostBridgeUtilityLib|OvmfPkg/Library/PciHostBridgeUtilityLib/PciHostB= ridgeUtilityLib.inf =20 !if $(TPM2_ENABLE) =3D=3D TRUE diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKerne= l.dsc index 70ce0b0cfa..ca0d872264 100644 --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc @@ -77,7 +77,7 @@ FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf PciPcdProducerLib|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.= inf PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.i= nf - PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridge= Lib.inf + PciHostBridgeLib|OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf PciHostBridgeUtilityLib|OvmfPkg/Library/PciHostBridgeUtilityLib/PciHostB= ridgeUtilityLib.inf TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurem= entLibNull.inf =20 diff --git a/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf= b/OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf similarity index 85% rename from ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf rename to OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf index f149693fa2..f015480685 100644 --- a/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf +++ b/OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf @@ -27,8 +27,6 @@ FdtPciHostBridgeLib.c =20 [Packages] - ArmPkg/ArmPkg.dec - ArmVirtPkg/ArmVirtPkg.dec EmbeddedPkg/EmbeddedPkg.dec MdeModulePkg/MdeModulePkg.dec MdePkg/MdePkg.dec @@ -44,8 +42,8 @@ PciPcdProducerLib =20 [FixedPcd] - gArmTokenSpaceGuid.PcdPciMmio32Translation - gArmTokenSpaceGuid.PcdPciMmio64Translation + gEfiMdePkgTokenSpaceGuid.PcdPciMmio32Translation + gEfiMdePkgTokenSpaceGuid.PcdPciMmio64Translation =20 [Pcd] gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslation diff --git a/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c b= /OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c similarity index 100% rename from ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c rename to OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#81310): https://edk2.groups.io/g/devel/message/81310 Mute This Topic: https://groups.io/mt/85964678/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-