From 97dce0f9ce3b1a215c0f2e186fd35d0de7be5528 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 15 Feb 2013 22:46:09 -0500 Subject: [PATCH] Warn on unaligned PCI ROM structure in option roms. Signed-off-by: Kevin O'Connor --- src/optionroms.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/optionroms.c b/src/optionroms.c index 971b9d6..03c5de0 100644 --- a/src/optionroms.c +++ b/src/optionroms.c @@ -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; } -- 2.39.5