Create an almost verbatim copy of the
"OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf" library instance.

The new PciHostBridgeLibScan instance will ultimately duplicate a
negligible amount of code from the original, and will be used by the Bhyve
and OvmfXen platforms.

List the new driver in "Maintainers.txt", in the "OvmfPkg: bhyve-related
modules" and "OvmfPkg: Xen-related modules" sections.

This patch should be reviewed with "git show --find-copies-harder".

Cc: Anthony Perard <anthony.per...@citrix.com>
Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Jordan Justen <jordan.l.jus...@intel.com>
Cc: Julien Grall <jul...@xen.org>
Cc: Peter Grehan <gre...@freebsd.org>
Cc: Philippe Mathieu-Daudé <phi...@redhat.com>
Cc: Rebecca Cran <rebe...@bsdio.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2122
Signed-off-by: Laszlo Ersek <ler...@redhat.com>
---
 OvmfPkg/Library/{PciHostBridgeLib/PciHostBridgeLib.inf => 
PciHostBridgeLibScan/PciHostBridgeLibScan.inf} | 6 +++---
 Maintainers.txt                                                                
                          | 2 ++
 OvmfPkg/Library/{PciHostBridgeLib => PciHostBridgeLibScan}/PciHostBridge.h     
                          | 1 +
 OvmfPkg/Library/{PciHostBridgeLib => PciHostBridgeLibScan}/PciHostBridgeLib.c  
                          | 2 +-
 OvmfPkg/Library/{PciHostBridgeLib => PciHostBridgeLibScan}/XenSupport.c        
                          | 1 +
 5 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf 
b/OvmfPkg/Library/PciHostBridgeLibScan/PciHostBridgeLibScan.inf
similarity index 84%
copy from OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf
copy to OvmfPkg/Library/PciHostBridgeLibScan/PciHostBridgeLibScan.inf
index 622780888472..46859388870f 100644
--- a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf
+++ b/OvmfPkg/Library/PciHostBridgeLibScan/PciHostBridgeLibScan.inf
@@ -1,21 +1,21 @@
 ## @file
 #  OVMF's instance of the PCI Host Bridge Library.
 #
-#  Copyright (C) 2016, Red Hat, Inc.
+#  Copyright (C) 2016-2021, Red Hat, Inc.
 #  Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 #
 ##
 
 [Defines]
   INF_VERSION                    = 0x00010005
-  BASE_NAME                      = PciHostBridgeLib
-  FILE_GUID                      = 9F2BC05E-51EA-4AED-9A3E-7699641734E8
+  BASE_NAME                      = PciHostBridgeLibScan
+  FILE_GUID                      = c93f2411-9bf5-4894-b552-67fae0c3d291
   MODULE_TYPE                    = DXE_DRIVER
   VERSION_STRING                 = 1.0
   LIBRARY_CLASS                  = PciHostBridgeLib
 
 #
 # The following information is for reference only and not required by the build
diff --git a/Maintainers.txt b/Maintainers.txt
index be40a1d6f2b6..a273409a923f 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -432,12 +432,13 @@ OvmfPkg: bhyve-related modules
 F: OvmfPkg/Bhyve/
 F: OvmfPkg/Include/IndustryStandard/Bhyve.h
 F: OvmfPkg/Include/Library/BhyveFwCtlLib.h
 F: OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLibBhyve.c
 F: OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLibBhyve.inf
 F: OvmfPkg/Library/BhyveFwCtlLib/
+F: OvmfPkg/Library/PciHostBridgeLibScan/
 F: OvmfPkg/Library/PlatformBootManagerLibBhyve/
 F: OvmfPkg/Library/ResetSystemLib/BaseResetShutdownBhyve.c
 F: OvmfPkg/Library/ResetSystemLib/BaseResetSystemLibBhyve.inf
 R: Rebecca Cran <rebe...@bsdio.com>
 R: Peter Grehan <gre...@freebsd.org>
 
@@ -490,12 +491,13 @@ F: OvmfPkg/Include/IndustryStandard/Xen/
 F: OvmfPkg/Include/Library/XenHypercallLib.h
 F: OvmfPkg/Include/Library/XenIoMmioLib.h
 F: OvmfPkg/Include/Library/XenPlatformLib.h
 F: OvmfPkg/Include/Protocol/XenBus.h
 F: OvmfPkg/Include/Protocol/XenIo.h
 F: OvmfPkg/Library/PciHostBridgeLib/XenSupport.c
+F: OvmfPkg/Library/PciHostBridgeLibScan/
 F: OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
 F: OvmfPkg/Library/XenConsoleSerialPortLib/
 F: OvmfPkg/Library/XenHypercallLib/
 F: OvmfPkg/Library/XenIoMmioLib/
 F: OvmfPkg/Library/XenPlatformLib/
 F: OvmfPkg/Library/XenRealTimeClockLib/
diff --git a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridge.h 
b/OvmfPkg/Library/PciHostBridgeLibScan/PciHostBridge.h
similarity index 83%
copy from OvmfPkg/Library/PciHostBridgeLib/PciHostBridge.h
copy to OvmfPkg/Library/PciHostBridgeLibScan/PciHostBridge.h
index a2e4d8696281..582b7929aff2 100644
--- a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridge.h
+++ b/OvmfPkg/Library/PciHostBridgeLibScan/PciHostBridge.h
@@ -1,9 +1,10 @@
 /** @file
   Header file of OVMF instance of PciHostBridgeLib.
 
+  Copyright (C) 2021, Red Hat, Inc.
   Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
diff --git a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c 
b/OvmfPkg/Library/PciHostBridgeLibScan/PciHostBridgeLib.c
similarity index 95%
copy from OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c
copy to OvmfPkg/Library/PciHostBridgeLibScan/PciHostBridgeLib.c
index 6db91fb7e20c..6c2acc9f99bc 100644
--- a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c
+++ b/OvmfPkg/Library/PciHostBridgeLibScan/PciHostBridgeLib.c
@@ -1,10 +1,10 @@
 /** @file
   OVMF's instance of the PCI Host Bridge Library.
 
-  Copyright (C) 2016, Red Hat, Inc.
+  Copyright (C) 2016-2021, Red Hat, Inc.
   Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 #include <IndustryStandard/Pci.h>                     // PCI_MAX_BUS
diff --git a/OvmfPkg/Library/PciHostBridgeLib/XenSupport.c 
b/OvmfPkg/Library/PciHostBridgeLibScan/XenSupport.c
similarity index 96%
copy from OvmfPkg/Library/PciHostBridgeLib/XenSupport.c
copy to OvmfPkg/Library/PciHostBridgeLibScan/XenSupport.c
index 07c498dd0ea2..a4a61e5836e0 100644
--- a/OvmfPkg/Library/PciHostBridgeLib/XenSupport.c
+++ b/OvmfPkg/Library/PciHostBridgeLibScan/XenSupport.c
@@ -1,9 +1,10 @@
 /** @file
   Scan the entire PCI bus for root bridges to support OVMF above Xen.
 
+  Copyright (C) 2021, Red Hat, Inc.
   Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
-- 
2.19.1.3.g30247aa5d201




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#75700): https://edk2.groups.io/g/devel/message/75700
Mute This Topic: https://groups.io/mt/83110927/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to