From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.1661.1605171005406982743 for ; Thu, 12 Nov 2020 00:50:05 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ard.biesheuvel@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id ED9ED101E; Thu, 12 Nov 2020 00:50:04 -0800 (PST) Received: from [192.168.1.81] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 65EEF3F73C; Thu, 12 Nov 2020 00:50:03 -0800 (PST) Subject: Re: [PATCH v2 0/4] Add extra pci roots support for Arm To: Jiahui Cen , devel@edk2.groups.io Cc: jordan.l.justen@intel.com, lersek@redhat.com, leif@nuviainc.com, xieyingtai@huawei.com, miaoyubo@huawei.com References: <20201109130511.5946-1-cenjiahui@huawei.com> From: "Ard Biesheuvel" Message-ID: Date: Thu, 12 Nov 2020 09:49:52 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201109130511.5946-1-cenjiahui@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 11/9/20 2:05 PM, Jiahui Cen wrote: > Changes with v1 > v1->v2: > Separated into four patches. > Factor the same logic parts into a new library. > > v1: https://edk2.groups.io/g/devel/topic/72723351#56901 > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3059 > QEMU: https://lore.kernel.org/qemu-devel/20201103120157.2286-1-cenjiahui@huawei.com/ > > This patch series adds support for extra pci roots for ARM. > Why? > In order to avoid duplicated codes, we introduce a new library > PciHostBridgeUtilityLib which extracts common interfaces from > OvmfPkg/PciHostBridgeLib. It provides conflicts informing and extra pci > roots scanning. Using the utility lib, the uefi could scan for extra > root buses and recognize multiple roots for ARM. > > Cc: Jordan Justen > Cc: Laszlo Ersek > Cc: Ard Biesheuvel > Cc: Leif Lindholm > Signed-off-by: Yubo Miao > Signed-off-by: Jiahui Cen > > Yubo Miao (4): > OvmfPkg: Extract functions form PciHostBridgeLib > ArmVirtPkg: Use extracted PciHostBridgeUtilityLib > OvmfPkg: Extract functions of extra pci roots > ArmVirtPkg: Support extra pci roots > > ArmVirtPkg/ArmVirt.dsc.inc | 1 + > OvmfPkg/OvmfPkgIa32.dsc | 1 + > OvmfPkg/OvmfPkgIa32X64.dsc | 1 + > OvmfPkg/OvmfPkgX64.dsc | 1 + > OvmfPkg/OvmfXen.dsc | 1 + > ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf | 5 + > OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf | 1 + > OvmfPkg/Library/PciHostBridgeUtilityLib/PciHostBridgeUtilityLib.inf | 51 ++++ > OvmfPkg/Include/Library/PciHostBridgeUtilityLib.h | 98 +++++++ > ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c | 221 ++++++++------- > OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c | 234 +--------------- > OvmfPkg/Library/PciHostBridgeUtilityLib/PciHostBridgeUtilityLib.c | 283 ++++++++++++++++++++ > 12 files changed, 563 insertions(+), 335 deletions(-) > create mode 100644 OvmfPkg/Library/PciHostBridgeUtilityLib/PciHostBridgeUtilityLib.inf > create mode 100644 OvmfPkg/Include/Library/PciHostBridgeUtilityLib.h > create mode 100644 OvmfPkg/Library/PciHostBridgeUtilityLib/PciHostBridgeUtilityLib.c >