]> git.proxmox.com Git - mirror_edk2.git/blame - CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridge.h
BaseTools/Capsule: Do not support -o with --dump-info
[mirror_edk2.git] / CorebootPayloadPkg / Library / PciHostBridgeLib / PciHostBridge.h
CommitLineData
69787a9d
MM
1/** @file\r
2 Header file of PciHostBridgeLib.\r
3\r
4 Copyright (C) 2016, Red Hat, Inc.\r
5 Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
6\r
7 This program and the accompanying materials are licensed and made available\r
8 under the terms and conditions of the BSD License which accompanies this\r
9 distribution. The full text of the license may be found at\r
10 http://opensource.org/licenses/bsd-license.php.\r
11\r
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT\r
13 WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
14\r
15**/\r
16\r
17#ifndef _PCI_HOST_BRIDGE_H\r
18#define _PCI_HOST_BRIDGE_H\r
19\r
20typedef struct {\r
21 ACPI_HID_DEVICE_PATH AcpiDevicePath;\r
22 EFI_DEVICE_PATH_PROTOCOL EndDevicePath;\r
23} CB_PCI_ROOT_BRIDGE_DEVICE_PATH;\r
24\r
25PCI_ROOT_BRIDGE *\r
26ScanForRootBridges (\r
27 UINTN *NumberOfRootBridges\r
28);\r
29\r
30/**\r
31 Initialize a PCI_ROOT_BRIDGE structure.\r
32\r
33 @param[in] Supports Supported attributes.\r
34\r
35 @param[in] Attributes Initial attributes.\r
36\r
37 @param[in] AllocAttributes Allocation attributes.\r
38\r
39 @param[in] RootBusNumber The bus number to store in RootBus.\r
40\r
41 @param[in] MaxSubBusNumber The inclusive maximum bus number that can be\r
42 assigned to any subordinate bus found behind any\r
43 PCI bridge hanging off this root bus.\r
44\r
45 The caller is repsonsible for ensuring that\r
46 RootBusNumber <= MaxSubBusNumber. If\r
47 RootBusNumber equals MaxSubBusNumber, then the\r
48 root bus has no room for subordinate buses.\r
49\r
50 @param[in] Io IO aperture.\r
51\r
52 @param[in] Mem MMIO aperture.\r
53\r
54 @param[in] MemAbove4G MMIO aperture above 4G.\r
55\r
56 @param[in] PMem Prefetchable MMIO aperture.\r
57\r
58 @param[in] PMemAbove4G Prefetchable MMIO aperture above 4G.\r
59\r
60 @param[out] RootBus The PCI_ROOT_BRIDGE structure (allocated by the\r
61 caller) that should be filled in by this\r
62 function.\r
63\r
64 @retval EFI_SUCCESS Initialization successful. A device path\r
65 consisting of an ACPI device path node, with\r
66 UID = RootBusNumber, has been allocated and\r
67 linked into RootBus.\r
68\r
69 @retval EFI_OUT_OF_RESOURCES Memory allocation failed.\r
70**/\r
71EFI_STATUS\r
72InitRootBridge (\r
73 IN UINT64 Supports,\r
74 IN UINT64 Attributes,\r
75 IN UINT64 AllocAttributes,\r
76 IN UINT8 RootBusNumber,\r
77 IN UINT8 MaxSubBusNumber,\r
78 IN PCI_ROOT_BRIDGE_APERTURE *Io,\r
79 IN PCI_ROOT_BRIDGE_APERTURE *Mem,\r
80 IN PCI_ROOT_BRIDGE_APERTURE *MemAbove4G,\r
81 IN PCI_ROOT_BRIDGE_APERTURE *PMem,\r
82 IN PCI_ROOT_BRIDGE_APERTURE *PMemAbove4G,\r
83 OUT PCI_ROOT_BRIDGE *RootBus\r
84);\r
85\r
86#endif\r