10#define _EFI_PCI_BUS_H_
49#define EFI_PCI_RID(Bus, Device, Function) (((UINT32)Bus << 8) + ((UINT32)Device << 3) + (UINT32)Function)
50#define EFI_PCI_BUS_OF_RID(RID) ((UINT32)RID >> 8)
52#define EFI_PCI_IOV_POLICY_ARI 0x0001
53#define EFI_PCI_IOV_POLICY_SRIOV 0x0002
54#define EFI_PCI_IOV_POLICY_MRIOV 0x0004
57 PciBarTypeUnknown = 0,
84#define VGALIMIT1 0x3BB
87#define VGALIMIT2 0x3DF
100 BOOLEAN BarTypeFixed;
107#define PCI_CARD_MEMORY_BASE_0 0x1C
108#define PCI_CARD_MEMORY_LIMIT_0 0x20
109#define PCI_CARD_MEMORY_BASE_1 0x24
110#define PCI_CARD_MEMORY_LIMIT_1 0x28
111#define PCI_CARD_IO_BASE_0_LOWER 0x2C
112#define PCI_CARD_IO_BASE_0_UPPER 0x2E
113#define PCI_CARD_IO_LIMIT_0_LOWER 0x30
114#define PCI_CARD_IO_LIMIT_0_UPPER 0x32
115#define PCI_CARD_IO_BASE_1_LOWER 0x34
116#define PCI_CARD_IO_BASE_1_UPPER 0x36
117#define PCI_CARD_IO_LIMIT_1_LOWER 0x38
118#define PCI_CARD_IO_LIMIT_1_UPPER 0x3A
119#define PCI_CARD_BRIDGE_CONTROL 0x3E
121#define PCI_CARD_PREFETCHABLE_MEMORY_0_ENABLE BIT8
122#define PCI_CARD_PREFETCHABLE_MEMORY_1_ENABLE BIT9
125#define RB_MEM32_RANGE 2
126#define RB_PMEM32_RANGE 3
127#define RB_MEM64_RANGE 4
128#define RB_PMEM64_RANGE 5
132#define PPB_IO_RANGE 2
133#define PPB_MEM32_RANGE 3
134#define PPB_PMEM32_RANGE 4
135#define PPB_PMEM64_RANGE 5
136#define PPB_MEM64_RANGE 0xFF
144#define EFI_BRIDGE_IO32_DECODE_SUPPORTED 0x0001
145#define EFI_BRIDGE_PMEM32_DECODE_SUPPORTED 0x0002
146#define EFI_BRIDGE_PMEM64_DECODE_SUPPORTED 0x0004
147#define EFI_BRIDGE_IO16_DECODE_SUPPORTED 0x0008
148#define EFI_BRIDGE_PMEM_MEM_COMBINE_SUPPORTED 0x0010
149#define EFI_BRIDGE_MEM64_DECODE_SUPPORTED 0x0020
150#define EFI_BRIDGE_MEM32_DECODE_SUPPORTED 0x0040
152#define PCI_MAX_HOST_BRIDGE_NUM 0x0010
157#define EFI_SET_SUPPORTS 0
158#define EFI_SET_ATTRIBUTES 1
160#define PCI_IO_DEVICE_SIGNATURE SIGNATURE_32 ('p', 'c', 'i', 'o')
183 UINT8 FunctionNumber;
239 BOOLEAN AllOpRomProcessed;
265 BOOLEAN IsAriEnabled;
269 UINT8 PciExpressCapabilityOffset;
270 UINT32 AriCapabilityOffset;
271 UINT32 SrIovCapabilityOffset;
272 UINT32 MrIovCapabilityOffset;
274 UINT32 SystemPageSize;
276 UINT16 ReservedBusNum;
282 UINT16 BridgeIoAlignment;
283 UINT32 ResizableBarOffset;
284 UINT32 ResizableBarNumber;
287#define PCI_IO_DEVICE_FROM_PCI_IO_THIS(a) \
288 CR (a, PCI_IO_DEVICE, PciIo, PCI_IO_DEVICE_SIGNATURE)
290#define PCI_IO_DEVICE_FROM_PCI_DRIVER_OVERRIDE_THIS(a) \
291 CR (a, PCI_IO_DEVICE, PciDriverOverride, PCI_IO_DEVICE_SIGNATURE)
293#define PCI_IO_DEVICE_FROM_LINK(a) \
294 CR (a, PCI_IO_DEVICE, Link, PCI_IO_DEVICE_SIGNATURE)
296#define PCI_IO_DEVICE_FROM_LOAD_FILE2_THIS(a) \
297 CR (a, PCI_IO_DEVICE, LoadFile2, PCI_IO_DEVICE_SIGNATURE)
306extern BOOLEAN gFullEnumeration;
307extern UINTN gPciHostBridgeNumber;
308extern EFI_HANDLE gPciHostBrigeHandles[PCI_MAX_HOST_BRIDGE_NUM];
309extern UINT64 gAllOne;
310extern UINT64 gAllZero;
313extern BOOLEAN mReserveIsaAliases;
314extern BOOLEAN mReserveVgaAliases;
325#define IS_PCI_GFX(_p) IS_CLASS2 (_p, PCI_CLASS_DISPLAY, PCI_CLASS_DISPLAY_OTHER)
PACKED struct @89 EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR
EFI_STATUS EFIAPI PciBusDriverBindingStart(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS EFIAPI PciBusDriverBindingSupported(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS EFIAPI PciBusDriverBindingStop(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
EFI_HPC_PADDING_ATTRIBUTES