]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/Library/PciHostBridgeLib/PciHostBridge.h
OvmfPkg/QemuVideoDxe: Shouldn't assume system in VGA alias mode.
[mirror_edk2.git] / OvmfPkg / Library / PciHostBridgeLib / PciHostBridge.h
1 /** @file
2 Header file of OVMF instance of PciHostBridgeLib.
3
4 Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
5
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 **/
9
10 PCI_ROOT_BRIDGE *
11 ScanForRootBridges (
12 UINTN *NumberOfRootBridges
13 );
14
15 /**
16 Initialize a PCI_ROOT_BRIDGE structure.
17
18 @param[in] Supports Supported attributes.
19
20 @param[in] Attributes Initial attributes.
21
22 @param[in] AllocAttributes Allocation attributes.
23
24 @param[in] RootBusNumber The bus number to store in RootBus.
25
26 @param[in] MaxSubBusNumber The inclusive maximum bus number that can be
27 assigned to any subordinate bus found behind any
28 PCI bridge hanging off this root bus.
29
30 The caller is repsonsible for ensuring that
31 RootBusNumber <= MaxSubBusNumber. If
32 RootBusNumber equals MaxSubBusNumber, then the
33 root bus has no room for subordinate buses.
34
35 @param[in] Io IO aperture.
36
37 @param[in] Mem MMIO aperture.
38
39 @param[in] MemAbove4G MMIO aperture above 4G.
40
41 @param[in] PMem Prefetchable MMIO aperture.
42
43 @param[in] PMemAbove4G Prefetchable MMIO aperture above 4G.
44
45 @param[out] RootBus The PCI_ROOT_BRIDGE structure (allocated by the
46 caller) that should be filled in by this
47 function.
48
49 @retval EFI_SUCCESS Initialization successful. A device path
50 consisting of an ACPI device path node, with
51 UID = RootBusNumber, has been allocated and
52 linked into RootBus.
53
54 @retval EFI_OUT_OF_RESOURCES Memory allocation failed.
55 **/
56 EFI_STATUS
57 InitRootBridge (
58 IN UINT64 Supports,
59 IN UINT64 Attributes,
60 IN UINT64 AllocAttributes,
61 IN UINT8 RootBusNumber,
62 IN UINT8 MaxSubBusNumber,
63 IN PCI_ROOT_BRIDGE_APERTURE *Io,
64 IN PCI_ROOT_BRIDGE_APERTURE *Mem,
65 IN PCI_ROOT_BRIDGE_APERTURE *MemAbove4G,
66 IN PCI_ROOT_BRIDGE_APERTURE *PMem,
67 IN PCI_ROOT_BRIDGE_APERTURE *PMemAbove4G,
68 OUT PCI_ROOT_BRIDGE *RootBus
69 );