mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
c0394e0424
commit
ae837d36df
|
@ -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
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -864,16 +864,12 @@ Returns:
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
UINT32 Value;
|
UINT32 Value;
|
||||||
//UINT64 BarValue64;
|
|
||||||
UINT32 OriginalValue;
|
UINT32 OriginalValue;
|
||||||
UINT32 Mask;
|
UINT32 Mask;
|
||||||
UINT32 Data;
|
|
||||||
UINT8 Index;
|
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
|
||||||
OriginalValue = 0;
|
OriginalValue = 0;
|
||||||
Value = 0;
|
Value = 0;
|
||||||
//BarValue64 = 0;
|
|
||||||
|
|
||||||
Status = BarExisted (
|
Status = BarExisted (
|
||||||
PciIoDevice,
|
PciIoDevice,
|
||||||
|
@ -991,12 +987,7 @@ Returns:
|
||||||
//
|
//
|
||||||
// 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
|
||||||
|
|
Loading…
Reference in New Issue