From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) by mx.groups.io with SMTP id smtpd.web10.7002.1610444776663509228 for ; Tue, 12 Jan 2021 01:46:17 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: huawei.com, ip: 45.249.212.191, mailfrom: cenjiahui@huawei.com) Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4DFQfc5KZhzj6fC; Tue, 12 Jan 2021 17:45:12 +0800 (CST) Received: from localhost (10.174.184.155) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.498.0; Tue, 12 Jan 2021 17:46:02 +0800 From: "Jiahui Cen" To: CC: Jordan Justen , Laszlo Ersek , Ard Biesheuvel , Rebecca Cran , Peter Grehan , Anthony Perard , Julien Grall , Leif Lindholm , Sami Mujawar , , , Jiahui Cen , Yubo Miao Subject: [PATCH v4 0/9] Add extra pci roots support for Arm Date: Tue, 12 Jan 2021 17:45:40 +0800 Message-ID: <20210112094549.10238-1-cenjiahui@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.174.184.155] X-CFilter-Loop: Reflected Content-Type: text/plain Content-Transfer-Encoding: quoted-printable v3->v4: * Refactor InitRootBridges/UninitRootBridges/GetRootBridges/FreeRootBridg= es. * Fix library dependencies. v2->v3: * Rename utility functions under the PciHostBridgeUtilityLib namespace. * Remove some unused Library dependencies. * Sort the Include headers. v1->v2: * Separated into four patches. * Factor the same logic parts into a new library. v3: https://edk2.groups.io/g/devel/message/69382 BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3059 QEMU: https://lore.kernel.org/qemu-devel/20201119014841.7298-1-cenjiahui@= huawei.com/ This patch series adds support for extra pci roots for ARM. 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: Rebecca Cran Cc: Peter Grehan Cc: Anthony Perard Cc: Julien Grall Cc: Leif Lindholm Cc: Sami Mujawar Signed-off-by: Jiahui Cen Signed-off-by: Yubo Miao Jiahui Cen (9): OvmfPkg: Introduce PciHostBridgeUtilityLib class ArmVirtPkg: Refactor with PciHostBridgeUtilityLib OvmfPkg/PciHostBridgeLib: Extract InitRootBridge/UninitRootBridge OvmfPkg/PciHostBridgeUtilityLib: Extend parameter list of InitRootBridge ArmVirtPkg/FdtPciHostBridgeLib: Rebase to InitRootBridge() / UninitRootBridge() OvmfPkg/PciHostBridgeLib: Extract GetRootBridges/FreeRootBridges OvmfPkg/PciHostBridgeUtilityLib: Extend parameter list of GetRootBridges ArmVirtPkg/FdtPciHostBridgeLib: Refactor GetRootBridges() / FreeRootBridges() ArmVirtPkg/ArmVirtQemu: Add support for HotPlug OvmfPkg/OvmfPkg.dec = | 4 + ArmVirtPkg/ArmVirtKvmTool.dsc = | 1 + ArmVirtPkg/ArmVirtQemu.dsc = | 2 + ArmVirtPkg/ArmVirtQemuKernel.dsc = | 2 + OvmfPkg/AmdSev/AmdSevX64.dsc = | 1 + OvmfPkg/Bhyve/BhyveX64.dsc = | 1 + OvmfPkg/OvmfPkgIa32.dsc = | 1 + OvmfPkg/OvmfPkgIa32X64.dsc = | 1 + OvmfPkg/OvmfPkgX64.dsc = | 1 + OvmfPkg/OvmfXen.dsc = | 1 + ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf = | 3 + OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf = | 3 +- OvmfPkg/Library/PciHostBridgeUtilityLib/PciHostBridgeUtilityLib.inf = | 43 +++ OvmfPkg/Include/Library/PciHostBridgeUtilityLib.h = | 182 +++++++++++ OvmfPkg/Library/PciHostBridgeLib/PciHostBridge.h = | 56 ---- ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c = | 164 ++++------ OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c = | 321 +------------------- OvmfPkg/Library/PciHostBridgeLib/XenSupport.c = | 4 +- OvmfPkg/Library/{PciHostBridgeLib/PciHostBridgeLib.c =3D> PciHostBridgeU= tilityLib/PciHostBridgeUtilityLib.c} | 247 ++++++++------- ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc = | 1 + 20 files changed, 435 insertions(+), 604 deletions(-) create mode 100644 OvmfPkg/Library/PciHostBridgeUtilityLib/PciHostBridge= UtilityLib.inf create mode 100644 OvmfPkg/Include/Library/PciHostBridgeUtilityLib.h copy OvmfPkg/Library/{PciHostBridgeLib/PciHostBridgeLib.c =3D> PciHostBr= idgeUtilityLib/PciHostBridgeUtilityLib.c} (57%) --=20 2.29.2