9#ifndef _EFI_PCI_COMMAND_H_
10#define _EFI_PCI_COMMAND_H_
18#define EFI_PCI_COMMAND_BITS_OWNED ( \
19 EFI_PCI_COMMAND_IO_SPACE | \
20 EFI_PCI_COMMAND_MEMORY_SPACE | \
21 EFI_PCI_COMMAND_BUS_MASTER | \
22 EFI_PCI_COMMAND_MEMORY_WRITE_AND_INVALIDATE | \
23 EFI_PCI_COMMAND_VGA_PALETTE_SNOOP | \
24 EFI_PCI_COMMAND_FAST_BACK_TO_BACK \
33#define EFI_PCI_BRIDGE_CONTROL_BITS_OWNED ( \
34 EFI_PCI_BRIDGE_CONTROL_ISA | \
35 EFI_PCI_BRIDGE_CONTROL_VGA | \
36 EFI_PCI_BRIDGE_CONTROL_VGA_16 | \
37 EFI_PCI_BRIDGE_CONTROL_FAST_BACK_TO_BACK \
46#define EFI_PCCARD_BRIDGE_CONTROL_BITS_OWNED ( \
47 EFI_PCI_BRIDGE_CONTROL_ISA | \
48 EFI_PCI_BRIDGE_CONTROL_VGA | \
49 EFI_PCI_BRIDGE_CONTROL_FAST_BACK_TO_BACK \
52#define EFI_GET_REGISTER 1
53#define EFI_SET_REGISTER 2
54#define EFI_ENABLE_REGISTER 3
55#define EFI_DISABLE_REGISTER 4
75 OUT UINT16 *PtrCommand
109 IN OUT UINT8 *Offset,
110 OUT UINT8 *NextRegBlock OPTIONAL
130 IN OUT UINT32 *Offset,
131 OUT UINT32 *NextRegBlock OPTIONAL
143#define PCI_READ_COMMAND_REGISTER(a, b) \
144 PciOperateRegister (a, 0, PCI_COMMAND_OFFSET, EFI_GET_REGISTER, b)
155#define PCI_SET_COMMAND_REGISTER(a, b) \
156 PciOperateRegister (a, b, PCI_COMMAND_OFFSET, EFI_SET_REGISTER, NULL)
167#define PCI_ENABLE_COMMAND_REGISTER(a, b) \
168 PciOperateRegister (a, b, PCI_COMMAND_OFFSET, EFI_ENABLE_REGISTER, NULL)
179#define PCI_DISABLE_COMMAND_REGISTER(a, b) \
180 PciOperateRegister (a, b, PCI_COMMAND_OFFSET, EFI_DISABLE_REGISTER, NULL)
191#define PCI_READ_BRIDGE_CONTROL_REGISTER(a, b) \
192 PciOperateRegister (a, 0, PCI_BRIDGE_CONTROL_REGISTER_OFFSET, EFI_GET_REGISTER, b)
203#define PCI_SET_BRIDGE_CONTROL_REGISTER(a, b) \
204 PciOperateRegister (a, b, PCI_BRIDGE_CONTROL_REGISTER_OFFSET, EFI_SET_REGISTER, NULL)
215#define PCI_ENABLE_BRIDGE_CONTROL_REGISTER(a, b) \
216 PciOperateRegister (a, b, PCI_BRIDGE_CONTROL_REGISTER_OFFSET, EFI_ENABLE_REGISTER, NULL)
227#define PCI_DISABLE_BRIDGE_CONTROL_REGISTER(a, b) \
228 PciOperateRegister (a, b, PCI_BRIDGE_CONTROL_REGISTER_OFFSET, EFI_DISABLE_REGISTER, NULL)
BOOLEAN PciCapabilitySupport(IN PCI_IO_DEVICE *PciIoDevice)
EFI_STATUS LocatePciExpressCapabilityRegBlock(IN PCI_IO_DEVICE *PciIoDevice, IN UINT16 CapId, IN OUT UINT32 *Offset, OUT UINT32 *NextRegBlock OPTIONAL)
EFI_STATUS PciOperateRegister(IN PCI_IO_DEVICE *PciIoDevice, IN UINT16 Command, IN UINT8 Offset, IN UINT8 Operation, OUT UINT16 *PtrCommand)
EFI_STATUS LocateCapabilityRegBlock(IN PCI_IO_DEVICE *PciIoDevice, IN UINT8 CapId, IN OUT UINT8 *Offset, OUT UINT8 *NextRegBlock OPTIONAL)