Fix the bug in PciBus 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@13673 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
niruiyu 2012-08-23 12:28:22 +00:00
parent f6f9031f8e
commit c0394e0424
1 changed files with 2 additions and 16 deletions

View File

@ -1473,8 +1473,6 @@ PciIovParseVfBar (
UINT32 Value; UINT32 Value;
UINT32 OriginalValue; UINT32 OriginalValue;
UINT32 Mask; UINT32 Mask;
UINT32 Data;
UINT8 Index;
EFI_STATUS Status; EFI_STATUS Status;
// //
@ -1592,12 +1590,7 @@ PciIovParseVfBar (
// //
// Fix the length to support some spefic 64 bit BAR // Fix the length to support some spefic 64 bit BAR
// //
Data = Value; Value |= ((UINT32) -1 << HighBitSet32 (Value));
Index = 0;
for (Data = Value; Data != 0; Data >>= 1) {
Index ++;
}
Value |= ((UINT32)(-1) << Index);
// //
// Calculate the size of 64bit bar // Calculate the size of 64bit bar
@ -1672,8 +1665,6 @@ PciParseBar (
UINT32 Value; UINT32 Value;
UINT32 OriginalValue; UINT32 OriginalValue;
UINT32 Mask; UINT32 Mask;
UINT32 Data;
UINT8 Index;
EFI_STATUS Status; EFI_STATUS Status;
OriginalValue = 0; OriginalValue = 0;
@ -1810,12 +1801,7 @@ PciParseBar (
// //
// Fix the length to support some spefic 64 bit BAR // Fix the length to support some spefic 64 bit BAR
// //
Data = Value; Value |= ((UINT32)(-1) << HighBitSet32 (Value));
Index = 0;
for (Data = Value; Data != 0; Data >>= 1) {
Index ++;
}
Value |= ((UINT32)(-1) << Index);
// //
// Calculate the size of 64bit bar // Calculate the size of 64bit bar