diff options
author | xli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-04-30 02:32:49 +0000 |
---|---|---|
committer | xli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-04-30 02:32:49 +0000 |
commit | 687add7035b114cbb520725d3dc1ce80b3728ecd (patch) | |
tree | 29e9df7613b1dbea1898852aad37e35b2dd8ef70 /MdePkg/Library/DxeRuntimePciExpressLib | |
parent | 51967a53143ff87800afe37b3c72292a7ae5f938 (diff) | |
download | edk2-platforms-687add7035b114cbb520725d3dc1ce80b3728ecd.tar.xz |
Fix the bug in DxeRuntimePciExpressLib that behavior of GetPciExpressAddress() in virtual mode is not correct.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8206 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/DxeRuntimePciExpressLib')
-rw-r--r-- | MdePkg/Library/DxeRuntimePciExpressLib/PciExpressLib.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/MdePkg/Library/DxeRuntimePciExpressLib/PciExpressLib.c b/MdePkg/Library/DxeRuntimePciExpressLib/PciExpressLib.c index e56675b873..4231614595 100644 --- a/MdePkg/Library/DxeRuntimePciExpressLib/PciExpressLib.c +++ b/MdePkg/Library/DxeRuntimePciExpressLib/PciExpressLib.c @@ -5,7 +5,7 @@ All assertions for I/O operations are handled in MMIO functions in the IoLib
Library.
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -217,7 +217,7 @@ GetPciExpressAddress ( //
// See if there is a physical address match at the exact same index as the last address match
//
- if (mDxeRuntimePciExpressLibRegistrationTable[mDxeRuntimePciExpressLibLastRuntimeRange].PhysicalAddress == (Address & 0x0ffff000)) {
+ if (mDxeRuntimePciExpressLibRegistrationTable[mDxeRuntimePciExpressLibLastRuntimeRange].PhysicalAddress == (Address & (~0x00000fff))) {
//
// Convert the physical address to a virtual address and return the virtual address
//
@@ -228,7 +228,7 @@ GetPciExpressAddress ( // Search the entire table for a physical address match
//
for (Index = 0; Index < mDxeRuntimePciExpressLibNumberOfRuntimeRanges; Index++) {
- if (mDxeRuntimePciExpressLibRegistrationTable[Index].PhysicalAddress == (Address & 0x0ffff000)) {
+ if (mDxeRuntimePciExpressLibRegistrationTable[Index].PhysicalAddress == (Address & (~0x00000fff))) {
//
// Cache the matching index value
//
|