]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/DxePciSegmentLibPciRootBridgeIo/PciSegmentLib.h
Refine new library instances according to review comments.
[mirror_edk2.git] / MdePkg / Library / DxePciSegmentLibPciRootBridgeIo / PciSegmentLib.h
index 2ed7dfe0a8627393321b11adb25f7c407cf707a9..00129edea6bb405ee4e16f97115df9e8c5dcaac7 100644 (file)
@@ -47,13 +47,13 @@ typedef struct {
   ASSERT (((A) & (0xf0000000 | (M))) == 0)\r
 \r
 /**\r
-  Translate PCI Lib address into format of PCI CFG2 PPI.\r
+  Translate PCI Lib address into format of PCI Root Bridge I/O Protocol\r
 \r
   @param  A  Address that encodes the PCI Bus, Device, Function and\r
              Register.\r
 \r
 **/\r
-#define PCI_TO_PCICFG2_ADDRESS(A) \\r
-  (((A) << 4) & 0xff000000) | (((A) >> 4) & 0x00000700) | (((A) << 1) & 0x001f0000) | ((UINT64)((A) & 0xFFF) << 32)\r
+#define PCI_TO_PCI_ROOT_BRIDGE_IO_ADDRESS(A) \\r
+  ((((A) << 4) & 0xff000000) | (((A) >> 4) & 0x00000700) | (((A) << 1) & 0x001f0000) | (LShiftU64((A) & 0xfff, 32)))\r
 \r
 #endif\r