ArmPkg: only attempt buildin MmCommunicationDxe for AArch64
[mirror_edk2.git] / UefiPayloadPkg / Library / PciHostBridgeLib / PciHostBridge.h
1 /** @file
2 Header file of PciHostBridgeLib.
3
4 Copyright (C) 2016, 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
11 #ifndef _PCI_HOST_BRIDGE_H
12 #define _PCI_HOST_BRIDGE_H
13
14 typedef struct {
15 ACPI_HID_DEVICE_PATH AcpiDevicePath;
16 EFI_DEVICE_PATH_PROTOCOL EndDevicePath;
17 } CB_PCI_ROOT_BRIDGE_DEVICE_PATH;
18
19 PCI_ROOT_BRIDGE *
20 ScanForRootBridges (
21 UINTN *NumberOfRootBridges
22 );
23
24 /**
25 Initialize a PCI_ROOT_BRIDGE structure.
26
27 @param[in] Supports Supported attributes.
28
29 @param[in] Attributes Initial attributes.
30
31 @param[in] AllocAttributes Allocation attributes.
32
33 @param[in] RootBusNumber The bus number to store in RootBus.
34
35 @param[in] MaxSubBusNumber The inclusive maximum bus number that can be
36 assigned to any subordinate bus found behind any
37 PCI bridge hanging off this root bus.
38
39 The caller is responsible for ensuring that
40 RootBusNumber <= MaxSubBusNumber. If
41 RootBusNumber equals MaxSubBusNumber, then the
42 root bus has no room for subordinate buses.
43
44 @param[in] Io IO aperture.
45
46 @param[in] Mem MMIO aperture.
47
48 @param[in] MemAbove4G MMIO aperture above 4G.
49
50 @param[in] PMem Prefetchable MMIO aperture.
51
52 @param[in] PMemAbove4G Prefetchable MMIO aperture above 4G.
53
54 @param[out] RootBus The PCI_ROOT_BRIDGE structure (allocated by the
55 caller) that should be filled in by this
56 function.
57
58 @retval EFI_SUCCESS Initialization successful. A device path
59 consisting of an ACPI device path node, with
60 UID = RootBusNumber, has been allocated and
61 linked into RootBus.
62
63 @retval EFI_OUT_OF_RESOURCES Memory allocation failed.
64 **/
65 EFI_STATUS
66 InitRootBridge (
67 IN UINT64 Supports,
68 IN UINT64 Attributes,
69 IN UINT64 AllocAttributes,
70 IN UINT8 RootBusNumber,
71 IN UINT8 MaxSubBusNumber,
72 IN PCI_ROOT_BRIDGE_APERTURE *Io,
73 IN PCI_ROOT_BRIDGE_APERTURE *Mem,
74 IN PCI_ROOT_BRIDGE_APERTURE *MemAbove4G,
75 IN PCI_ROOT_BRIDGE_APERTURE *PMem,
76 IN PCI_ROOT_BRIDGE_APERTURE *PMemAbove4G,
77 OUT PCI_ROOT_BRIDGE *RootBus
78 );
79
80 #endif