]> git.proxmox.com Git - mirror_edk2.git/blame - OvmfPkg/Library/PciHostBridgeLibScan/PciHostBridgeLib.c
OvmfPkg: Apply uncrustify changes
[mirror_edk2.git] / OvmfPkg / Library / PciHostBridgeLibScan / PciHostBridgeLib.c
CommitLineData
e120c962 1/** @file\r
8af38170 2 OVMF's instance of the PCI Host Bridge Library, for Bhyve and Xen guests.\r
e120c962
LE
3\r
4 Copyright (C) 2016-2021, Red Hat, Inc.\r
5 Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
6\r
7 SPDX-License-Identifier: BSD-2-Clause-Patent\r
8\r
9**/\r
33d4f3e3 10#include <Library/PciHostBridgeLib.h> // PCI_ROOT_BRIDGE\r
e120c962 11#include <Library/PciHostBridgeUtilityLib.h> // PciHostBridgeUtilit...\r
e120c962
LE
12\r
13#include "PciHostBridge.h"\r
14\r
e120c962
LE
15/**\r
16 Return all the root bridge instances in an array.\r
17\r
18 @param Count Return the count of root bridge instances.\r
19\r
20 @return All the root bridge instances in an array.\r
21 The array should be passed into PciHostBridgeFreeRootBridges()\r
22 when it's not used.\r
23**/\r
24PCI_ROOT_BRIDGE *\r
25EFIAPI\r
26PciHostBridgeGetRootBridges (\r
ac0a286f 27 UINTN *Count\r
e120c962
LE
28 )\r
29{\r
33d4f3e3 30 return ScanForRootBridges (Count);\r
e120c962
LE
31}\r
32\r
e120c962
LE
33/**\r
34 Free the root bridge instances array returned from\r
35 PciHostBridgeGetRootBridges().\r
36\r
37 @param The root bridge instances array.\r
38 @param The count of the array.\r
39**/\r
40VOID\r
41EFIAPI\r
42PciHostBridgeFreeRootBridges (\r
ac0a286f
MK
43 PCI_ROOT_BRIDGE *Bridges,\r
44 UINTN Count\r
e120c962
LE
45 )\r
46{\r
47 PciHostBridgeUtilityFreeRootBridges (Bridges, Count);\r
48}\r
49\r
e120c962
LE
50/**\r
51 Inform the platform that the resource conflict happens.\r
52\r
53 @param HostBridgeHandle Handle of the Host Bridge.\r
54 @param Configuration Pointer to PCI I/O and PCI memory resource\r
55 descriptors. The Configuration contains the resources\r
56 for all the root bridges. The resource for each root\r
57 bridge is terminated with END descriptor and an\r
58 additional END is appended indicating the end of the\r
59 entire resources. The resource descriptor field\r
60 values follow the description in\r
61 EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL\r
62 .SubmitResources().\r
63**/\r
64VOID\r
65EFIAPI\r
66PciHostBridgeResourceConflict (\r
ac0a286f
MK
67 EFI_HANDLE HostBridgeHandle,\r
68 VOID *Configuration\r
e120c962
LE
69 )\r
70{\r
71 PciHostBridgeUtilityResourceConflict (Configuration);\r
72}\r