IntelSiliconPkg: Fix VS2015 NOOPT IA32 build failure in IntelVTdDxe
[mirror_edk2.git] / IntelSiliconPkg / IntelVTdDxe / PciInfo.c
index ea84317c9ce439e761f1ae5e376c441fbc3c7b0f..d5f096fadd5dca5e514eeb9610bd9465a6e54c92 100644 (file)
@@ -289,7 +289,7 @@ FindVtdIndexByPciDevice (
 \r
     if (mVtdUnitInformation[VtdIndex].ExtRootEntryTable != 0) {\r
       ExtRootEntry = &mVtdUnitInformation[VtdIndex].ExtRootEntryTable[SourceId.Index.RootIndex];\r
-      ExtContextEntryTable = (VTD_EXT_CONTEXT_ENTRY *)(UINTN)LShiftU64 (ExtRootEntry->Bits.LowerContextTablePointer, 12) ;\r
+      ExtContextEntryTable = (VTD_EXT_CONTEXT_ENTRY *)(UINTN)VTD_64BITS_ADDRESS(ExtRootEntry->Bits.LowerContextTablePointerLo, ExtRootEntry->Bits.LowerContextTablePointerHi) ;\r
       ThisExtContextEntry  = &ExtContextEntryTable[SourceId.Index.ContextIndex];\r
       if (ThisExtContextEntry->Bits.AddressWidth == 0) {\r
         continue;\r
@@ -298,7 +298,7 @@ FindVtdIndexByPciDevice (
       *ContextEntry    = NULL;\r
     } else {\r
       RootEntry = &mVtdUnitInformation[VtdIndex].RootEntryTable[SourceId.Index.RootIndex];\r
-      ContextEntryTable = (VTD_CONTEXT_ENTRY *)(UINTN)LShiftU64 (RootEntry->Bits.ContextTablePointer, 12) ;\r
+      ContextEntryTable = (VTD_CONTEXT_ENTRY *)(UINTN)VTD_64BITS_ADDRESS(RootEntry->Bits.ContextTablePointerLo, RootEntry->Bits.ContextTablePointerHi) ;\r
       ThisContextEntry  = &ContextEntryTable[SourceId.Index.ContextIndex];\r
       if (ThisContextEntry->Bits.AddressWidth == 0) {\r
         continue;\r