]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/LegacyBios: set NumberBbsEntries to the size of BbsTable
authorDavid Woodhouse <dwmw2@infradead.org>
Wed, 26 Jun 2019 11:37:39 +0000 (12:37 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Wed, 26 Jun 2019 13:06:44 +0000 (15:06 +0200)
This is hard-coded in the IntThunk structure, and the additional entries
will be needed for other devices like VirtIO and NVMe disks. So admit
that they exist.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20190626113742.819933-2-dwmw2@infradead.org>

OvmfPkg/Csm/LegacyBiosDxe/LegacyBios.c

index 05e3ffd2bbb86a9bbc7162a1c9bf48364941ffa2..5e795bfe657074e5d727b07e30d4542e46c12fb1 100644 (file)
@@ -565,12 +565,13 @@ ShadowAndStartLegacy16 (
 \r
   EfiToLegacy16BootTable->BbsTable  = (UINT32)(UINTN)BbsTable;\r
   Private->BbsTablePtr              = (VOID *) BbsTable;\r
+\r
   //\r
-  // Skip Floppy and possible onboard IDE drives\r
+  // Populate entire table with BBS_IGNORE_ENTRY\r
   //\r
-  EfiToLegacy16BootTable->NumberBbsEntries = 1 + 2 * MAX_IDE_CONTROLLER;\r
+  EfiToLegacy16BootTable->NumberBbsEntries = MAX_BBS_ENTRIES;\r
 \r
-  for (Index = 0; Index < (sizeof (Private->IntThunk->BbsTable) / sizeof (BBS_TABLE)); Index++) {\r
+  for (Index = 0; Index < MAX_BBS_ENTRIES; Index++) {\r
     BbsTable[Index].BootPriority = BBS_IGNORE_ENTRY;\r
   }\r
   //\r