summaryrefslogtreecommitdiff
path: root/DuetPkg
diff options
context:
space:
mode:
authorniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>2012-08-23 12:28:42 +0000
committerniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>2012-08-23 12:28:42 +0000
commitae837d36dff63a7d5422c309d9bb29551dc66778 (patch)
treea3c17b57ec16f7d66472baa479989e05b0e59624 /DuetPkg
parentc0394e042457900c634fd7d69dcc59033b38d38a (diff)
downloadedk2-platforms-ae837d36dff63a7d5422c309d9bb29551dc66778.tar.xz
Fix the bug in PciBusNoEnumerationDxe driver to correct parse the 64bit BAR.
Signed-off-by: Ruiyu Ni<ruiyu.ni@intel.com> Reviewed-by: Rui Sun<rui.sun@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13674 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'DuetPkg')
-rw-r--r--DuetPkg/PciBusNoEnumerationDxe/PciEnumeratorSupport.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/DuetPkg/PciBusNoEnumerationDxe/PciEnumeratorSupport.c b/DuetPkg/PciBusNoEnumerationDxe/PciEnumeratorSupport.c
index e5d4755f75..6f3979a9c2 100644
--- a/DuetPkg/PciBusNoEnumerationDxe/PciEnumeratorSupport.c
+++ b/DuetPkg/PciBusNoEnumerationDxe/PciEnumeratorSupport.c
@@ -1,6 +1,6 @@
/*++
-Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>
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
@@ -864,16 +864,12 @@ Returns:
--*/
{
UINT32 Value;
- //UINT64 BarValue64;
UINT32 OriginalValue;
UINT32 Mask;
- UINT32 Data;
- UINT8 Index;
EFI_STATUS Status;
OriginalValue = 0;
Value = 0;
- //BarValue64 = 0;
Status = BarExisted (
PciIoDevice,
@@ -991,12 +987,7 @@ Returns:
//
// Fix the length to support some spefic 64 bit BAR
//
- Data = Value;
- Index = 0;
- for (Data = Value; Data != 0; Data >>= 1) {
- Index ++;
- }
- Value |= ((UINT32)(-1) << Index);
+ Value |= ((UINT32)(-1) << HighBitSet32 (Value));
//
// Calculate the size of 64bit bar