]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.h
Print resource allocation/bar programming when PciBus driver does PCI BUS enumeration.
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / PciBusDxe / PciBus.h
index 722f31d03c5c4ea7d5b8bab858fc153c2ebaa1bb..239835eab75fc3a7cd67a5d32e9b2b930fa1d5e4 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   Header files and data structures needed by PCI Bus module.\r
 \r
-Copyright (c) 2006 - 2009, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
@@ -32,6 +32,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/IncompatiblePciDeviceSupport.h>\r
 #include <Protocol/PciOverride.h>\r
 #include <Protocol/PciEnumerationComplete.h>\r
+#include <Protocol/DevicePathToText.h>\r
 \r
 #include <Library/DebugLib.h>\r
 #include <Library/UefiDriverEntryPoint.h>\r
@@ -104,7 +105,7 @@ struct _PCI_BAR {
   PCI_BAR_TYPE  BarType;\r
   BOOLEAN       Prefetchable;\r
   UINT8         MemType;\r
-  UINT        Offset;\r
+  UINT16        Offset;\r
 };\r
 \r
 //\r
@@ -127,6 +128,12 @@ struct _PCI_BAR {
 #define PCI_CARD_PREFETCHABLE_MEMORY_0_ENABLE BIT8\r
 #define PCI_CARD_PREFETCHABLE_MEMORY_1_ENABLE BIT9\r
 \r
+#define RB_IO_RANGE                           1\r
+#define RB_MEM32_RANGE                        2\r
+#define RB_PMEM32_RANGE                       3\r
+#define RB_MEM64_RANGE                        4\r
+#define RB_PMEM64_RANGE                       5\r
+\r
 #define PPB_BAR_0                             0\r
 #define PPB_BAR_1                             1\r
 #define PPB_IO_RANGE                          2\r
@@ -223,6 +230,11 @@ struct _PCI_IO_DEVICE {
   //\r
   UINT32                                    Decodes;\r
 \r
+  //\r
+  // TRUE if the ROM image is from the PCI Option ROM BAR\r
+  //\r
+  BOOLEAN                                   EmbeddedRom;\r
+\r
   //\r
   // The OptionRom Size\r
   //\r
@@ -268,6 +280,12 @@ struct _PCI_IO_DEVICE {
   UINT32                                    SystemPageSize;\r
   UINT16                                    InitialVFs;\r
   UINT16                                    ReservedBusNum;\r
+  //\r
+  // Per PCI to PCI Bridge spec, I/O window is 4K aligned,\r
+  // but some chipsets support non-stardard I/O window aligments less than 4K.\r
+  // This field is used to support this case.\r
+  //\r
+  UINT16                                    BridgeIoAlignment;\r
 };\r
 \r
 #define PCI_IO_DEVICE_FROM_PCI_IO_THIS(a) \\r
@@ -298,8 +316,8 @@ extern UINT64                                       gAllOne;
 extern UINT64                                       gAllZero;\r
 extern EFI_PCI_PLATFORM_PROTOCOL                    *gPciPlatformProtocol;\r
 extern EFI_PCI_OVERRIDE_PROTOCOL                    *gPciOverrideProtocol;\r
-\r
-\r
+extern BOOLEAN                                      mReserveIsaAliases;\r
+extern BOOLEAN                                      mReserveVgaAliases;\r
 \r
 /**\r
   Macro that checks whether device is a GFX device.\r