From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web12.1930.1632871553664961767 for ; Tue, 28 Sep 2021 16:25:57 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=i8b/w4yf; spf=temperror, err=temporary DNS error (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=090543438a=daniel.schaefer@hpe.com) Received: from pps.filterd (m0134422.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 18SHtEJR007322; Tue, 28 Sep 2021 23:25:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pps0720; bh=SZeEne2s0UzzcEydWHnzGDYUATSFJw3nmWc7LJ4GbEg=; b=i8b/w4yfDuxFkHMIeWIHSPBo1ObbdIQT7xx/cYnaVEiJeCi+CBmNpRCxRQaKcE9WtabP Pb7zNazj/4nGjGLVfY4ExfwUIuoPaKXZ9/6XH7KUrIVwFp1sh16iyuEJGds+a/kJSzeh ibhD/6g4bRbg4HXY4g1gKYWoYT20rakCbL0VoF50jy8swC73o+J6omXPeg71DLtLwin1 kI9r1+39juT8RLIsuQb6DLBNHJkfbqRsSztI5eknK8MJ6uslf7kxocxOcl0klLTtIEVv N7M4svJPef90aC+8zT85TyVzT/b1idMNnG5QKN1m9TBV+U45vNuRXSfHuCN7YHHzWYE2 Dw== Received: from g2t2353.austin.hpe.com (g2t2353.austin.hpe.com [15.233.44.26]) by mx0b-002e3701.pphosted.com with ESMTP id 3bc7vaa722-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 28 Sep 2021 23:25:49 +0000 Received: from G9W8454.americas.hpqcorp.net (g9w8454.houston.hp.com [16.216.161.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g2t2353.austin.hpe.com (Postfix) with ESMTPS id AB81689; Tue, 28 Sep 2021 23:25:48 +0000 (UTC) Received: from G1W8108.americas.hpqcorp.net (2002:10c1:483c::10c1:483c) by G9W8454.americas.hpqcorp.net (2002:10d8:a104::10d8:a104) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Tue, 28 Sep 2021 23:25:48 +0000 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (15.241.52.12) by G1W8108.americas.hpqcorp.net (16.193.72.60) with Microsoft SMTP Server (TLS) id 15.0.1497.23 via Frontend Transport; Tue, 28 Sep 2021 23:25:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GKkaJZnksw6cPNXrFhNNeY67+veuPRhZDL+3h2m0UuCyQNLANhvtWv6SWiWX2JnbCzb5UhR4UoKqQY4TIwODXNVD8q3U+NgzMiTZTGzz9ixoUffFBcwAc4PXsCUiNKKory8Wwzm0F1fLUjjeIKXXtDGgfIKTInL77YhjRdRdILrd4I30TRrSxu4vulw0t2OcVyH/FQHgQCtKNnOJ41OPx+EVj5s6lDIHCHXcP51BNorVYxeuLgcKrXhk5VyAnWSqVk7wmnvPTfNjmsFPCjKpN3NSKXdTtC0rmDWX8LcUxUl0HiPykoYkREvRdnxyyhhA3DN7w1+kVIuaVHNps/RVnQ== 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; bh=SZeEne2s0UzzcEydWHnzGDYUATSFJw3nmWc7LJ4GbEg=; b=GzkdaySxt/p3DRwA99uVKSn6jqrBTlhzllSgT0PNoKx2pahM9UUbbXB+Lpd+CxdIKwaHJhBlKKXcnCrWYrhGaz+Ka0o8wg2dqYMLzoUIqmChus3ZozBr48lFwqkyHz8BgyNcQqszJZ1sKuC1osaaxY7owCpk6a8V8A9eVa1vxU+65g/5tRg9gUwV28EnJ5oheJxZuIl4vVypZ2e0v21cYicczX2Z6duHS7bgfirTwXK+jnfUko/guDjp2A8Es1Rm+LksHfX7bCOb6DsAbk27VtZbpb5i2R4dG1esPGNDwXR9MQFu7mTDywyi/0PfvlmSvbBIAwM9/L2nrrPq8zbzRg== 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 Authentication-Results: hpe.com; dkim=none (message not signed) header.d=none;hpe.com; dmarc=none action=none header.from=hpe.com; Received: from DF4PR8401MB0923.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:760f::13) by DF4PR8401MB0921.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:760c::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Tue, 28 Sep 2021 23:25:47 +0000 Received: from DF4PR8401MB0923.NAMPRD84.PROD.OUTLOOK.COM ([fe80::597f:4786:f1d6:8469]) by DF4PR8401MB0923.NAMPRD84.PROD.OUTLOOK.COM ([fe80::597f:4786:f1d6:8469%3]) with mapi id 15.20.4544.021; Tue, 28 Sep 2021 23:25:46 +0000 Message-ID: <98cf1905-22c1-9274-6005-8768adb67374@hpe.com> Date: Wed, 29 Sep 2021 07:25:35 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: [PATCH V2 8/9] ArmVirtPkg/FdtPciHostBridgeLib: Relocate FdtPciHostBridgeLib to OvmfPkg/Fdt To: Abner Chang , CC: Ard Biesheuvel , Leif Lindholm , Sami Mujawar , Jiewen Yao , Jordan Justen , Gerd Hoffmann , Sunil V L References: <20210928083107.7418-1-abner.chang@hpe.com> <20210928083107.7418-9-abner.chang@hpe.com> From: "Daniel Schaefer" In-Reply-To: <20210928083107.7418-9-abner.chang@hpe.com> X-ClientProxiedBy: HK0PR01CA0068.apcprd01.prod.exchangelabs.com (2603:1096:203:a6::32) To DF4PR8401MB0923.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:760f::13) MIME-Version: 1.0 Received: from [192.168.100.176] (123.193.59.220) by HK0PR01CA0068.apcprd01.prod.exchangelabs.com (2603:1096:203:a6::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.17 via Frontend Transport; Tue, 28 Sep 2021 23:25:43 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2792397c-bd67-4e5c-130d-08d982d74c86 X-MS-TrafficTypeDiagnostic: DF4PR8401MB0921: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QwIix/Y6Pvo31mnYiChBIZC3Z8/QCiIIRCmblGIbusybXrzIpZ3GVWLEzWmLA6sgZ31U8Z+AnwD840WYWtwlaMTp8egqf+ICxcmnWWCoseJHrnUjlHsYg/ZxAZOeb1dclD+9jI0kcq2OAA7r6v99BIxzuCicGLD/fCAkOdVBk+kV7BsIKYRP1NsCAa437Dx019/9LYChw9P/nnbEUsE7+wZHkFMKk1cNLHbqs3ZCgU/MIaNP25ZpYeRoFQ7fmYoBglz/8xBt0JOJ/1Bx0ZXVfAurdp/laN8J49KBgZ38p8nRHo8VRC3zq3uydpLcOOVkwTCVQVIr4s1pLpXIH8UIi38KWMMPLsjzIgfVYHarvYxL9ORsqQobI8sNvOIW+T8JJU4AP6MkSnL4xhM+7Ku21jl5k+EwsdzZ1b5o5MQCEhBjQ85ahXjyRASw7fa8QOhLijhsPo3uPuPOhHiRimLO/7CNkMwsB1mBJXPT6/3hBnG56qrCQB3ybJb7ut4w7Xk4ZCYmkBn77cjXCCoB8uEQCeMoi/sGylLgw8gxxOsp73fyFdepEn8R2t+JO+tVbf6X8bIPhoLOmiNotjHp/F37uGbJ77E3i6aSlPrPCIOJRNjUStO59Dl9aRf9HTZgEKjUBVPrSYIF1XWBE2BtvJE4uBAXPtaKjXebcKIfTPB1mviVnJRPlmhr8IuZKgAnD2wk/PYkoDHu5S4B7Cp3mcxAO7+6A68j24uXQDQ+awB0r5c= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DF4PR8401MB0923.NAMPRD84.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(366004)(26005)(66946007)(2906002)(44832011)(66556008)(83380400001)(16576012)(36756003)(186003)(5660300002)(66476007)(6666004)(316002)(86362001)(53546011)(31696002)(8676002)(54906003)(4326008)(31686004)(19627235002)(8936002)(508600001)(38100700002)(6486002)(2616005)(956004)(213903007)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?K0swNm42Y2RjL01oTVN4aFBmdW1VN3ZtNFRsZVd2RzBsbDJKTnVPNGVQb1ZS?= =?utf-8?B?aXlBNmlmNk9zOTN4SUtFUnlrcG0waUVpQ0loejRaM1BVaVFWZi8zd1luY0F2?= =?utf-8?B?OTVlRTB6TFRmUVFNT0RvVnRONFNyYjlvTFVaTkNQRHR2QmZoNVVLNHlHU3M2?= =?utf-8?B?T0FDNUtVL3I5VmUzK1R2TFNtWmk3S2VuZDRiU2hyRlliSW9XVnNielB4eWor?= =?utf-8?B?YXo5bWRoZHJRTE16SG84R0VlVm5KVkdDQzhBT3Z6WmlubkdCMmJacjNVMEVM?= =?utf-8?B?NE95TEUxMlBKQUM2WjJ5OVhNTWZOaEs4T09NbFdsSkpPdUp4NDM5N0dESzY4?= =?utf-8?B?WE9VMDNTYnNPWkE0RXJxRmtIQXZUU0loK1M4UHRWUTZDaUdUbFF6ajFOYUp4?= =?utf-8?B?TC8rajZSc1I4NTY1c1E2RTYybTlod1h6ckJ0QmlGaWlLenlvZis4QmNXUklX?= =?utf-8?B?SXowWDlteEZUdTF0R2U5UmRQKytWOVRwOVdYWWR0NmFtYlZuNFRLeG5BMEF0?= =?utf-8?B?eXpFeDBlaUUrazhtbXhLS3pxUzJDMVdQRGgvZWZ4WVlGN01DcnBCcUZMWVVK?= =?utf-8?B?ZUpPZzRnMWdsM1B5ZDdIVDJnbHVBeUdvNzFacVFjeGxBRUxaWE1QYTNCbjFL?= =?utf-8?B?UDRMOWp2clpXTk9JK2hpeUE3Z2k5R1FmbDVtc1BFRXdCZWVvYUF0cm14cWYr?= =?utf-8?B?NG5JT0FMMzZiMkxOUVVmQlVZeURCdWc2YmgyVkltaFhKT2w1OWN4dC9ndEEx?= =?utf-8?B?bWlQK0ZZV050MHJHanRRbzBHNExSSWxrNDArbHVYWDBOUXpxMnFVbW40aEdO?= =?utf-8?B?dkJ1c3U0blo0K0xNS0dtc3FsWUNsU1ByOHNtbkhOOHhCUldjRG4zdENlVzNM?= =?utf-8?B?djVTOTRUSndaNVdlZzk0NmwrVEcwRjY3azNVZmVRaVY3VlZ0ZVpwQlpWMjNy?= =?utf-8?B?TlBvZWU3ZHd5T3V0WHVTSjlMMi8wTjF4UktjRXhjOE5iWGtsbWtGVWE4SU01?= =?utf-8?B?NWtkdGl6UmxDYnYwUTJQdk92dFdiS09KN0xGem9WUE0zbEY2dDcyZTNDbnBa?= =?utf-8?B?RlRoTmVxYUlpdzJOQ2RxWHFnU0IwamNZZHNSOW0zTUd2V3FFMXFnV3kwVWdS?= =?utf-8?B?Z3Z5OU00dWVXUDZvSVhRRFZCTDRDcDhHYVJrY3psSk9aVEZVUHpCT21XTUlH?= =?utf-8?B?KzZ5alVtU3VpRk5FOUN3aWtrYmRCOE9ZajF0VDJXOFd2dUgvaUtSaDhVVTdD?= =?utf-8?B?Q1BXRElTMllCc1E2eUs3WjJPaHNzNzN3N0VpN0I4ZFV0aDdlNnRVUitHT01C?= =?utf-8?B?RFRGQ05JZ2ZQNzY3VVM4cVU3bkVWcEZGZXNJNmo5WUE4eW13dFQ4amd5NkdE?= =?utf-8?B?UDgwVXdnLzF2Q2RRcHAxTUVkd2k4ZFl6bU1JejBGcE5JQnJ3Rm5lWDBQZkFP?= =?utf-8?B?VXRiK2hUdjBZQzhJRDVXSWVZS2Q5VWZpK1NQeC9XQ3YwUG1HbWQ0cTEvbkRN?= =?utf-8?B?MERSS25ZWEh0M0hYeW5qdldmaExXYmc2QWVIa2F5ellCWmlYbm4yTjdCVGI1?= =?utf-8?B?S0IzWWczQURiNi85WWs3bVZIZitveDdIczgzR0llRi9TZDBpUmFEYXdrSksx?= =?utf-8?B?amVuQWdHek5NSWlFU1I0UVhZemp4THhxa3MxR3pBSWRMdTZ2RGlYNFpUamlJ?= =?utf-8?B?V0xDTFhNUWM4S0VPbG84bGNYcFdrRFRnNHBlanBQWkJ1dHFqZFdDSmlXQ2Jp?= =?utf-8?Q?YuDbWf5SgKTHhgHXRI6392Ax1Uj0YxiLA8Q6AN4?= X-MS-Exchange-CrossTenant-Network-Message-Id: 2792397c-bd67-4e5c-130d-08d982d74c86 X-MS-Exchange-CrossTenant-AuthSource: DF4PR8401MB0923.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2021 23:25:46.8408 (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: BEhA2lrNUyWr923lMJ3SI7EktVXog7rlZroGZVIeEgIQ6cWinJn7UyZbw3oB8OVsTHItUTI/2RSdEfvPjNub7Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR8401MB0921 X-OriginatorOrg: hpe.com X-Proofpoint-GUID: 5eN7ltJTJOP_v6WsVAvZDu2KVdHG3-22 X-Proofpoint-ORIG-GUID: 5eN7ltJTJOP_v6WsVAvZDu2KVdHG3-22 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-09-28_10,2021-09-28_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 spamscore=0 suspectscore=0 mlxlogscore=961 priorityscore=1501 malwarescore=0 impostorscore=0 adultscore=0 bulkscore=0 lowpriorityscore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2109280136 Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Looks good. Just one minor typo in the comment. Reviewed-By: Daniel Schaefer On 9/28/21 16:31, Abner Chang wrote: > 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 | 8 +++----- > .../Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c | 0 > 7 files changed, 11 insertions(+), 15 deletions(-) > rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf (81%) > rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c (100%) > > diff --git a/ArmPkg/ArmPkg.dec b/ArmPkg/ArmPkg.dec > index 12584fb319..8a512b7035 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 = IoCpuBase - PcdPciIoBase; > - # PcdPciMmio32Translation = Mmio32CpuBase - (UINT64)PcdPciMmio32Base; > - # PcdPciMmio64Translation = Mmio64CpuBase - PcdPciMmio64Base; > + # gEfiMdePkgTokenSpaceGuid.PcdPciMmio32Translation = Mmio32CpuBase - (UINT64)PcdPciMmio32Base; > + # gEfiMdePkgTokenSpaceGuid.PcdPciMmio64Translation = 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 *modular* > @@ -358,9 +358,9 @@ > # TranslatedIoAddress = UntranslatedIoAddress + > # gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslation; > # TranslatedMmio32Address = (UINT64)UntranslatedMmio32Address + > - # PcdPciMmio32Translation; > + # gEfiMdePkgTokenSpaceGuid..PcdPciMmio32Translation; Should be one period instead of two. > # TranslatedMmio64Address = UntranslatedMmio64Address + > - # PcdPciMmio64Translation; > + # gEfiMdePkgTokenSpaceGuid.PcdPciMmio64Translation; > # > # The modular arithmetic performed in UINT64 ensures that the translation > # 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 > > # > # 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.inf > - PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf > + PciHostBridgeLib|OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf > PciHostBridgeUtilityLib|ArmVirtPkg/Library/ArmVirtPciHostBridgeUtilityLib/ArmVirtPciHostBridgeUtilityLib.inf > > TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.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 @@ > > PciPcdProducerLib|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf > PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf > - PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf > + PciHostBridgeLib|OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf > PciHostBridgeUtilityLib|ArmVirtPkg/Library/ArmVirtPciHostBridgeUtilityLib/ArmVirtPciHostBridgeUtilityLib.inf > > TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf > diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc > index 6c949fd559..4624b6ec36 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.inf > - PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf > + PciHostBridgeLib|OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf > PciHostBridgeUtilityLib|OvmfPkg/Library/PciHostBridgeUtilityLib/PciHostBridgeUtilityLib.inf > > !if $(TPM2_ENABLE) == TRUE > diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc > index 64035a948d..426e0ff1fd 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.inf > - PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf > + PciHostBridgeLib|OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf > PciHostBridgeUtilityLib|OvmfPkg/Library/PciHostBridgeUtilityLib/PciHostBridgeUtilityLib.inf > TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf > > diff --git a/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf b/OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf > similarity index 81% > rename from ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf > rename to OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf > index f149693fa2..e610e3d03f 100644 > --- a/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf > +++ b/OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf > @@ -20,15 +20,13 @@ > # The following information is for reference only and not required by the build > # tools. > # > -# VALID_ARCHITECTURES = AARCH64 ARM > +# VALID_ARCHITECTURES = AARCH64 ARM RISCV64 > # > > [Sources] > FdtPciHostBridgeLib.c > > [Packages] > - ArmPkg/ArmPkg.dec > - ArmVirtPkg/ArmVirtPkg.dec > EmbeddedPkg/EmbeddedPkg.dec > MdeModulePkg/MdeModulePkg.dec > MdePkg/MdePkg.dec > @@ -44,8 +42,8 @@ > PciPcdProducerLib > > [FixedPcd] > - gArmTokenSpaceGuid.PcdPciMmio32Translation > - gArmTokenSpaceGuid.PcdPciMmio64Translation > + gEfiMdePkgTokenSpaceGuid.PcdPciMmio32Translation > + gEfiMdePkgTokenSpaceGuid.PcdPciMmio64Translation > > [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 >