Index: head/stand/i386/libi386/comconsole.c =================================================================== --- head/stand/i386/libi386/comconsole.c +++ head/stand/i386/libi386/comconsole.c @@ -267,6 +267,16 @@ printf("Cannot read bar at 0x%x\n", locator); return (CMD_ERROR); } + + /* + * biospci_read_config() sets port == 0xffffffff if the pcidev + * isn't found on the bus. Check for 0xffffffff and return to not + * panic in BTX. + */ + if (port == 0xffffffff) { + printf("Cannot find specified pcidev\n"); + return (CMD_ERROR); + } if (!PCI_BAR_IO(port)) { printf("Memory bar at 0x%x\n", locator); return (CMD_ERROR);