diff options
author | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-12 06:20:33 +0000 |
---|---|---|
committer | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-12 06:20:33 +0000 |
commit | 9a037c5d09715245dc349dac05679dce53c8931f (patch) | |
tree | 3309a0d1a282eedf7c20f6cd8f67c4feae6b33c0 /EdkModulePkg/Bus | |
parent | 3727980651ea6d34f0567af9af9c04107428535d (diff) | |
download | edk2-9a037c5d09715245dc349dac05679dce53c8931f.zip edk2-9a037c5d09715245dc349dac05679dce53c8931f.tar.gz edk2-9a037c5d09715245dc349dac05679dce53c8931f.tar.bz2 |
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
Diffstat (limited to 'EdkModulePkg/Bus')
-rw-r--r-- | EdkModulePkg/Bus/Pci/PciBus/Dxe/PciOptionRomSupport.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/EdkModulePkg/Bus/Pci/PciBus/Dxe/PciOptionRomSupport.c b/EdkModulePkg/Bus/Pci/PciBus/Dxe/PciOptionRomSupport.c index 3ec7698..449d0dc 100644 --- a/EdkModulePkg/Bus/Pci/PciBus/Dxe/PciOptionRomSupport.c +++ b/EdkModulePkg/Bus/Pci/PciBus/Dxe/PciOptionRomSupport.c @@ -64,7 +64,7 @@ Returns: 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)) {
return Status;
}
-
- AllOnes &= 0xFFFFFFFC;
- if ((AllOnes == 0) || (AllOnes == 0xFFFFFFFC)) {
+ //
+ // Bits [1, 10] are reserved
+ //
+ AllOnes &= 0xFFFFF800;
+ if ((AllOnes == 0) || (AllOnes == 0xFFFFF800)) {
return EFI_NOT_FOUND;
}
PciIoDevice->RomSize = (UINT64) ((~AllOnes) + 1);
return EFI_SUCCESS;
-
}
EFI_STATUS
|