TianoCore EDK2 master
Loading...
Searching...
No Matches
HardwareInfoPciHostBridgeLib.h
Go to the documentation of this file.
1
10#ifndef __HARDWARE_INFO_PCI_HOST_BRIDGE_LIB_H__
11#define __HARDWARE_INFO_PCI_HOST_BRIDGE_LIB_H__
12
13#include <Uefi/UefiBaseType.h>
14#include <Uefi/UefiSpec.h>
16
17//
18// Host Bridge resources information
19//
20#pragma pack(1)
21typedef struct {
22 //
23 // Feature tracking, initially 0
24 //
25 UINT64 Version;
26
27 //
28 // Host bridge enabled attributes (EFI_PCI_ATTRIBUTE_*)
29 //
30 UINT64 Attributes;
31
32 union {
33 UINT32 Uint32;
34 struct {
35 UINT32 DmaAbove4G : 1;
36 UINT32 NoExtendedConfigSpace : 1;
37 UINT32 CombineMemPMem : 1;
38 UINT32 Reserved : 29;
39 } Bits;
40 } Flags;
41
42 //
43 // Bus number range
44 //
45 UINT8 BusNrStart;
46 UINT8 BusNrLast;
47
48 UINT8 Padding[2];
49
50 //
51 // IO aperture
52 //
53 UINT64 IoStart;
54 UINT64 IoSize;
55
56 //
57 // 32-bit MMIO aperture
58 //
59 UINT64 MemStart;
60 UINT64 MemSize;
61
62 //
63 // 32-bit prefetchable MMIO aperture
64 //
65 UINT64 PMemStart;
66 UINT64 PMemSize;
67
68 //
69 // 64-bit MMIO aperture
70 //
71 UINT64 MemAbove4GStart;
72 UINT64 MemAbove4GSize;
73
74 //
75 // 64-bit prefetchable MMIO aperture
76 //
77 UINT64 PMemAbove4GStart;
78 UINT64 PMemAbove4GSize;
79
80 //
81 // MMIO accessible PCIe config space (ECAM)
82 //
83 UINT64 PcieConfigStart;
84 UINT64 PcieConfigSize;
86#pragma pack()
87
107 IN CONST HOST_BRIDGE_INFO *HostBridge,
108 IN UINTN DataSize,
109 IN BOOLEAN HighMem,
110 OUT UINT64 *LastMmioAddress
111 );
112
132 IN CONST HOST_BRIDGE_INFO *HostBridge,
133 IN UINTN DataSize,
134 OUT UINTN *BusNrStart,
135 OUT UINTN *BusNrLast
136 );
137
170 IN CONST HOST_BRIDGE_INFO *HostBridge,
171 IN UINTN DataSize,
174 OUT PCI_ROOT_BRIDGE_APERTURE *MemAbove4G,
176 OUT PCI_ROOT_BRIDGE_APERTURE *PMemAbove4G,
177 OUT PCI_ROOT_BRIDGE_APERTURE *PcieConfig
178 );
179
199 IN CONST HOST_BRIDGE_INFO *HostBridge,
200 IN UINTN DataSize,
201 OUT UINT64 *Attributes OPTIONAL,
202 OUT BOOLEAN *DmaAbove4G OPTIONAL,
203 OUT BOOLEAN *NoExtendedConfigSpace OPTIONAL,
204 OUT BOOLEAN *CombineMemPMem OPTIONAL
205 );
206
240 IN CONST HOST_BRIDGE_INFO *HostBridge,
241 IN UINTN DataSize,
242 OUT UINTN *BusNrStart,
243 OUT UINTN *BusNrLast,
244 OUT UINT64 *Attributes OPTIONAL,
245 OUT BOOLEAN *DmaAbove4G OPTIONAL,
246 OUT BOOLEAN *NoExtendedConfigSpace OPTIONAL,
247 OUT BOOLEAN *CombineMemPMem OPTIONAL,
248 OUT PCI_ROOT_BRIDGE_APERTURE *Io OPTIONAL,
249 OUT PCI_ROOT_BRIDGE_APERTURE *Mem OPTIONAL,
250 OUT PCI_ROOT_BRIDGE_APERTURE *MemAbove4G OPTIONAL,
251 OUT PCI_ROOT_BRIDGE_APERTURE *PMem OPTIONAL,
252 OUT PCI_ROOT_BRIDGE_APERTURE *PMemAbove4G OPTIONAL,
253 OUT PCI_ROOT_BRIDGE_APERTURE *PcieConfig OPTIONAL
254 );
255
256#endif // __HARDWARE_INFO_PCI_HOST_BRIDGE_LIB_H__
UINT64 UINTN
EFI_STATUS HardwareInfoPciHostBridgeLastMmioAddress(IN CONST HOST_BRIDGE_INFO *HostBridge, IN UINTN DataSize, IN BOOLEAN HighMem, OUT UINT64 *LastMmioAddress)
EFI_STATUS HardwareInfoPciHostBridgeGetFlags(IN CONST HOST_BRIDGE_INFO *HostBridge, IN UINTN DataSize, OUT UINT64 *Attributes OPTIONAL, OUT BOOLEAN *DmaAbove4G OPTIONAL, OUT BOOLEAN *NoExtendedConfigSpace OPTIONAL, OUT BOOLEAN *CombineMemPMem OPTIONAL)
EFI_STATUS HardwareInfoPciHostBridgeGet(IN CONST HOST_BRIDGE_INFO *HostBridge, IN UINTN DataSize, OUT UINTN *BusNrStart, OUT UINTN *BusNrLast, OUT UINT64 *Attributes OPTIONAL, OUT BOOLEAN *DmaAbove4G OPTIONAL, OUT BOOLEAN *NoExtendedConfigSpace OPTIONAL, OUT BOOLEAN *CombineMemPMem OPTIONAL, OUT PCI_ROOT_BRIDGE_APERTURE *Io OPTIONAL, OUT PCI_ROOT_BRIDGE_APERTURE *Mem OPTIONAL, OUT PCI_ROOT_BRIDGE_APERTURE *MemAbove4G OPTIONAL, OUT PCI_ROOT_BRIDGE_APERTURE *PMem OPTIONAL, OUT PCI_ROOT_BRIDGE_APERTURE *PMemAbove4G OPTIONAL, OUT PCI_ROOT_BRIDGE_APERTURE *PcieConfig OPTIONAL)
EFI_STATUS HardwareInfoPciHostBridgeGetApertures(IN CONST HOST_BRIDGE_INFO *HostBridge, IN UINTN DataSize, OUT PCI_ROOT_BRIDGE_APERTURE *Io, OUT PCI_ROOT_BRIDGE_APERTURE *Mem, OUT PCI_ROOT_BRIDGE_APERTURE *MemAbove4G, OUT PCI_ROOT_BRIDGE_APERTURE *PMem, OUT PCI_ROOT_BRIDGE_APERTURE *PMemAbove4G, OUT PCI_ROOT_BRIDGE_APERTURE *PcieConfig)
EFI_STATUS HardwareInfoPciHostBridgeGetBusNrRange(IN CONST HOST_BRIDGE_INFO *HostBridge, IN UINTN DataSize, OUT UINTN *BusNrStart, OUT UINTN *BusNrLast)
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29