]> xenbits.xensource.com Git - seabios.git/commitdiff
Warn on unaligned PCI ROM structure in option roms.
authorKevin O'Connor <kevin@koconnor.net>
Sat, 16 Feb 2013 03:46:09 +0000 (22:46 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Sat, 16 Feb 2013 03:46:09 +0000 (22:46 -0500)
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
src/optionroms.c

index 971b9d680b42f5ba912a0672c8f023a561b136de..03c5de03d9db179d8c85de68764b34b8c2856633 100644 (file)
@@ -109,6 +109,9 @@ get_pci_rom(struct rom_header *rom)
     struct pci_data *pd = (void*)((u32)rom + rom->pcioffset);
     if (pd->signature != PCI_ROM_SIGNATURE)
         return NULL;
+    if (rom->pcioffset & 3)
+        dprintf(1, "WARNING! Found unaligned PCI rom (vd=%04x:%04x)\n"
+                , pd->vendor, pd->device);
     return pd;
 }