#include <Protocol/Cpu.h>\r
#include <Protocol/PciIo.h>\r
\r
-#define NON_DISCOVERABLE_PCI_DEVICE_SIG SIGNATURE_32 ('P', 'P', 'I', 'D')\r
+#define NON_DISCOVERABLE_PCI_DEVICE_SIG SIGNATURE_32 ('P', 'P', 'I', 'D')\r
\r
#define NON_DISCOVERABLE_PCI_DEVICE_FROM_PCI_IO(PciIoPointer) \\r
CR (PciIoPointer, NON_DISCOVERABLE_PCI_DEVICE, PciIo, \\r
NON_DISCOVERABLE_PCI_DEVICE_SIG)\r
\r
-#define PCI_ID_VENDOR_UNKNOWN 0xffff\r
-#define PCI_ID_DEVICE_DONTCARE 0x0000\r
+#define DEV_SUPPORTED_ATTRIBUTES \\r
+ (EFI_PCI_DEVICE_ENABLE | EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE)\r
\r
-#define PCI_MAX_BARS 6\r
+#define PCI_ID_VENDOR_UNKNOWN 0xffff\r
+#define PCI_ID_DEVICE_DONTCARE 0x0000\r
\r
-extern EFI_CPU_ARCH_PROTOCOL *mCpu;\r
+extern EFI_CPU_ARCH_PROTOCOL *mCpu;\r
\r
typedef struct {\r
//\r
// The linked-list next pointer\r
//\r
- LIST_ENTRY List;\r
+ LIST_ENTRY List;\r
//\r
// The address of the uncached allocation\r
//\r
- VOID *HostAddress;\r
+ VOID *HostAddress;\r
//\r
// The number of pages in the allocation\r
//\r
- UINTN NumPages;\r
+ UINTN NumPages;\r
//\r
// The attributes of the allocation\r
//\r
- UINT64 Attributes;\r
+ UINT64 Attributes;\r
} NON_DISCOVERABLE_DEVICE_UNCACHED_ALLOCATION;\r
\r
typedef struct {\r
- UINT32 Signature;\r
+ UINT32 Signature;\r
//\r
// The bound non-discoverable device protocol instance\r
//\r
- NON_DISCOVERABLE_DEVICE *Device;\r
+ NON_DISCOVERABLE_DEVICE *Device;\r
//\r
// The exposed PCI I/O protocol instance.\r
//\r
- EFI_PCI_IO_PROTOCOL PciIo;\r
+ EFI_PCI_IO_PROTOCOL PciIo;\r
//\r
// The emulated PCI config space of the device. Only the minimally required\r
// items are assigned.\r
//\r
- PCI_TYPE00 ConfigSpace;\r
+ PCI_TYPE00 ConfigSpace;\r
//\r
// The first virtual BAR to assign based on the resources described\r
// by the non-discoverable device.\r
//\r
- UINT32 BarOffset;\r
+ UINT32 BarOffset;\r
//\r
// The number of virtual BARs we expose based on the number of\r
// resources\r
//\r
- UINT32 BarCount;\r
+ UINT32 BarCount;\r
//\r
// The PCI I/O attributes for this device\r
//\r
- UINT64 Attributes;\r
+ UINT64 Attributes;\r
//\r
// Whether this device has been enabled\r
//\r
- BOOLEAN Enabled;\r
+ BOOLEAN Enabled;\r
//\r
// Linked list to keep track of uncached allocations performed\r
// on behalf of this device\r
//\r
- LIST_ENTRY UncachedAllocationList;\r
+ LIST_ENTRY UncachedAllocationList;\r
//\r
// Unique ID for this device instance: needed so that we can report unique\r
// segment/bus/device number for each device instance. Note that this number\r
// may change when disconnecting/reconnecting the driver.\r
//\r
- UINTN UniqueId;\r
+ UINTN UniqueId;\r
} NON_DISCOVERABLE_PCI_DEVICE;\r
\r
/**\r
**/\r
VOID\r
InitializePciIoProtocol (\r
- NON_DISCOVERABLE_PCI_DEVICE *Device\r
+ NON_DISCOVERABLE_PCI_DEVICE *Device\r
);\r
\r
-extern EFI_COMPONENT_NAME_PROTOCOL gComponentName;\r
-extern EFI_COMPONENT_NAME2_PROTOCOL gComponentName2;\r
+extern EFI_COMPONENT_NAME_PROTOCOL gComponentName;\r
+extern EFI_COMPONENT_NAME2_PROTOCOL gComponentName2;\r
\r
#endif\r