Author: kevans Date: Fri Feb 9 17:25:34 2018 New Revision: 329070 URL: https://svnweb.freebsd.org/changeset/base/329070
Log: MFC r327606: Handle misconfigured/nonexistent pcidev for comconsole instead of BTX panic. [This is effectively a direct commit to stable/11 due to path restructuring in head. Diffs have simply been applied to previous location] PR: 203319 Modified: stable/11/sys/boot/i386/libi386/comconsole.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/boot/i386/libi386/comconsole.c ============================================================================== --- stable/11/sys/boot/i386/libi386/comconsole.c Fri Feb 9 17:01:30 2018 (r329069) +++ stable/11/sys/boot/i386/libi386/comconsole.c Fri Feb 9 17:25:34 2018 (r329070) @@ -267,6 +267,16 @@ comc_pcidev_handle(uint32_t locator) 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); _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"