]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Correct the right bits judgment for get size of OptionROM.
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 12 Jan 2007 06:20:33 +0000 (06:20 +0000)
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 12 Jan 2007 06:20:33 +0000 (06:20 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2236 6f19259b-4bc3-4df7-8a09-765794883524

EdkModulePkg/Bus/Pci/PciBus/Dxe/PciOptionRomSupport.c

index 3ec76989a5c69983859ced1a76aedf1260bac756..449d0dc4431cb6060c15ad2d5a055e8214baed0b 100644 (file)
@@ -64,7 +64,7 @@ Returns:
   PciRootBridgeIo = PciIoDevice->PciRootBridgeIo;\r
 \r
   //\r
-  // offset is 48 if is not ppb\r
+  // offset is 0x30 if is not ppb\r
   //\r
 \r
   //\r
@@ -112,15 +112,16 @@ Returns:
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-\r
-  AllOnes &= 0xFFFFFFFC;\r
-  if ((AllOnes == 0) || (AllOnes == 0xFFFFFFFC)) {\r
+  //\r
+  // Bits [1, 10] are reserved\r
+  //\r
+  AllOnes &= 0xFFFFF800;\r
+  if ((AllOnes == 0) || (AllOnes == 0xFFFFF800)) {\r
     return EFI_NOT_FOUND;\r
   }\r
 \r
   PciIoDevice->RomSize = (UINT64) ((~AllOnes) + 1);\r
   return EFI_SUCCESS;\r
-\r
 }\r
 \r
 EFI_STATUS\r