From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32]) by mx.groups.io with SMTP id smtpd.web08.5318.1611018895125952779 for ; Mon, 18 Jan 2021 17:14:55 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: huawei.com, ip: 45.249.212.32, mailfrom: cenjiahui@huawei.com) Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4DKVzT4F9Yzj8C0; Tue, 19 Jan 2021 09:13:57 +0800 (CST) Received: from localhost (10.174.184.155) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.498.0; Tue, 19 Jan 2021 09:14:44 +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 v6 00/11] Add extra pci roots support for Arm Date: Tue, 19 Jan 2021 09:12:51 +0800 Message-ID: <20210119011302.10908-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 v5->v6: * Annotate library functions with EFIAPI, IN/OUT, @param[in]/[out]. * Split BusMin/BusMax addtion in PciHostBridgeUtilityGetRootBridges() int= o a separate patch [09/11]. * Add more detailed commit message for patch [10/11]. v4->v5: * Revert some risky renames. * Explicitly list PcdLib dependency. * Fix issues reported by PatchCheck.py. 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. v4: https://edk2.groups.io/g/devel/message/70147 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 (11): OvmfPkg: Introduce PciHostBridgeUtilityLib class ArmVirtPkg: Refactor with PciHostBridgeUtilityLib OvmfPkg/PciHostBridgeLib: List missing PcdLib dependency OvmfPkg/PciHostBridgeLib: Extract InitRootBridge() / UninitRootBridge() OvmfPkg/PciHostBridgeUtilityLib: Extend parameters of InitRootBridge() ArmVirtPkg/FdtPciHostBridgeLib: Refactor init/uninit of root bridge OvmfPkg/PciHostBridgeLib: Extract GetRootBridges() / FreeRootBridges() OvmfPkg/PciHostBridgeUtilityLib: Extend parameter list of GetRootBridges OvmfPkg/PciHostBridgeUtilityLib: Extend GetRootBridges() with BusMin/BusMax ArmVirtPkg/FdtPciHostBridgeLib: Add extra pci root buses support 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 = | 4 +- OvmfPkg/Library/PciHostBridgeUtilityLib/PciHostBridgeUtilityLib.inf = | 43 +++ OvmfPkg/Include/Library/PciHostBridgeUtilityLib.h = | 185 +++++++++++ OvmfPkg/Library/PciHostBridgeLib/PciHostBridge.h = | 56 ---- ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c = | 164 ++++------ OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c = | 324 +------------------- OvmfPkg/Library/PciHostBridgeLib/XenSupport.c = | 5 +- OvmfPkg/Library/{PciHostBridgeLib/PciHostBridgeLib.c =3D> PciHostBridgeU= tilityLib/PciHostBridgeUtilityLib.c} | 281 +++++++++-------- ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc = | 1 + 20 files changed, 467 insertions(+), 614 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} (50%) --=20 2.29.2