]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix the bug in DxeRuntimePciExpressLib that behavior of GetPciExpressAddress() in...
authorxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 30 Apr 2009 02:32:49 +0000 (02:32 +0000)
committerxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 30 Apr 2009 02:32:49 +0000 (02:32 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8206 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Library/DxeRuntimePciExpressLib/PciExpressLib.c

index e56675b8739cffd19c81f9f97ef21fcef750c982..4231614595b07efb37e9e4a0dec7156a85bc31e4 100644 (file)
@@ -5,7 +5,7 @@
   All assertions for I/O operations are handled in MMIO functions in the IoLib\r
   Library.\r
 \r
-  Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2009, Intel Corporation<BR>\r
   All rights reserved. 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
@@ -217,7 +217,7 @@ GetPciExpressAddress (
   //\r
   // See if there is a physical address match at the exact same index as the last address match\r
   //\r
-  if (mDxeRuntimePciExpressLibRegistrationTable[mDxeRuntimePciExpressLibLastRuntimeRange].PhysicalAddress == (Address & 0x0ffff000)) {\r
+  if (mDxeRuntimePciExpressLibRegistrationTable[mDxeRuntimePciExpressLibLastRuntimeRange].PhysicalAddress == (Address & (~0x00000fff))) {\r
     //\r
     // Convert the physical address to a virtual address and return the virtual address\r
     //\r
@@ -228,7 +228,7 @@ GetPciExpressAddress (
   // Search the entire table for a physical address match\r
   //\r
   for (Index = 0; Index < mDxeRuntimePciExpressLibNumberOfRuntimeRanges; Index++) {\r
-    if (mDxeRuntimePciExpressLibRegistrationTable[Index].PhysicalAddress == (Address & 0x0ffff000)) {\r
+    if (mDxeRuntimePciExpressLibRegistrationTable[Index].PhysicalAddress == (Address & (~0x00000fff))) {\r
       //\r
       // Cache the matching index value\r
       //\r