]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/PciRootBridgeIo.h
MdePkg SafeIntLib: Update API definition to use the same output name
[mirror_edk2.git] / MdePkg / Include / Protocol / PciRootBridgeIo.h
index 8c66bed4cc936e602ee0faa021cd8f37c63ad7f3..fed5385b9d6bc616f8216d4afba7de411632fbf1 100644 (file)
@@ -5,7 +5,7 @@
   and PCI Configuration cycles on a PCI Root Bridge. It also provides services to perform \r
   defferent types of bus mastering DMA.\r
 \r
-  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2017, 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
@@ -19,6 +19,8 @@
 #ifndef __PCI_ROOT_BRIDGE_IO_H__\r
 #define __PCI_ROOT_BRIDGE_IO_H__\r
 \r
+#include <Library/BaseLib.h>\r
+\r
 #define EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_GUID \\r
   { \\r
     0x2f707ebb, 0x4a1a, 0x11d4, {0x9a, 0x38, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \\r
@@ -97,13 +99,20 @@ typedef enum {
 #define EFI_PCI_ATTRIBUTE_MEMORY_CACHED               0x0800\r
 #define EFI_PCI_ATTRIBUTE_MEMORY_DISABLE              0x1000\r
 #define EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE          0x8000\r
+#define EFI_PCI_ATTRIBUTE_ISA_IO_16                   0x10000\r
+#define EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO_16           0x20000\r
+#define EFI_PCI_ATTRIBUTE_VGA_IO_16                   0x40000\r
 \r
 #define EFI_PCI_ATTRIBUTE_VALID_FOR_ALLOCATE_BUFFER   (EFI_PCI_ATTRIBUTE_MEMORY_WRITE_COMBINE | EFI_PCI_ATTRIBUTE_MEMORY_CACHED | EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE)\r
 \r
 #define EFI_PCI_ATTRIBUTE_INVALID_FOR_ALLOCATE_BUFFER (~EFI_PCI_ATTRIBUTE_VALID_FOR_ALLOCATE_BUFFER)\r
 \r
 #define EFI_PCI_ADDRESS(bus, dev, func, reg) \\r
-    ((UINT64) ((((UINTN) bus) << 24) + (((UINTN) dev) << 16) + (((UINTN) func) << 8) + ((UINTN) reg)))\r
+  (UINT64) ( \\r
+  (((UINTN) bus) << 24) | \\r
+  (((UINTN) dev) << 16) | \\r
+  (((UINTN) func) << 8) | \\r
+  (((UINTN) (reg)) < 256 ? ((UINTN) (reg)) : (UINT64) (LShiftU64 ((UINT64) (reg), 32))))\r
 \r
 typedef struct {\r
   UINT8   Register;\r
@@ -378,18 +387,18 @@ EFI_STATUS
   );\r
 \r
 /**                                                                 \r
-  Retrieves the current resource settings of this PCI root bridge in the form of a set of ACPI 2.0\r
-  resource descriptors.                                                                           \r
+  Retrieves the current resource settings of this PCI root bridge in the form of a set of ACPI\r
+  resource descriptors.\r
             \r
   @param  This                  A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
-  @param  Resources             A pointer to the ACPI 2.0 resource descriptors that describe the current\r
-                                configuration of this PCI root bridge.                                  \r
-                                \r
+  @param  Resources             A pointer to the resource descriptors that describe the current\r
+                                configuration of this PCI root bridge.\r
+\r
   @retval EFI_SUCCESS           The current configuration of this PCI root bridge was returned in\r
-                                Resources.                                                                                                                       \r
+                                Resources.\r
   @retval EFI_UNSUPPORTED       The current configuration of this PCI root bridge could not be\r
-                                retrieved.                                                                          \r
-                                       \r
+                                retrieved.\r
+\r
 **/\r
 typedef\r
 EFI_STATUS\r