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