diff options
author | Jiahui Cen via groups.io <cenjiahui=huawei.com@groups.io> | 2021-01-19 09:12:52 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-01-20 16:14:20 +0000 |
commit | 7a6172f88bb0bb93bdac3cc6cb62143f89adb8d2 (patch) | |
tree | c393a1987930cc8aecf6ec2dc12a24f8898c20f4 /OvmfPkg/Include | |
parent | ca272b9513a6de5772e6e8ef5bbecd2e23cf9fb3 (diff) | |
download | edk2-7a6172f88bb0bb93bdac3cc6cb62143f89adb8d2.tar.gz edk2-7a6172f88bb0bb93bdac3cc6cb62143f89adb8d2.tar.bz2 edk2-7a6172f88bb0bb93bdac3cc6cb62143f89adb8d2.zip |
OvmfPkg: Introduce PciHostBridgeUtilityLib class
Introduce a new PciHostBridgeUtilityLib class to share duplicate code
between OvmfPkg and ArmVirtPkg.
Extract function PciHostBridgeUtilityResourceConflict from
PciHostBridgeResourceConflict in OvmfPkg/PciHostBridgeLib.
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3059
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Rebecca Cran <rebecca@bsdio.com>
Cc: Peter Grehan <grehan@freebsd.org>
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Julien Grall <julien@xen.org>
Signed-off-by: Jiahui Cen <cenjiahui@huawei.com>
Signed-off-by: Yubo Miao <miaoyubo@huawei.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20210119011302.10908-2-cenjiahui@huawei.com>
Diffstat (limited to 'OvmfPkg/Include')
-rw-r--r-- | OvmfPkg/Include/Library/PciHostBridgeUtilityLib.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/OvmfPkg/Include/Library/PciHostBridgeUtilityLib.h b/OvmfPkg/Include/Library/PciHostBridgeUtilityLib.h new file mode 100644 index 0000000000..5ea25ed2f4 --- /dev/null +++ b/OvmfPkg/Include/Library/PciHostBridgeUtilityLib.h @@ -0,0 +1,38 @@ +/** @file
+ Provide common utility functions to PciHostBridgeLib instances in
+ ArmVirtPkg and OvmfPkg.
+
+ Copyright (C) 2016, Red Hat, Inc.
+ Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2020, Huawei Corporation. All rights reserved.<BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __PCI_HOST_BRIDGE_UTILITY_LIB_H__
+#define __PCI_HOST_BRIDGE_UTILITY_LIB_H__
+
+
+/**
+ Utility function to inform the platform that the resource conflict happens.
+
+ @param[in] Configuration Pointer to PCI I/O and PCI memory resource
+ descriptors. The Configuration contains the
+ resources for all the root bridges. The resource
+ for each root bridge is terminated with END
+ descriptor and an additional END is appended
+ indicating the end of the entire resources. The
+ resource descriptor field values follow the
+ description in
+ EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL
+ .SubmitResources().
+**/
+VOID
+EFIAPI
+PciHostBridgeUtilityResourceConflict (
+ IN VOID *Configuration
+ );
+
+
+#endif // __PCI_HOST_BRIDGE_UTILITY_LIB_H__
|