]> git.proxmox.com Git - mirror_edk2.git/blobdiff - DuetPkg/PciRootBridgeNoEnumerationDxe/PcatPciRootBridge.h
Improve robustness when scanning PCI Option ROM.
[mirror_edk2.git] / DuetPkg / PciRootBridgeNoEnumerationDxe / PcatPciRootBridge.h
index f88932615e16184a408480551afea2d1691d723a..0450fcf672764a4e695fd96bae5fab0c421f925e 100644 (file)
@@ -1,7 +1,7 @@
 /*++\r
 \r
-Copyright (c) 2005 - 2006, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
+Copyright (c) 2005 - 2006, 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
@@ -24,7 +24,7 @@ Abstract:
 #include <PiDxe.h>\r
 #include <Protocol/PciRootBridgeIo.h>\r
 #include <Protocol/DeviceIo.h>\r
-#include <Protocol/CpuIo.h>\r
+#include <Protocol/CpuIo2.h>\r
 \r
 #include <Library/UefiLib.h>\r
 #include <Library/BaseLib.h>\r
@@ -41,10 +41,12 @@ Abstract:
 \r
 #include <IndustryStandard/Acpi.h>\r
 #include <IndustryStandard/Pci.h>\r
+\r
+#define PCI_MAX_SEGMENT   0\r
 //\r
 // Driver Instance Data Prototypes\r
 //\r
-#define PCAT_PCI_ROOT_BRIDGE_SIGNATURE  EFI_SIGNATURE_32('p', 'c', 'r', 'b')\r
+#define PCAT_PCI_ROOT_BRIDGE_SIGNATURE  SIGNATURE_32('p', 'c', 'r', 'b')\r
 \r
 typedef struct {\r
   UINT32                            Signature;\r
@@ -52,7 +54,7 @@ typedef struct {
                                     \r
   EFI_DEVICE_PATH_PROTOCOL          *DevicePath;\r
   EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL   Io;\r
-  EFI_CPU_IO_PROTOCOL               *CpuIo;\r
+  EFI_CPU_IO2_PROTOCOL              *CpuIo;\r
 \r
   UINT32                            RootBridgeNumber;\r
   UINT32                            PrimaryBus;\r
@@ -96,17 +98,16 @@ typedef struct {
 #define DRIVER_INSTANCE_FROM_PCI_ROOT_BRIDGE_IO_THIS(a) \\r
   CR(a, PCAT_PCI_ROOT_BRIDGE_INSTANCE, Io, PCAT_PCI_ROOT_BRIDGE_SIGNATURE)\r
 \r
-#define VOLATILE volatile\r
 //\r
 // Private data types\r
 //\r
 typedef union {\r
-  UINT8   VOLATILE  *buf;\r
-  UINT8   VOLATILE  *ui8;\r
-  UINT16  VOLATILE  *ui16;\r
-  UINT32  VOLATILE  *ui32;\r
-  UINT64  VOLATILE  *ui64;\r
-  UINTN   VOLATILE  ui;\r
+  UINT8   volatile  *buf;\r
+  UINT8   volatile  *ui8;\r
+  UINT16  volatile  *ui16;\r
+  UINT32  volatile  *ui32;\r
+  UINT64  volatile  *ui64;\r
+  UINTN   volatile  ui;\r
 } PTR;\r
 \r
 typedef struct {\r
@@ -208,6 +209,26 @@ GetPciExpressBaseAddressForRootBridge (
   IN UINTN    RootBridgeNumber\r
   );\r
 \r
+EFI_STATUS\r
+EFIAPI\r
+PcatRootBridgeIoIoRead (\r
+  IN     EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL        *This,\r
+  IN     EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH  Width,\r
+  IN     UINT64                                 UserAddress,\r
+  IN     UINTN                                  Count,\r
+  IN OUT VOID                                   *UserBuffer\r
+  );\r
+\r
+EFI_STATUS\r
+EFIAPI\r
+PcatRootBridgeIoIoWrite (\r
+  IN     EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL        *This,\r
+  IN     EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH  Width,\r
+  IN     UINT64                                 UserAddress,\r
+  IN     UINTN                                  Count,\r
+  IN OUT VOID                                   *UserBuffer\r
+  );\r
+\r
 //\r
 // Driver entry point prototype\r
 //\r
@@ -218,6 +239,6 @@ InitializePcatPciRootBridge (
   IN EFI_SYSTEM_TABLE *SystemTable\r
   );\r
 \r
-extern EFI_CPU_IO_PROTOCOL  *gCpuIo;\r
+extern EFI_CPU_IO2_PROTOCOL  *gCpuIo;\r
 \r
 #endif\r