mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-16 18:24:24 +02:00
Correct the right bits judgment for get size of OptionROM.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2236 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
3727980651
commit
9a037c5d09
@ -64,7 +64,7 @@ Returns:
|
|||||||
PciRootBridgeIo = PciIoDevice->PciRootBridgeIo;
|
PciRootBridgeIo = PciIoDevice->PciRootBridgeIo;
|
||||||
|
|
||||||
//
|
//
|
||||||
// offset is 48 if is not ppb
|
// offset is 0x30 if is not ppb
|
||||||
//
|
//
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -112,15 +112,16 @@ Returns:
|
|||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
//
|
||||||
AllOnes &= 0xFFFFFFFC;
|
// Bits [1, 10] are reserved
|
||||||
if ((AllOnes == 0) || (AllOnes == 0xFFFFFFFC)) {
|
//
|
||||||
|
AllOnes &= 0xFFFFF800;
|
||||||
|
if ((AllOnes == 0) || (AllOnes == 0xFFFFF800)) {
|
||||||
return EFI_NOT_FOUND;
|
return EFI_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
PciIoDevice->RomSize = (UINT64) ((~AllOnes) + 1);
|
PciIoDevice->RomSize = (UINT64) ((~AllOnes) + 1);
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user